Simple is beautiful
Complexity happens. Simplicity, you have to strive for. Here's a blog post titled Simple is beautiful, written two years ago by Noel Llopis, that includes some gems of wisdom, including several quotes that I absolutely love.
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).
Comments
by LEE on 2006-10-17 20:44:58
by ktec on 2006-10-26 15:04:09
by ktec on 2006-10-26 15:11:16
by Dando la chapa » Simple is beautiful on 2007-04-11 21:49:30
by Osh on 2007-04-30 16:20:37