This article summarizes some pitfalls to consider for maintaining quality code in a small development team, and makes a few suggestions in this regard.
Introduction
In a small team, with a high workload, there just never is enough time for a proper code review. So how do we ensure all code is up to standard?
Education
Shockingly, coding standards were not covered in my tertiary degree, nor in any educational course I had completed over the past 15 years. I see the same shortcoming in most mainstream developers. There is no foundation laid for how to ensure code is of a good quality.
So let's just peer review our code then, right? "I'll o.k. yours if you o.k. mine"
Well if it's taken a dedicated resource 10 days to write a complex set of classes, interacting data to a GUI somewhere, with specific business domain rules built into it, based on weeks of workshops and pages of requirements and technical aspects, can I then really claim I've reviewed it after spending an hour scanning through it looking for obvious problems? I can't. I need to understand those business domain specifics, I'll need to understand the data structure, I'll need to understand the architecture of the application as a whole as well as the specific developer's preferences, and for this I'll need far more time than what a small team with an overflowing inbox has available.
There is no clear answer for this. I can tell you what works for me though, from personal experience.
SCRUM
Increased agility and short sprints allows me to get involved and see the actual code regularly. I then don't need to understand a large piece of work, but rather its subsets, smaller fragments of the bigger picture and can intervene early when I spot a flaw, thus instilling positive coding habits with individuals in my team, without taking days out of our productive, money earning schedule.
In my opinion, peer code review, as a technique for quality, scalable and maintainable code, is only effective in this environment, in any other, it becomes superficial and ineffective.
Automated code analysis
It's quick to point out flaws and missed standards based on your requirements. It's unemotional and to the point and its findings can be solved by the code owner before you even need to look at his or her code through peer code review. This works well if used in a project from day 1, but becomes useless if added into your process later in the life cycle, as you will now sit with an existing code base that does not adhere to these rules and you will lose precious development time to align this, while destabilizing code that has in all likelihood gone through some testing.
So to summarize
Don't try and review code once a month. Do it frequently.
There are tools out there, use them from the start. Prioritize the inclusion of these tools in your development process as well as your budget, and if KPIs are part of your responsibility, include the use of the process and tools in those KPIs.
DISCLAIMER
I did not venture into review checklists or standards documentation for this article. That is a discussion on its own and one I cannot attempt this early in the day.
6 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

Former memberPosted May 22, 2014, 12:30 PM
Don't try and review code once a month. Do it frequently. I like this. Thanks for informative article
Leon PuthPosted May 22, 2014, 7:45 AM
Jaiganesh. The code analysis tab on any vstudio project properties is a good place to start. get the Microsoft default rule set installed and modify the rules as you require. it will require some research/reading. im going to take a look at code review feature in vs2013 team as suggested by Mahesh as well as ive not used this.
jaiganesh paramananthamPosted May 22, 2014, 7:26 AM
could you please advise some good tools for code review?
Leon PuthPosted May 22, 2014, 7:21 AM
Mahesh, thanks, yes he is my son. the photo is about 3 years old though. he now has a little brother. ill update the profile photo when time allows :-)
Mahesh ChandPosted May 22, 2014, 7:16 AM
BTW: Love your photo with your son (I assume). Cute!
Mahesh ChandPosted May 22, 2014, 7:00 AM
Thank you Leon. I agree with you on degree. Degrees do not cover coding standards, best practices and so on. It comes with experience. I should mention, Visual Studio 2013 Team (Ultimate) has this Code Review feature where other developers in the team can review other developers code (via TFS) and give feedback via Visual Studio. I like and use that a lot.