3 ms·
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
by sleepychu 10y ago
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
- sklogic 10y agoThere are bugs in compilers. Hardware faults. 3rd party library faults and inaccurate documentation. Good luck asserting these assumptions and factoring them in your designs.
- sleepychu 10y agoI'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.
- delta1 10y agoI like this point of view and generally phrase it to myself and colleagues as "Debugging is the process of verifying your assumptions."