§ April 20, 2008 14:43 by
beefarino |
Another fear I'm seeing on the team is a fear of changing existing code. The fear may stem from several sources: the code implements complex behavior that is undocumented; the code is inherited from a resident expert who is retasked or otherwise unavailable; the code hasn't been maintained properly and reads like a plate of spaghetti. Whatever the source, a team member's response to the fear follows the pattern:
When team members are afraid, they will act in either their own interest of self-preservation, or in the interest of team survival.
When confronted with such code, a team member can choose one of two paths: they will choose to do as little with the code as possible, leave it alone as much as they can and still satisfy everyone's expectations; or they own up to the situation and remove the source of the fear, making the code easier for anyone to cope with and understand.
Those who pursue self-preservation take the former track. They exert a lot of effort to develop an understanding of the code, but don't do anything to persist or share that knowledge. Chances are they are trying to act in the team's interest by developing specialized knowledge of the code, but in the long-term they benefit only themselves. The code remains an untenable briar patch for the next poor sod who receives it.
Those who pursue the best interests of the team take the latter approach. They write unit tests around the existing code; they refactor the code and leverage the common design patterns to make the code comprehensible; they seek clarification from the business heads and write documentation targeted to other developers. Their actions are targeted, whether implicitly or explicitly, at communicating with the other members of their team.