3 ms·
"Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ev
by unexistance 10y ago
"Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?"
Timeless
If you have to use 'clever' hacks, the least you can do is justify it in the comment
- AstralStorm 10y agoFortunate that a good programmer will get more clever over time. Also will know when to write boring and or testable code. Testable code is also debuggable more easily.
- blauditore 10y agoAnd verify it with good tests. It sometimes happens that a certain piece of code is inherently complex, due to a complex underlying algorithm. But often, test cases are still easy to define, so it makes sense to heavily make use of them. For example, sorting algorithms may be somewhat complicated in implementation, but it's trivial to come up with some sample before/after lists.