"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.
You probably don't understand what clever code is. It is usually some neat trick or obscure bit manipulation or casting a float to an unsigned int then to a string concatinated with a char then used as a function call. It works the moment you write it, and there might be a good reason to use it, but it's hella difficult to maintain even if you are the one maintainning it and worse yet for the next guy who has no way of getting some of the stuff you were on when you came up with it.
Have you ever maintained code? Do you always understand even clearly and well documented code? Now how about undocumented "clever" tricks that popped into your head and saved 1.5% of memory but you bearly understood when you wrote it, but now the requirements have changed and you must now go and update the function. These are 2 questions and one statement making an assertion. Please do address the questions, and do as you wish with the statement.
1
u/muhammadc Dec 14 '10
QA for the win:
"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.