In any team sport, the best teams have consistency and chemistry. – Roger Staubach
When writing code was my day job, my projects inevitably went like this:
- Check the code out.
- Read the code to figure out what is going on.
- Start reformatting the code and re-writing pieces of the code that didn’t match my style. I convinced myself that this was part of my “process” of understanding the code.
- Finally, make the appropriate change.
- Check in all modified files – usually a lot more than necessary to make the change because of all my formatting issues.
- Repeat steps 1-5.
The problem was that while all my co-workers were bright developers, they obviously weren’t as bright as me because they couldn’t properly format their code. I took it as my job to “enlighten the unwashed masses” up until the day my boss called me into his office and politely told me to STOP IT! To be fair, he had to call a couple of others in also.
Invariably, I would get lost in the weeds of step 3 and sometimes it would take longer than the actual fix.
The problem was that each of us could code, but we did it differently. Curly brace placement, tabs vs. spaces, etc. We had no consistency because we had all been trained separately or learned on our own.
When I look back on this now, the cost of our lack of consistency was staggering, even after our visits to the principal’s office. Each of us making changes or changing things back because someone else had changed it to their style was adding up to cost overruns on projects. Overruns that served no-one.
This problem could have easily been solved, along with several others, by regular team-based training. Instead of one person going to training for this, someone else going for training on that, training the entire team together.
Sports teams train together for a reason. For the entire squad to move as one, they have to practice, so that there is no wasted effort that costs precious time or points. Your development team should be the same.
Invest in training your entire team together so that you can reap the rewards of consistency.