Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Seeking Best Practices - does your company follow a standard?

by meraxes (Friar)
on May 06, 2010 at 14:37 UTC ( #838725=note: print w/ replies, xml ) Need Help??


in reply to Re: Seeking Best Practices - does your company follow a standard?
in thread Seeking Best Practices - does your company follow a standard?

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.

--
meraxes


Comment on Re^2: Seeking Best Practices - does your company follow a standard?
Download Code
Re: Seeking Best Practices - does your company follow a standard?
by JavaFan (Canon) on May 06, 2010 at 15:09 UTC
    For the formatting, perltidy,
    Ah, so you have a coding standard with trivialities like how to format lines of code. (See my other post in this thread about why I don't like codified coding standards).
    What are your sanctions if someone breaks the coding standard?
    I really see this as a non-issue.
    Strange. I see what you do when a standard isn't followed as one of the most important issues. It defines how serious a standard is taken.
    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 heard that argument about wearing ties as well.
    I've known good coders who were awful employees and they got let go.
    About the use of whitespace? That's the example I'm using. I wasn't talking about not writing readable code. I was talking about not following the number of spaces the company standard dictates.
    How do you quantify something like this?
    Well, that was my question, wasn't? If you can't measure it, does it have a significant effect?
      Ah, so you have a coding standard with trivialities like how to format lines of code. (See my other post in this thread about why I don't like codified coding standards).

      One coder's triviality is anothers holy grail. Standardizing sounds good to me. No one is going to like everything but if everyone sticks to some basic things I don't see it as an issue.

      Strange. I see what you do when a standard isn't followed as one of the most important issues. It defines how serious a standard is taken.

      The idea of the policy would be that people follow that standard... cause that's how it is. The point of the standard is that it's to be adhered to. Code doesn't get merged to master unless it passes code review. Simple as that. People who can't deal with that have other issues as far as I'm concerned. Can't follow instructions? Then why are you working for someone else?

      I've heard that argument about wearing ties as well.

      If my job were to model ties, I'd agree. As it is, this seems like a bit of a red herring.

      About the use of whitespace? That's the example I'm using. I wasn't talking about not writing readable code. I was talking about not following the number of spaces the company standard dictates.

      You frame it as being about whitespace but it's really about adhering to a policy your employer puts in place. If there's a cogent argument about why NOT to it'd be heard but ultimately it's not their decision if management decides it's a good idea?

      Well, that was my question, wasn't? If you can't measure it, does it have a significant effect?

      Can't know until you try and, as I said, I'm perfectly open to suggestions. I don't see it being bad per se but I coudl be wrong. I don't know. If it had an obvious bad effect it could be abandoned. I still don't see the harm in trying.

      --
      meraxes
      Sanctions for not following a formatting standard, when perltidy can be set up to give you 95% of any reasonable format you desire? That's why it's a nonissue: people can just format the code with perltidy the way they like it as they work on it, then use the company standard perltidy profile when they commit the code to source control.

      There are other things that are nonnegotiable: using strictures, using the company source repos, unit tests, code reuse, etc. Doesn't matter how good a coder you are, your practices are part of your output, and if you can't fit into the team, then your boss has to question your continued employment.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://838725]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2014-07-10 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (199 votes), past polls