27

Just read this in a blog post by Jon Arundel, I think he's spot on:

"Programmers are incurable optimists: we always think our code will work, despite much evidence to the contrary."

Comments
  • 5
    What if I know for sure that shit will not work, but it does? 🤔
  • 0
    @iiii It probably still doesn’t work just in ways you don’t yet know.
  • 0
    The code always works.

    Not our fault the IDE is crap, the language didn't support this, compiler is wrong, bad keyboard...
  • 1
    @iiii I fully expected you to be here
  • 0
    Nah, i don't expect my code to work.

    That is why i use extensive logging, have generic exception catching at the top level, make extensive use of the type system (or type annotations in dynamically typed languages), try to keep the code branch count small, and live by the fail fast, fail safe doctrine. All that makes debugging a sortof okayish experience and leads to fast fixes and good maintainability in general.
  • 0
    test, test, test, test

    then when you think you are done

    test again

    test every use case you can think of, and if you are able, do a fuzzy test

    you will find a bug
  • 0
    i dont think my code works.. i build it in my IDE and if theres an error i fix it :)
Add Comment