Hacker News new | past | comments | ask | show | jobs | submit login

"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?" - Brian Kernighan, "The Elements of Programming Style"



Writing "for (int i=0; i<limit; i+=step) {}" is easy. Debugging the off-by-one error requires that you understand the alignment issue you ignored in the first place. That would make debugging harder, not because debugging is inherently hard, but because that's the place you're forced to deal with the hard bit you skipped earlier. I wonder how often that applies, compared to well-understood-but-implementation-mistake code?


Damnit, I really should have remembered that :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: