News for hackers. Stuff that matters.
Re:The Debugging Mindset by unexistance on Monday April 03, 2017 @02:48AM (#14021034)
"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

Re:The Debugging Mindset by blauditore on Monday April 03, 2017 @03:22AM (#14021134)
And 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.

Re:The Debugging Mindset by AstralStorm on Monday April 03, 2017 @03:16AM (#14021120)
Fortunate 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.