Hello everybody. Recently, I’ve took part in the event Agile Brazil 2012 and attended an interesting lecture about the development of clean code. It was based on the book Clean Code: A Handbook of Agile Software Craftsmanship – Uncle Bob. In this post, I’ll make some remarks on the importance of the clean code when running and agile project.

 

According to Uncle Bob, the clean code development is a pratice that aims to improve the readability of the code, as well as its maintenance. A clean code must be:

  • Simple – It should carry only the minimum required complexity needed to solve the problem;
  • Straight to the Point – It should be transparent enough to be clear of what it does;
  • Efficient – It should be generated to solve the problem proposed in a correct way;
  • Without Duplicity – If there’s another piece of code that performs the same operation, it should be invoked;
  • Elegant – The code should have representative names  as well as be well indented; and
  • Made with Care – The code should be made with attention and no hurry.

According to Uncle Bob, a person who develops code in a clean way can be considered a professional programmer. A professional makes use of the clean coding pratice, because he feels responsible for the generated code, thus he reduces the probability of occurrence of errors. On the other hand, the non-professionals don’t make use of this pratice, because they tend to “hide the dirt under the carpet”.

But where’s the agility in this? The agile environment requires a team that is highly committed with the project and nothing better to raise this feeling that the responsability feature talked on beforehand.

Still, using the clean code development, the casualties generated due team changes are reduced. As the code is well done, another programmer will have no trouble in understanding it and the team velocity tends to keep stable.

To conclude, it is important to remember that this subject is very extensive and will be developed in a deeper way in my next posts where I’ll present techniques for making use of the clean code development.

And you, what do you think? Do you write clean code? Are you a prefessional programmer? Leave your comments. See you later!!!