4 ms·
Clever. “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, n
by falling 14y ago
Clever.
“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.”
Seeing the recent evolutions, I thought Rails people learned that magic in code leads to debugging unhappiness.
- stephth 14y agoI think that quote is about complex code. We tend to look at macros as dangerous, but this is a pretty clean usage of macros, it's basically a function that turns the arguments into a string. Simple and easy to debug. Don't you think? Edit: Discussion about that quote: http://stackoverflow.com/questions/1103299/help-me-understand-this-brian-kernighan-quote http://stackoverflow.com/questions/1103299/help-me-understan...
- falling 14y agoIt’s a simple macro that makes you write code that looks like a syntax error, and I don’t like that (http://www.codinghorror.com/blog/2006/05/code-smells.html http://www.codinghorror.com/blog/2006/05/code-smells.html). Especially since without the macro you’d just need to write two characters more or, even better, a clearly named constant, like kNSRAllProperties.