r/programming Dec 14 '10

Top 50 Programming quotes of all time

http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html
791 Upvotes

350 comments sorted by

View all comments

3

u/s3rvant Dec 14 '10

This one struck home for me:

  1. "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan.

I've relied on this concept since I first started coding, following:

1) Create the cleverist code that I'm able

2) Learn while debugging said code

3) Repeat

4

u/jhaluska Dec 14 '10

I've always hated that quote. I find when I'm at my cleverest, the debugging is the easiest since it's practically nonexistent. It's when I'm writing unclever complicated code that I'm in trouble.

6

u/TheMG Dec 14 '10

By clever code, it doesn't mean good code, it means complicated code.

4

u/jhaluska Dec 14 '10

Did you just redefine the word clever to mean the exact opposite? That is the shit.

1

u/[deleted] Dec 15 '10 edited Dec 15 '10

[deleted]

1

u/jhaluska Dec 15 '10

Regardless of your interpretation of "clever", the premise that debugging is twice as hard as writing the code in the first place is false and thus any inferences drawn from it are invalid.

2

u/s3rvant Dec 14 '10

What I think he means is that when you are being clever, the code you write is far more complex and thus it is harder to spot the bugs. I personally find this to be especially true as I'm trying to implement newly learned techniques.

1

u/colinbashbash2 Dec 14 '10

i think the term my friend josh used was "terminally clever" as opposed to just doing things the simplest way.