April 6, 2009

Motivating Others to Clean the Campground

I wrote about my goal of incrementally cleaning up the codebase I work on and leaving it in a better condition than I found it.   My old boss commented on the post, asking how others can be motivated to do the same. 

Well for one, get to the new programmers early.  Have the experienced programmers show them good habits for writing and maintaining code, and hopefully they will adopt at least some of these habits as they learn from the experienced ones. 

But what about motivating experienced developers?  This isn’t as easy.  Having management enforce this practice will probably be ineffective (plus you might have a hard time convincing management of the importance of cleaning up code).   Instead you need to develop the team so that they display the following two qualities, which I think lie at the heart of wanting to continually improve code:

  1. The developers must take pride in their work; and
  2. They must be held responsible for the entire codebase

At the end of the day, I want to feel good about the work I did and have it serve as an example to others.  Furthermore, I really like the company I work for, and I want to do everything I can  to ensure that we make quality products that satisfy our customers.  Thus I’m happy to make the extra effort to improve our codebase.   When you take pride in what you do and the code you write, you want to clean it up and continually make it better.

Programmers will also feel motivated to improve the codebase if they are responsible for its entirety.   You can’t have certain people own just certain features.  Every programmer has to feel accountable for all of the code.  They can’t feel like they can work on one part for a little bit and then forget about it and move on to something else, or ignore quality concerns because that is QA’s responsibility.  Every programmer needs to be granted the ability to modify any of the code (with the appropriate amount of review as necessary), but granting this ability comes with the expectation that every programmer is responsible for the performance and quality of the codebase as a whole. 

One thing that I think fosters these qualities is to place the programmers closer to the customers.  When programmers are close to the customers, they can see tangible reactions to their product, allowing them to gain more pride in their work and a stronger sense of responsibility to the customer.  But in general, anything management can do to make developers proud of their company and the work they do, as well as make them feel responsible for the entire software product, should help motivate developers to continually clean their code.

0 comments:

Post a Comment