You only need a single look at Sydney Opera House to recognise that it is a work of art. Any masterpiece is like that – you don't need to do a throughout examination of Mona Lisa's smile to realise its beauty – you see it instantly. Perfection needs no explanation, it works on subconscious level.

The same applies to the software engineering too. Great code always looks good. It is always carefully formatted, indented and commented. By just looking at it you can tell that it is a work of art. Such code will always work, do what it is supposed to do and have a very few bugs. Because whoever wrote that code cared a lot about it. And you can safely assume that if anyone has put a lot of effort into making the code looking good, he has put at least as much effort into designing and debugging it.

What is even more important, carefully carved code is easier to maintain. In modern software projects any single procedure gets tweaked and rewritten tens of times. If you are a programmer, good chances that even in a project that you work on right now you inherited some code that was written years ago, maybe from people who long left the company. And when you finish with it, it will not be the end of the story – the code will be passed to QA and finally to the production support. And then the cycle will start again. Hence, whatever you program, it's not just about you. You don't know how many people will be looking into your code trying to make sense of it. And you can help them immensely by making it is easy to read and understand now. Whether you will be remembered as a good programmer or cursed depends on it.

So, you made an effort to write the code that works. Now make an extra step – make it beautiful.


Comments

comments powered by Disqus