How to introduce clean code

clean codecoding-standardsteam

My team has about 18 members and the code is generally good, using TDD and good specifications makes for working code. But I think they abuse comments in favor of writing cleaner, more readable code.

I would like to introduce them to the concept and I'm wondering how can I do that on a larger scale without sitting with each and every one of them on their code and explaining how it could be improved.

This is different from the suggested duplicate because I believe I already know how to write clean code. What I'm looking for is how do I introduce my team to writing clean code?

Best Answer

I'm wondering how can I do that on a larger scale without sitting with each and every one of them on their code and explaining how it could be improved

Short answer:

  • nothing else than regular code reviews can fix this
  • you don't have to do all the code reviews by yourself, especially when your team has 18 people

How you organize your code reviews is up to you, of course, for example, you could insist that before some new code is checked in (into your VCS), every dev picks an available peer and asks him kindly to proof-read the code. You could also do code reviews on a more formal basis, or after check-ins - choose whatever works best in your team.

Related Topic