|go ahead... be a heretic|
Re^2: Seeking Best Practices - does your company follow a standard?by meraxes (Friar)
|on May 06, 2010 at 14:37 UTC||Need Help??|
Having standards is one thing. But how do you check if it's actually followed?
For the formatting, perltidy, for the rest, code review. Code review is on the rise in our company. Some teams use it for everything. Others, like my own, are moving very quickly towards it.
What are your sanctions if someone breaks the coding standard? Say you have a coding standard of "3 space indent". What if someone keeps using a 4 space indent. Repeatedly. Even after being told. Do you fire him? Even if he's a good coder? Does your business benefit from letting good coders because of a whitespace war?
I really see this as a non-issue. If they don't do it, it gets seen in review. If he's a good coder and the team is going to follow a standard but he refuses.... well then he's not a great employee is he? I've known good coders who were awful employees and they got let go. Coding skill rarely makes up for deficiencies in other areas.
Coders may already have the habit of following their own standards, crafted from their experience before they worked for your company, and from the work they do outside of your company. Now they have to break their habit (repeatedly, they still will follow their standard in their night-time hacking). Have you measured their productivity loss?
But we have many people of wildly different skill levels and wildly different styles. Productivity loss? I'm betting there will be one at the start, but as things settle down I have my doubts that it will be crushing. No one gets to do what they want to do all the time. It's a reality of employment. Hardly scientific but we can try and find out.
Did you actually quantify the benefit of your coding standard? At the end of the year, how much more profit did your company made because of the coding standard? How did you measure that? If productivity really went up, did you let programmers go, because you now need less of them?
Suggestions welcome. How do you quantify something like this? Has anyone tried?
If people can break coding standards, what's the point of having them in the first place?
If people can break laws, why have them? My viciously awful comparison aside, this still seems to me to be a poor reason to NOT do something. However, as we've started doing code reviews, it HAS helped us catch and fix things before they go out to production. Yes, it takes more time, but we have definately saved time down the line. Can't know till you try.