177

My thoughts on programming:

As a child:
It is 100% magic

As a developer:
It is 65% if/else statements, 34% iterating an array, 1% actual amazing and unique code

Comments
  • 10
    wait.. it's not magic?
  • 25
    Man, I pity the codebases you work with. If it's 65% if-else, it must be quite some spaghetti.
  • 4
    %1 code is memcpy and or some shitty pointer arithmetic.
  • 14
    65% is just some irrelevant shit a junior dev copied from stackoverflow
  • 4
    I havent iterated an array in the past 4 years
  • 3
    @tekashi Me neither.

    But lists
  • 2
    in what way STL is not magic
  • 1
    What is iteration? Spaghetti code, spaghetti code everywhere
  • 2
    You should discover better abstractions.

    Try using more of
    .map
    .fold/reduce
    when using arrays

    Then try to learn about some other functors. Like Either/Option, Maybe/Nullable.

    Then start using .chain.
    Then go into monads, and try to discover a new kind of magic.
  • 2
    I remember as a kid, being able to tell a computer to do anything was magic... That's probably true actually for anyone that just started to code.

    Maybe it's perspective. Once your experienced, most things are business as usual although to some devs... They're still like "woah wtf did you do?" Or... "I don't understand what you just said"
  • 4
    Complex code which you don't understand is witchcraft (or black magic)

    Simple code which you do understand is boilerplate.

    The real magic is when you have complex code which you do understand.
  • 2
    @Lensflare ... assuming all the variables aren't names a,b,c,I,j,k,x,y,z
  • 1
    You forgot the ?% bugs 😆
  • 0
    And then another 20% on top error handling if you're doing it right and because users do stupid things :)
  • 1
  • 0
    Accuracy win
  • 0
    There is always that bit of magic in code, it's that small percent of code that makes you say out loud "How the f**k did this even work?"... or in my case, that's 101% of my code.
Add Comment