Tuesday, August 21, 2007

Coding Horror: Leading by Example

Coding Horror: Leading by Example

I read Dennis's story and just had a flashback to some "olden days", FTA:

I was recently brought in to help a software team get a product out the door, with a mandate of helping with some web app code. I've been trying my best to integrate with the team, trying to earn some credibility and respect by making myself useful.

I've been forwarding various Joel On Software essays to all, recommending that the office stock up on Code Complete, Peopleware, and The Mythical Man Month, and I make an effort to point out everything I believe could be done better. I regularly browse through the source repository to find ways that other members could be working better.

When other developers ask for my help, I try to maximize my input by broadening my assistance to cover the way they're developing, how they could improve their typing form, what naming standard they use, to advocate a better code editing tool, and to give my educated final word regarding the whole stored procedure/dynamic SQL debate.

Despite all of this, I keep facing resistance, and I don't think the team likes me very much. Many of my suggestions aren't adopted, and several people have replied with what I suspect is thinly veiled sarcasm.

What's going wrong?

Well, I'd start with the fundamental problem: People are resistant to change. Inertia is not just a physics concept it's a people concept. If you are asking a team to change in any way, they won't like you very much.

Dennis is working from the fundamental concept that his teammates are actually interested in becoming all-star programmers. From the sounds of it, Dennis is fundamentally wrong. He's probably right, his team probably doesn't like him b/c he's making them look quite bad. But that's OK, most programmers don't want to be all-stars, that's just the way it is. I work with a team that has some star programmers, but goodness knows that they don't read the magazines we have sitting around, nor do they visit the boss's extensive library or follow blogs like Coding Horror or Hanselminutes. They care, but not quite that much.

What really makes things worse for Dennis is that he has years of doing the stuff that makes an all-star programmer. Excellence is a habit, it's not some sudden burst of inspiration. Even the geniuses with seemingly sudden bursts of inspiration have generally built that up with their daily activities. Dennis has more suggestions than even the dedicated can reasonably perform in a year. I mean, just reading Joel Spolsky's books and Code Complete and Peopleware and Mythical Man Month, that's like a 6-9 month journey.

Even if you could physically read all of those books in 2 weekends, you need months of work-time to actually process and apply that information. Dennis here was brought in to save a project and is probably making good money to do so. If he wants to make a better team, he'll need management's approval for some Professional Development time during 9-5 and he'll need a specific plan of action.

Creating an all-star programmer takes months and years, not weeks.

So you can do three things:
  1. Accept that people don't like being one-upped from their "comfortable" positions, especially the types you find in big corporations or union positions.
  2. Find a way to improve morale first so that people want to learn out of pride rather than being forced to learn out of shame.
  3. Ensure that management respects and supports your efforts and that you're making way more money than the "unwashed masses".
After that, just do what you do best, you can't replace great programmers.

2 comments:

Mr. Cheap said...

WRT to #1, part if it might actually be that they don't UNDERSTAND the person is showing them a better way to develop software. I'm always amazed of the pure ego programmers seem to have and the willingness to say "whatever arbitrary way I decide to do something is the one and only proper way to do it and everyone else is an idiot". Your all-stars are the people who happen to do things right naturally, or they have their egos in check enough to learn and apply (as you suggest).

WRT #2 I think one of the ways to acheive this might be to compliment the team and the developers on "how great they are at doing thing the proper way" (even when they aren't). Apparently one of the best ways to get a group to do something is to praise them for doing it, they become vested in that praise and their identify of doing it well, ad then actually move more in the direction of doing it (the classic experiement is where different grade 4 classes are critized for being messy or praised for being neat - the "critized" classses don't change, but surprisingly the praised classes become neater).

WRT #3 This would require a pretty smart aware person. You don't talk to many managers do you ;-). (that is, this might happen in a small shop, but good luck in a big corporation or a government office).

Gates VP said...

Point #2 is right on: morale = positive reinforcement, my favorite method

As to point #3, I've actually been the "manager's bane" pretty much everywhere I've worked. They all love me b/c I get stuff done really well and hate me b/c I make them do their job.

When my government contract needed new documents written I asked them for templates or required information and then simply went off and grabbed my own when nothing materialized. Everyone knew the templates were mine, b/c I had to teach them how to use Styles in Word.

So the government managers may have resented the imposition of my methods, but they really had nothing to fall back on. Truth is, most of the under-trained government staff resented me b/c I came I was some 24-year old hotshot who knew what was going on.

I can be an arrogant bastard sometimes, but these workers all feared for their jobs and recognized that their skill sets were wholly inadequate for the world outside government. So really any ego on my part was causing fits. I suspect that Dennis is feeling the same thing, except in his case, he's actually being paid for the specific training (that was just a side benefit in my case).

At the end of the day though, a guy like Dennis is relying on Management to cut him a cheque, so getting Management buy-in is a big CYA (especially in big business).