Edsger W. Dijkstra in his lecture The Humble Programmer:
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.
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.
The one bit that I want to add to is the "Timings, logging, and error handling" section. In it, Noel asks:
Ideally, I'd like my code to be really small, simple, and to the point so its meaning is always clear and obvious. Unfortunately, in the real world, that's is not always possible. We can start with a very clean 5-line function, but then we add timings around it to get an idea of its performance, and logging statements to know what is going on, and error handling code to deal with the unexpected, and before we know it, we have a monster function whose meaning is lost in a mass of details. . . What can we do about it?
The solution is to implement these cross-cutting concerns using Aspect-Oriented Programming (AOP).
The Simple is beautiful article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
“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.”
HAH! Lately I’ve taken to spending MUCH more time pre-planning, and building solid project scope’s, dealilng with the structure of how my app’s will manage their content, and as well the design layout. Thanks for the article!
AOP is something i’ve been reading about, through the pragmatic bookshelf, however i wasnt aware it was something you could really achieve with actionscript – do you have any basic examples?
My bad, i just noticed as2lib has a framework…thanks!!
[...] Simple is beautiful [...]
I was wondering if you know of any good OOD books (or large resources) specific to AS and Flash, that would be useful in architecture design.
Most OO books are not directly applicable, and most AS/Flash books are not detailed enough when it comes to Arch. design.
(I couldn’t find a contact for you, so that’s why I’m posting this slightly related post here)