KevinBurdett.com

Clean Code, the group exercise edition

//

My development team has been reading through Clean Code by Robert C. Martin (Uncle Bob). The book is packed with good advice and excellent coding practices. In my opinion, it is required reading for anyone that is serious about being a professional developer. If you are a developer and haven’t read it, you should! It is an excellent way to hone your skills and improve the quality of your work. However, that is not what I want to focus on. Instead, I want to talk about the group exercise. We have been getting together every other week to discuss the book in chunks of 2 or 3 chapters. In between each discussion, we have a “reflective” meeting where we search for ways to apply the principles and discuss where we have already done so. I can’t speak for the other members of my team, but I think I have learned just as much from the group discussions as I have from reading the book itself. It has been a powerful tool in my own skill improvement, so I wanted to spend some time discussing why I think it has been so valuable for our team.

1. Fosters an atmosphere of improvement

I simply cannot stress how valuable this is. The culture and attitude of a development team has a major influence on synergy, productivity, and output quality. Going through Clean Code is a great way to encourage your team to hone their skills. More importantly, it sets the expectation that growth and self-improvement are part of being a contributing team member. This kind of message provides impetus that can drive improvement for years to come.

2. Provides a catalyst for change

Being a professional developer, clean coding practices can be directly applied to your normal daily work. However, your focus will inevitably drift to existing code. I think most teams will find substantial amounts of pre-existing code that is ripe for refactoring. My team certainly did! Our Clean Code discussions provided a venue for us to re-evaluate our existing code base and identify the areas in greatest need of attention. Some teams may already have a venue for this type of evaluation, but I suspect that most will not. This is a great way to start! Cleaning up your code base pays huge dividends across the life of a product, so instituting this kind of review can be invaluable. View this exercise as the start of change.

3. Imparts good coding practices

This should be self-explanatory, but it is still worth noting. Consider the old expression “a chain is only as strong as its weakest link.” Having one or two developers producing sub-par work can be a painful drain on a team’s productivity. Going through an exercise like this group read is a great way to engage the entire team. The resulting improvement helps to bring up the quality of work across the entire team.

4. Creates a venue for discussion

Experience is an excellent, and often painful, teacher. While I learned a great deal from reading the book, I also learned a lot from the experience of my other team members. In many cases, my team members were able to provide real-world experiences reinforcing the different coding techniques and principles. In other (fewer) cases, they resulted in a more skeptical view. In either case, the experience of other developers adds much to the discussion. Without the group exercise, this element is lost and you gain only the insight of your own experiences.

5. Establishes common expectations

Our team decided that we wanted to establish a sort of “social contract” of clean coding. We have not completed it yet, but our understanding of what it should be is emerging. As our development team grows, this contract will serve as an introduction for new developers to help them understand what is expected of them, and remind current developers of the same.

In summary, the experience has been very educational for me and I believe that I am a more proficient developer because of it. So if you are looking for a way to inject some new life into your development team, consider a group read of Clean Code as a means to accomplish that. I highly recommend the exercise!

Martin, Robert C. Clean Code: A Handbook of Agile Software Craftsmanship. Upper Saddle River, NJ: Prentice Hall, 2009. Print. ISBN-13: 978-0132350884