r/ProgrammerHumor • • Sep 23 '22

Refactoring "Just working solution ".

Post image
54.8k Upvotes

355 comments sorted by

View all comments

3.1k

u/TerriblyCoded Sep 23 '22

Past me: “Hahaha! I’M A GENIUS!”

Present me: “OH NO!”

313

u/omgFWTbear Sep 23 '22

I learned .. who was it, Knuth who said, “Never write code as clever as you can, because debugging is harder than coding, so …”

As many others, I received a full scholarship in my degree on that from the University of Hard Knocks, the School of Blood, Sweat, and Tears; later on, I shared this wisdom to my now-ex who started her career after me, she thought it was ridiculous to ever not be your cleverest.

As they say, you can lead a horse to water …

57

u/FVMAzalea Sep 23 '22

The actual quote is a lot nicer:

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.

And it was Brian Kernighan.

26

u/omgFWTbear Sep 23 '22

Sounds like a smart fellow who should write a book. If he did, I’d be sure to read it. And then misattribute quotes from his august peers to/from him.

5

u/BetterOffCamping Sep 23 '22

Since nobody else seems to have picked up on it, I'm impressed with the joke.

For those who didn't pick up on it and are clueless, kernigan is half of kernigan and Richie - of the people who invented C and Unix, and wrote the Bible on the subject.