Beautiful software
February 23rd, 2008
Two recent articles touch the problem of Beautiful Code - Steve Yegge’s Portrait of a N00b and Jeff Atwood’s Code Isn’t Beautiful. I would take this discussion a little further from the talk about coding and architecture and go to software in general.
What is beautiful software? Perhaps most junior programmers believe that the software is beautiful when the code at a micro-level is beautiful. They focus on little details that they believe are important and try to write code that looks perfect according to these standards. Detailed comments, short functions, functions with a single return point - all these little things that we learn in school and don’t even dare to question them.
From here people can evolve in two directions. They either get into the hell of premature optimization and think software is perfect when every line of code is written in the absolutely most efficient way possible or become architecture astronauts and start dreaming about utopic designs that can solve any existent or inexistent problem. Ironically enough, architecture astronauts actually produce designs that are hard to extend and sometimes even hard to use in the intended way.
To me beautiful software is software that does only what it needs to do and nothing more. The code doesn’t need to follow dozens of written and unwritten “coding standards”, doesn’t need to be optimized more than by using common sense and doesn’t need to be an architectural masterpiece. The interface doesn’t need to expose every obscure functionality just to claim it has more features and it should focus on solving specific tasks in well defined steps. Beauty lies in simplicity.
In general software doesn’t need to be regarded as a piece of art. Software is not art, no matter how much we would like to call ourselves artists. Software is just a tool that helps people solve their problems. It’s not an exhibition of design patterns or clever optimizations.
Software will never be beautiful if that is your goal. Its beauty will come from the fact that it solves a real problem in a simple way. It’s just that easy.
Feed