3 ms·
Kernighan's law is fun. 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, b
by onion2k 5y ago
Kernighan's law is fun.
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.
If effort is linear then, by definition, you should never put more than 50% brainpower in to your code.
I'm not sure I want to increase the effort I put in though.
- jbjbjbjb 5y agoOnly if complicated is considered clever. Clever might actually make things simpler.
- zerocount 5y agoOnly in the mind of the person writing it.
- deleted 5y ago[deleted]
- majou 5y agoI believe "cleverness" refers to ingenuity; it's outside-the-box, and trades simplicity in one plane for sophistication in another. However most "clever code" we come across is lopsided in this tradeoff, and might even require cleverness to understand, which it turns out is not very clever at all.
- xyzwave 5y agoReminds me of this quote by Alan Perlis [1]. > Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it. 1. http://www.cs.yale.edu/homes/perlis-alan/quotes.html http://www.cs.yale.edu/homes/perlis-alan/quotes.html