Getting Development Group To Adopt New Practices?
maiden_taiwan asks: "At my software company, we occasionally need all engineers to adopt a
new standard or 'best practice.' Some are small, like the use of
Camel Case for function names, while others have tangible business
value, such as 'every check-in must be accompanied by a
unit test.' As you might guess, some new practices get ignored, not
because people are evil or lazy, but because they're simply too busy
to pay attention and change their work habits. So we are seeking
creative ways to announce, roll out, and enforce a standard for 100+ engineers so they will actually follow it."
What ways have you used to convince your developers and engineers to adopt a new set of practices that may or may not get in the way of their daily work habits?
We already know to automate compliance when possible (e.g., the revision control system could reject check-ins without unit tests), and simple
platitudes like 'tie compliance to their year-end bonuses' aren't
helpful by themselves, as someone will still need to check compliance.
The engineers here are smart people, so we want to spend less time on enforcement (having architects read the code and flag any non-standard practices) and more on evangelization (getting engineers to see the benefits of the standards and -want- to follow them). I'd welcome any advice on formal processes or just plain fun ways to
get people's attention."
One thing that really needs to be understood by all you "best practice" guys is that test code is not a shippable product. Requiring that all checkins be accompanied by unit test code is ridiculous because two developers working on the same code will need to update not only the code itself but also any test cases that rely on the behavior of the executing code. And if code A is supported by test code X, Y, Z, are you also going to require that any changes to A also be accompanied by changes to X, Y, Z? What happens if A is some fundamental architectural change (or maybe simply a refactoring) that affects all tests in the test suite? You can't seriously be talking about forcing the developer to go through the entire test suite looking for compilation errors and runtime errors just because those early tests don't make sense anymore with the new code.
You need developer buy-in to make a largescale standards effort work. You can do that by culling those developers who are realistic about development practices and by augmenting the remaining programmers with new hires who are just as standards-oriented as you are. Other than that, you'll be facing an uphill battle that will come to its conclusion the first time you approach a project milestone that is significantly behind schedule.
Do yourself a favor and get some test developers and testers. Let them worry about the test suite and let your developers worry about the product.
> What ways have you used to convince your developers and engineers to adopt a new set of practices that may or may > not get in the way of their daily work habits?
Adopt the new practicer. Or you're fired.
Make sure you give your programmers two weeks notice about the changes...Because that's probably what they'll be giving you soon afterwards.
What ways have you used to convince your developers and engineers to adopt a new set of practices that may or may not get in the way of their daily work habits?
Do it or be fired isn't cutting it anymore? At one job I worked at, you would get a verbal warning, a written warning and terminatio if you didn't follow the new security practices. All that did was to encourage people to find a better job. Since one co-worker already had a job lined up, he blantently went out of his way to get fired by violating all the security rules. Took management a week to figure out what was going on since they weren't following their own security practices. Needless to say, the red-faced manager was not fired for this week long oversight. Go figure.
Bring new development practices in incrementally. Make sure there is a strong case and rationale for each new practice. Equally important is communicating this rationale to the Engineers. Management/programming leads need to step in and raise the whip if needed. Engineers either follow the new standards or find new employment.
Many development practices show immediate tangible benefit. Anybody who has tried moving/renaming files or directories in CVS can easily be sold on Subversion. Bonus points in Subversion's command line client being syntax-similar to the CVS client.
It's been my experience that most good developers will adopt a standard practice because a) it makes sense and/or b) the new standard doesn't require any more effort than the old way, so it doesn't hurt to play the game.
So, make it easy to adopt and make an effort to educate.
Remember, though, that this is a two-way street; if it's hard to adopt or hard to argue for, then maybe management/architects should rethink their reasons for requiring the standard.
Also -- a training program might be a good carrot to help get the more junior devs onboard (at least with more complex standards like unit testing or patterns-based development).
Keep you process changes to 3 monthly cycles (or something regular), so that people know they're coming. There's nothing more aggravating as a coder getting yelled at for some new process that some guy thought of last week and just 'mentioned' to some people.
If you have a regular release cycle (like any good software product) and actually notify people of the changes (as well as providing a reference guide containing all current policies), people are more likely to follow them. If you just announce new things you want people to do as you feel like it, and don't even bother to document what you want them to do, all you're going to do is piss people off. When you're making up new practices all the time and then ripping into people for not following them, it just feels like you're looking for excuses to pick on them.
At one of the jobs I worked at, we had a fellow who's sole role was to maintain the Version Control system, and manage the releases directly from that system. He was incredibly good at his job, to the point of politely beating the matter out of programmers who didn't comply. So if you just happened to forget to tag something for release (or otherwise tagged something that shouldn't have gone), he'd be over to let you know that you broke the build AND (here's the important part) work with you to get it resolved.
:-/
Honestly, having the guy around was the best thing that ever happened to our code tree. Suddenly, we developers didn't have to worry about handling all the minutia related to a test or production build, we didn't have to worry about pruning the tree, and we knew someone was watching our backs in case we screwed up. I know that my description probably sounds horrible, but it was honestly great! The whole process got a lot smoother after he came on board.
I think the key reason why it worked was because most developers wanted to follow good version control procedures; they just didn't have the spare bandwidth to manage it. By centralizing the handling, it offloaded a great deal of that duty and made everyone's lives easier. It also made clear the people who were intentionally keeping source control a few versions behind for "job security".
Javascript + Nintendo DSi = DSiCade
If it doesn't have tangible business value, why is upper management trying to dictate it?
If CamelCase matters for function names, then what you probably *really* need is a change-controlled interface between the different components of your system.
http://outcampaign.org/
At my software company, we have yearly bonuses and profit sharing. Both can be affected by what we call a "quality factor" or as some of our programmers deride it "quantitative quality." Basically, we have some set in stone rules set by our leads when it comes to workflow issues. For example, software compiles are scheduled every night at 8 (and a second at midnight if needed). Your work needs to be checked in to our tracking software by 8. If not, the compile will break. If you break a compile, your quality factor score goes down. If you remember and check your work back in by the midnight backup compile, your score ticks back up slightly. There are about a dozen of these rules, and they all center around interrupting other people's workflow. If you screw up a nightly compile, it means when people come to work in the morning, a new compile has to be kicked off and everybody has to wait. Every person whose workflow is interrupted gets a share of your quality factor points you lost. So at the end of the year, if you never screwed up, you get more money in your bonus. If you were constantly screwing up and making other people lose productivity, then you get less money and they get more to make up for your screw ups. If you screw up a normally expected amount of times, it ends up in a wash.
Before you ask, yes, there are certain people that hate that rule. But those people tend to be the ones losing out on money, and the ones screwing up a lot. Screwing up once or twice is no big deal. Screwing up on a weekly basis hurts you in the long urn, but it's really their fault for not correcting their problem. No, the entire bonus and profit sharing is not based around it, but it is a good chunk. One guy I shared an office with last year lost nearly $2000 out of his bonus. That ended up giving everybody about $50-75 more. Sure, that's not much of a gain for certain people, but it's a nice chunk of money to treat your wife/girlfriend to a nice holiday dinner at the end of the year. The important part is the loss hurts you big and requires that you stick to good practices for a long time to make it up.
It's not stupid. It's advanced.
One thing that might help would be to involve them in the decision-making process. A lot of the "best practices" I've seen handed down were monumentally stupid ivory-tower junk.
My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
If there is an actual benefit to the company/group/process as a result of the change, they need to understand it. If you cannot explain this benefit to them, they will not bother with it. But if you cannot explain the benefit to them, you need to go back and re-evaluate why that change is happening in the first place. Sometimes you may find that someone understands the reasoning behind a new practice but just doesn't care. If their failure to implement it hurts the entire team, they should be aware of this. If they still don't care, and this new practice is worth implementing anyway, ask them to try it your way for a bit and see how they react to it. If they refuse, tell them that they are a valuable asset to the team, but only if they are cooperating, and if they won't adapt to this change then they might not be able to continue working there. After all, if this new practice is truly beneficial to the group, then the old one is no longer acceptable behavior.
Most of the time, once someone understands why a change is needed (and this isn't just you telling them the reason and having them nod their head -- they need to repeat it back to you in their own words), they will gladly go along with it. Those who still refuse are probably not worth having on your team.
Thank you so much for not saying "begs the question". Hats off to you. :)
Um, yeah... its just that we're putting the new cover sheet on all new TPS reports, so if you could just go ahead and remember to do that that'd be great, yeah...
Did you get the memo?
There are also languages like Eiffel were design by contract makes unit tests an integral part of the process. Not afterthoughts that get seperated from the code like other languages
the number one best practice: do something that matters. when you do, you can hire great people that really care. when people really care, they do it well and can be trusted. I know there's this whole "reality" thing that sometimes gets in the way, but reality isn't why I'm posting to slashdot at 1 am. I quit my programmer day job six years ago to raise the kids. that's what matters to me.
must... stay... awake...
well this may sound a bit odd but trust me, it works. If you try to change a couple things, they'll of course reject it. But if you change a bunch of unimportant things too, it will actually encourage them to change overall. It's kinda like telling someone to clean this room then that room and organize their FPS game CD's in their house and they never really get to it but then they move into a new house and since the whole environment is different and better, they act different and finally do what they should. So first, give the whole set of changes a name; I don't care how stupid it it cuz historically, it works. Then change every insignificant thing you possibly can. Paint the office, move stuff around in the break room, get ppl new keyboards, and redo the company newsletter layout. With so many changes, everyone will be thinking "hey, those are a lot of changes" and it will become more premonent in their minds and they'll be more active about noticing the changes and coping with them accordingly. Then sneak all the guidelines for new policies or things you want to change in there somewhere and stick to them and enforce them heavily and keep linking them to the overall changing theme and you'll have massively better results. I'm sure I pretty much murdered that strategy compared to the textbooks I read about it in but hopefully you get the overall idea and seriously, it works! Now mod this post already, it's more usefull and thoughtful than the average one!
Google's Super Secret Search Algorithm: SELECT @search_results FROM internet WHERE @search_results = 'good'
Machiavelli said something to the effect that the prince should dole out the sweets in small ammounts on a regular basis but put all the bad news in one package and get it over quickly. ( Sorry. I don't have the time to look up the exact quote )
People are creatures of habit. They don't like changes. Every change that you make in their working environment is a small negative experience to them. Even if it is something that they might agree is a good thing, it is still a change, and thus a negative thing to them.
This, unfortunately, conflicts with the desires of a good manager, who wants to make improvements in his business every day. Even if they are GOOD changes, making changes every day is a sure way to alienate your employees.
So, be patient. Only make frequent changes if an emergency requires it. Otherwise, make a list of planned improvements, and keep it to yourself. Add to it weekly, or even daily. Then, once or twice a year, implement it all at once.
It sounds contradictory, but people will adjust to a bunch of changes better than a few, IF they know that the rest of the time their work will be relatively consistent. You can ask them to be in an absorb-the-changes mode once in a while, but not all the time.
> What ways have you used to convince your developers and engineers to adopt
> a new set of practices that may or may not get in the way of their daily work habits?
You have to get them involved in creating and writing the practices. You said yourself that they are smart folkes, so ask them what they would like to have improved. This is not always easy, and it is certainly difficult to reach a consensus between a lot of smart folkes, but it is absolutely essential.
If you just want to know the best way to prescribe your favorite coding styling, and your are afraid that it may get into the way of the engineers' daily work, then forget it.
Buy some expensive (and so looking) chocolate and establish a weekly bounty for engineers who follow standards.
The main problem I see with adapting new practices is that project management relies on discipline as a replacement for motivation. This Does Not Work. Discipline alone is not enough- This is why for instance source control systems have been invented.
At some point at our company we started 'crosschecking'- which essentially means all developers have their code tested by another developer, mostly before things got to nightly build. (Other quality assurance practices are also already in place).
The result was twofold. First of all, incorrect code was communicated back the same day, or even several times the same day. This saved a huge amount of time in detecting problems. Second, because each developer knows their code is going to be reviewed by another developer, they try harder to avoid the bugs in the first place.
The first release after we introduced this practice, we noticed that the bugs being reported by the client mostly had to do with previous releases. The bug rate has steadily decreased since, and we're not constantly patching holes anymore. We catch most bugs before we deliver the product to the client- so the client is happier too. We spend more time doing 'fun' stuff now, rather than bug hunting. And it is quite an ego boost to ship a product and not hear of any defects. Would we stop crosschecking, we would have the feeling that we are shipping an inferior product.
By making sure the practices to adopt are insanely useful, time savers and make the work more fun, developers will adopt them without complaining.
Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
I hear you're having some trouble with your TPS reports
On the same note, give them inscentives to not only adopt these practices themselves, but also spot others not doing them.
I'm making this up on the spot, so feel free to actually make it into something worthwhile:
Create a ficticious currency, or some sort of point system. Report someone accurately as doing something wrong, and you get a point. If you're doing something right, you get a point or two. Get caught doing something wrong, and lose a point. At the end of the week (or other time period), give something relevant to the person with the most points, at every level. (So, for instance, at the level of a 10-person sub-sub-sub-project, you'd probably give the winner a beer of the week. At a company-wide level, but somewhat less frequently, well, depends how much you want to do -- a little bird told me that Google has some really cool inscentives, like cars and vacations, for people who really get stuff done.
Don't thank God, thank a doctor!
Try the you break, you bought it approach. The offender becomes the new build engineer
1. Management asks the engineering group to come up with a proposal for solving a problem.
2. The engineering group comes up with a standard.
3. Management supports the standard and holds the engineering group to its commitment.
For any standard you can think of, this will work most effectively. The only problem is that I lied about it being three _easy_ steps. Each one is actually really hard to do and you just won't have any success with rolling out new standards until you get good at each of these things.
Until then, coaching, training, badgering and firing might get you part way.
Helping with organizational effectiveness is our job.
One of the most effective techniques I've used to encourage adoption of change is to get the people who will need to change to own the new process. How do you do that? You heavily involve them in designing the process, expose them to the reasons why the process is good, get them engaged in discussions about how to resolve the problems that you're trying to resolve. Sure, you're bright and everything and you know the solution already, but that doesn't mean everyone will do as you say.
Best way to do this is for you to create an imperfect solution then have one-on-ones with all the key stakeholders and get them to contribute to it. Expose them to the business requirements (expose them to the business if need be) so that they understand perfectly well why this is happening, and get them to own this process and thus commit to it. Then once everyone's agreed that this is the way to go, you can set up some sort of regular measurements to track the adoption of the processes. Make those measurements visible and the key stakeholders will get these processes adopted by their teams.
Daniel
Carpe Diem
I would say that if it is even feasible that every check in could include a unit test then you are checking in far too infrequently.
:-)
Move to a decent version control system - git is my favourite, but I'm sure mercurial, darcs or bzr-ng would be fine too.
I used to use version control only to check in large relatively complete changes. I now realise that that was completely missing the point. I now constantly check in, every patch is small and easily read. The description that goes with it is easy to write because the patch is small; best of all though is that merging and cherry picking are suddenly hugely powerful because you can be very precise with which patches you use.
Oh - and if management ever says "and what do you do exactly"; it's lots of fun to supply a log dump that tells them.
Carpe Daemon
True on both counts, but these principles cut both ways: testing is also not a substitute for planning and maintaining a good overall design, and if your entire process revolves around the unit testing practices then any discrepancies between the (probably not crystal clear) requirements and what your unit tests expect are likely to be discovered horribly late in the process.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Let me be clear from the start that I have nothing against automated testing, nor against unit testing at a low level, nor against combining these two ideas.
However, I think it's important not to place inappropriate faith in them. I have heard senior programmers recite the mantra that you can refactor your code as much as you like, because as long as it still passes the unit tests, you know you didn't break anything. I look at those people and wonder how they got to those senior positions. Do they really believe that you can ever have an exhaustive set of unit tests, no matter what the context? I have seen cases where rewriting a pretty trivial arithmetic expression in a tidier form worked fine on one machine, but completely broke the optimiser with a different compiler on a different OS, resulting in a subtle change in numerical outputs.
IME the hard-core TDD advocates also have a false sense of security when it comes to design. Just because you have some tests in place, that does not mean you can design on-the-fly all the time, and suffer no overheads. There is a reason that good software engineers spend a lot of time designing and not much time writing code: it's because writing the code (and getting it right) is much easier with a clean architecture that's designed to be flexible and maintainable. Of course you can't plan everything up-front, but the whole "anything's OK as long as it passes our unit tests" approach is a recipe for endless headaches when your design starts to evolve, and can lead to weeks or months of wasted time later when a new feature can't just fit into the existing code because there's simply nowhere to fit it.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Hear hear!
Developers need to experience a benefit from the practices they are asked to adopt, or they will have no internal motivation to adopt them. In that case you are forced to use external motivators (rewards or punishment) which are never as effective.
There are only two reasons to introduce a practice: (1) to improve productivity; and/or (2) to CYA (cover your ass). Any practice that doesn't do one of those is worthless.
Practices that improve productivity should (and generally do) appeal to developers. Such practices usually involve working smarter rather than harder, isolating developers from mistakes or inconvenience caused by other developers, and taking care to reduce mistakes early in the development cycle (so less frustrating debugging at integration time). Take the time to ensure that developers understand what the practice will do for them, and they'll have an intrinsic motivation to follow it.
Practices that CYA are more difficult to implement. These represent business concern about liability that course arise from the way things are being done. That could involve labour issues (developers have been under pressure to work overtime), intellectual property (someone is copying GPL code into the code base), or following industry norms so that you can't be sued for negligence.
Where industry norms differ from the practices that improve productivity you'll need to educate developers and provide some external motivation (usually punishment) to ensure compliance.
i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
You need to overcome differing viewpoints and resistance to change which is obvious, but a non-obvious way to help you evaluate why the resistance to change exists and how to overcome it can be done through a "stakeholder analysis". See Table 1 from this link: http://www.isixsigma.com/library/content/c030708a. asp and the section just below that table called "putting improvements in place".
Many organizations (including my own) are guilty of making changes to process and procedures without fully involving the stakeholders involved in performing steps in those processes. If you want to be successful in making useful changes, always make sure to keep your stakeholders involved in helping understand the reason that the change is needed, and how the proposed change will benefit the organization (as it may not always appear to benefit all of the stakeholders of the process). A feedback loop on measured improvements to a process or procedure is always a beneficial thing to keep those involved in making the change happen encouraged that the new way of doing things is the right way to continue doing things too.
Excuse my nitpick, but I just endured a staff meeting yesterday where the CFO prattled about "best practice", "best of class" and "world class" information systems. I sat biting my tongue, absorbing this puffery while the bullshitometer pegged.
Feel free to tell me how you want things done. You're the boss, and you pay me to do things your way. But do take responsibility for it! Nobody is buying your decision as so-called best practice as if you had just carried stone tablets down from Mount Sinai.
I mean, who labels things "best practice" anyway? The UN Commission on Best Practices? Best Practices Magazine? The Best Practices counter at your local Kroger? Bah.
(Sorry. I feel better, thanks for asking. In retrospect I don't know if the above should be modded flamebait or troll. There should be a "catharsis" mod, but I guess we have to work with what we have.)
This won't work. If people aren't willing to do the job, you can't force them through automation. Ever see a shop where they just adopted the practice of "all checkins must be accompanied by a change log"? 90% of the change log entries end up being "Fixed a bug." If the developers aren't willing to write unit tests, the need-a-test-to-checkin requirement is going to generate a lot of unit tests which unconditionally print "hello, world" and return success.
Peer review is probably the best way to enforce this kind of practice. Require that someone else reviews and signs off on the change. It doesn't have to be the project lead or anything like that. Just have another developer look it over to make sure nothing is missing, and is willing to sign his name to that fact. Very few people will take responsibility for someone else's blatant omission, so I doubt you'll end up with a lot of collusion to cheat the system. ("I'll sign your incomplete commit if you sign mine.")
And, of course, if you can get the peer to look at the actual substance of the change beyond just the format, you're way ahead of the game.
Now, I have to go write a unit test for a 2-line fix I made yesterday. (Really. Even though it annoys me to spend hours writing a test for something that took me 60 seconds to write.)
Chelloveck
I give up on debugging. From now on, SIGSEGV is a feature.
At my software company, we occasionally need all engineers to adopt a new standard or 'best practice.' Some are small, like the use of Camel Case for function names, while others have tangible business value, such as 'every check-in must be accompanied by a unit test.' As you might guess, some new practices get ignored, not because people are evil or lazy, but because they're simply too busy to pay attention and change their work habits. So we are seeking creative ways to announce, roll out, and enforce a standard for 100+ engineers so they will actually follow it.
With this attitude you have guaranteed that you will a) probably fail, and b) certainly make things worse.
Engineers generally want to do their work better. If they don't adopt your pet practice, then this means one or more of
- the practice is not as good as you think
- they don't yet see why the practice is good
- their workload is too high, leaving no time or enthusiasm for learning and exploring
- in the past you have done other top-down imposition that have undermined the morale and the sense of ownership needed for changes like this
Personally, I think managers should never be imposing practices at all. Engineers are better treated as professionals. You should explain the results you want, and ask what help they need in achieving it.For CamelCase, for example, you should let people responsible for a particular code base decide how to handle that. Give them the time needed to consider the issue, honor the conclusion they come to, and encourage them to check occasionally to see how they like the results of their decision and whether they want to change it.
For unit testing, requiring a unit test with every checkin is foolish. That's not because testing doesn't work; I use Test-Driven Development and have a bug-in-production rate of less than one a month. But by turning a useful practice into a bullshit requirement, you give them incentive for bullshit compliance and undermine trust. Instead,
- Ask for what you actually want: fewer bugs.
- Use a Big Visible Chart (yes, paper; yes, hand-drawn; yes, on the wall in a shared space where everybody will see it regularly) to make a bug metric visible.
- Ask the developers how to achieve your goal. Unit testing will be one of the answers.
- Ask for a team or project that would like to volunteer to try out unit testing and figure out how to make it work in your environment.
- Ask them what it will take to make that a reality.
- Give them what they ask for. All of it. No pressure, no whining about the cost.
- Come back weekly to ask them how it's going and what you can do to help.
The next typical objection is, "What if they ask for classes and books and a reduced workload so that they have time to learn this? That's unacceptable! Can't they just learn it from a couple of articles on the web with no productivity impact?" If that's what you're feeling, then the biggest barrier to adopting good practices at your company isn't your engineers, it's you.The poster above is dead-on.
That is all.
I really despise things like this.
Programing is art. I've heard so much about standardization, and i see zero benefits. I challenged our arcane non-vowelized database table naming conventions, and was told that's it's easier when everyone uses the same names. Umm, no. There are two reasons this fails miserably. One, it takes time to learn the standard, which noone remembers anyway without working with it for years. Two, the names are incongruous with coding style, and a second programmers will have that much harder of a time getting the "feel" for the design.
I say let each coder do his thing the way he wants to do it, and just demand consistency within his own code.
I remember being forced to meet one standard that i despised. So, i coded my own way and right before submission, i mangled the code to match the standards. I can't imagine it helped, being i was the one to maintain it.
Further, who are the standards for? The maintenance coder? The maintenance coder spends *far* less time on any code than the original coder. And, in most cases, the orginal coder *is* the maintenance coder. Why not let the coder do it his own way, and the maintenance coder, should it happen to be someone else, will spend five minutes learning the new style? Really, it isn't that big of a deal.
This whole thing of standards makes no sense to me. It's not like network interoperability from different vendors, or language barriers that require a known standard. This is people doing their own thing, and willing to help each other to get it done, so why not let them coder in their favorite style?
Have you read my journal today?
Camel Case? Is this some sort of ClearCase add on?
First, get some quislings. These will be people unsatisfied with the current status quo. Make sure they have conflicting interests and agendas, like, pick a developer who likes emacs and CVS and another than worships git and vi. Don't tell them about each other.
Next, get some enforcers. These should be brutal, ignorant thugs who like to hurt people. Underpay them and viciously insult them at every opportunity. Lead them to believe that the developers - and especially your quislings - are your favorites. Call the enforcers "The department of productivity enhancement" or something similarly beaureucratic.
Now, using information provided by your quislings, have your thugs brutally torture to death some example victims. (Remember, Machievelli says commit all your atrocities early.) It doesn't matter if your victims are actually guilty of anything, in fact it's better if they aren't, but try not to eliminate any key personnel. Let it be known that any "quitters" or "underachievers" will be targeted next.
Apologize profusely for your previous misjudgement. Let everyone know that you only intend to discipline people who really deserve it in the future. Blame the mistaken murders on bad information, provided by your informants (don't say who they are) and "rogue elements" in the enforcement group. Ostentatiously fire the least culpable and least effective enforcer. As soon as you leave the room, the chief enforcer will explain that "people who really deserve it" are those that do not follow coding guidelines, and "discipline" means waterboarding.
One week later hire an even more psychopathic replacement for the fired enforcer. Have the loudest complainer brutally murdered, but don't talk about it or admit having it done. Stare blankly at anyone who brings up the subject, then talk about the company christmas party.
Your developers will work like the very dickens, and do anything you want.
In my experience...
Shared-responsibility code works well. This is where one coder develops a function/class/module, but another developer debugs/enhaces it. It creates a consistant style, because everyone is working with everyone's code.
Allow a little bit of artistic freedom... If you're that uptight about code, have a pretty-printer run at checkin.
Avoid inventing a style guide when there are plenty already in use. For example, when I develop in C# with Visual Studio, I follow Microsoft's style guide and encourage everyone else to. That being stated, sometimes you need a style guide for egotistical morons who refuse to follow establsihed conventions in preexisting code.
It's easy to overdo unit tests an automated builds; ultimatly you need a developer who takes responsibility for the unit tests and build environment. I've been in such a situation before, and I had to occasionally crack a few kneecaps.
Fire developers who throw temper-tantrums when they refuse to follow the sytles and conventions of an existing project. Seriously, someone who can't adapt to different programming techniques is useless as a software engineer or a rank & file coder. (I had to put up with an asshat who refused to use GUIDs in a Microsoft database. His arguing put us behind schedule.)
Ultimatly, you need to trust your developers. Some things are worth getting uptight about, like consistant data access and indexing schemes, and others aren't, like tabbing.
No, I will not work for your startup