Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My top piece of advice: Programs behave predictably, when something impossible is happening it's because one of your assumptions is wrong. When that happens you'll find the bug the moment you start testing your full set of assumptions.

For some reason, even though this is invariably true, my friends at school didn't appreciate "I can't understand why I'm seeing this weird behaviour", "One of your assumptions is wrong!" xD



I like this point of view and generally phrase it to myself and colleagues as "Debugging is the process of verifying your assumptions."


There are bugs in compilers. Hardware faults. 3rd party library faults and inaccurate documentation.

Good luck asserting these assumptions and factoring them in your designs.


I'm happy to risk verifying those last ;-)

EDIT:

>inaccurate documentation. With the exception of this one, I usually assume that you need to verify the behaviour of a library/feature you've not used before.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: