CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

Classic Technical Lead Blunder

A couple days ago I saw a post (EDIT:  the post was removed) relating a depressing situation that sounded sadly familiar to me and I have to respond.  The author relates a story of getting to the end of a time-constrained project and realizing that the other developer’s code is bad.  I can easily relate to the author’s plight because I’ve been in the exact situation at least twice.  My diagnosis for both the author's current project and my past experiences is simple.  The technical lead (me) failed to lead the technical effort.

 

My problem was that my first official developer job was in a completely dysfunctional organization.  That’s actually a mixed blessing in a way.  You can get more opportunities because it’s easy to stand out, but it stinks in the long run because you don’t get to learn the right way to do things very often.  I was by far and away the most productive coder and the guy with the design vision, but I didn’t know squat about leading or coaching other developers (plenty of people will say I still don’t).  I was forced (ok, I basically seized the role when nobody else was looking) into a technical lead role on my very first significant project.  I’d never had any role model for being a technical lead, much less a good role model.  I made the typical blunder that many first-time technical leads do.  I put the headphones on and hunkered down with what I thought were the most difficult pieces of code and did them.  I gave the other developers what I thought were easier tasks and generally ignored them as much as I could. 

 

I answered questions here and there, but I wasn’t that involved with their coding.  When I finally got around to looking at their code I often didn’t like what I saw.  I rewrote several pieces of their code behind their backs at the last moment.  I essentially wasted the efforts of the other developers.  Two of the developers was truly incompetent but the other two were bright folks that had even less experience than me.  One of the developers was so bad that I started calling him the “Canary” when the “Reduction in Force” rumors started when the tech industry crashed in 2001.  The project was very successful, but could have been much less stressful if I’d invested much more time into the other developers.  They probably would have gotten a lot more out of the project, too.  One of the reasons I think that shop was and is so bad is the complete lack of coaching for technical folks.

 

Losing Strategies

  • Drive by shootings -- I mean code reviews.  I’m sure code reviews are useful somewhere, but I’ve never been in one that wasn’t either a complete waste of time or a source of resentment.  Relying on code reviews to catch bad code after the code is written is inefficient and just plain stupid.  Code reviews can easily turn into a case of the prosecution versus the defense.
  • Poor or infrequent communication between the technical team members.  On a couple of occasions some of the developers on my team were on the other side of a cubicle farm.  Co-locating a technical is a no-brainer.  I wonder how much inefficiency exists in large IT organizations where they don’t co-locate development teams.  Technical documentation like design specs are a poor form of documentation.  The only good thing about technical specs is that they’re more durable than a conversation.  Tossing specs over the wall to a development team and walking away doesn’t work.
  • Detailed work assignments.  My experience has been that feeling is that the more detailed work assignment you give another developer; the crappier code comes back to you because they will mechanically implement your design without thinking.  I’ve got a case of this on the system I inherited when our very bright boss gave some specific design advice to the team building the system that this team followed without question.  The advice wasn’t necessarily bad, but there were definitely simpler alternatives to what was built. 
  • I design, you just code.  Even before I had ever heard of XP I always believed that coding, design, and architecture are too interdependent to be done by separate people.  Developers can internalize a design strategy better if they contributed to making the design strategy.  Over and over again I’ve found that it just doesn’t work to give someone a detailed design without a lot of verbal and whiteboard communication.  I think there’s also an issue of developer pride and ownership.  I think coders do a better job when they feel some sort of ownership stake in what they’re coding.
  • Ignoring the other developers to concentrate on my work.  I have to constantly remind myself to focus on the team’s velocity as opposed to my velocity.  I still think that I’m most effective early in the morning when I’m heads down into code with zero interruptions, but that doesn’t help the other developers.  It’s not just a matter of trusting the other developers – but that is often an issue.  It’s also about talking over the design, looking for duplication, and creating a shared vision.

 

Winning Strategies

  • Involve every developer in the design work.  Over and over again I’ve found that developers have a better working understanding of a system’s design when they’ve been involved with creating the design.  Many agile practitioners are hostile to design sessions because of a fear of speculative design or an assumption that it’s jus wasting time (but the agile community is also mellowing in recent years).  I think design sessions in front of a whiteboard with the team is a create way to get the team on the same page.  Most agile projects involve a “tasking” activity to break down user stories so they can be estimated in iteration planning.  The “tasking” meeting is essentially a design meeting.
  • Pair programming has been very effective in my experience for communicating design knowledge throughout a team.  It’s also a great mechanism to coach other developers.  Pairing can be used as an ongoing code review to eliminate problems more rapidly without the nastiness of a formal code review.  Bad coding practices can be caught very quickly.  On a project last year most of the other developers were Java and GUI guys that hadn’t worked with database or persistence code very much.  Because we were pairing I noticed that they weren’t attending to connection hygiene very well.  I caught the issue very early and explained why it was important to manage database connectivity.  Waiting for a formal code review a couple months into the project to read other people’s code would have allowed that problem to fester.
  • Collective code ownership.  Nobody works in a silo.  Every developer, at least in a small team, should have some visibility into the entire codebase.  Determining and enforcing best practices can be a lot easier when people are rotated through the code.
  • Think out loud.  This is purely an exhortation to me because I never do this well enough.  If you’re one of the primary people doing design on project, talk about your design thoughts all the time.  Involve your teammates as much as possible.
  • Coach the other developers.  If you’re the senior most developer your most important contribution may be the coaching you give other developers, not necessarily the code you write.  Helping other developers is an investment in your team and organization.  Besides, they undoubtedly have something to teach you too. 
  • Co-location of the developers and the rest of the team.

 

 

You could easily argue that the ability to communicate ideas to other developers is one of the most valuable skills a lead could possibly have.  I don’t think anybody can be a technical lead without good technical skills, but not every strong developer is fit to be a lead.  Heck, I’m the veritable poster child for this.

 

Of course, you’re always going to have trouble if the ratio of “needs coaching” to “able to coach” gets too high.  The idea that all you need is one smart guy on a project to tell everyone else what to do is a nonstarter in my book.  No process or goofy accreditation effort, be it wild-eyed XP, UML out the wazoo, Six Sigma Ninjas, or CMMI Level Umpteen, is ever going to change the fact that producing good software requires good people.  Some people want to be the bright shining star of an organization, and the easiest way to do that is work with bad people.  I’ve gotten to work on a couple of very strong teams at both my current and previous employer.  That’s been vastly more fulfilling and less stressful than being “the” guy on a weak team. 



Comments

DawlinLi said:

the original link to the "post" is bad, can you fix it?
# September 23, 2005 1:05 PM

Jeremy D. Miller said:

The post in question was removed.
# September 23, 2005 1:27 PM

DawlinLi said:

The interesting part is that I am in the exact same situation you were in when you first got your official developer job.

I am in my official developer job right now (just graduated from college last year) and it's also a mess :D.
# September 23, 2005 3:50 PM

Jeremy D. Miller said:

You gotta get you're foot in the door somehow. "Messed up" is pretty well situation normal.
# September 23, 2005 4:24 PM

Joel Ross said:

# September 24, 2005 12:18 AM

Joel Ross said:

# September 24, 2005 12:18 AM

Thomas Williams said:

G'day Jeremy, thanks for this informative post. It makes a great read - it's always good to learn from others and hear some of the "war stories", but it's even better to see some intelligent reflection and tips, as you've provided here.

Cheers,

Thomas
# September 26, 2005 1:39 AM

Jon Rowett said:

just to add to the general noises of approval - fantastic post. thanks.
# September 26, 2005 6:57 AM

Harris said:

Jeremy,

The AppDev group I work in, unfortunately, has to be very numbers-oriented right now; how do you bill pair-programming time? Obviously, an Agile team bills differently than a waterfall team (which we are...sigh...), but I would appreciate to hear your thoughts on either, or both...

Thanks,

H
# September 26, 2005 4:52 PM

Christopher Steen said:

.NET Master Class in Reston, VA [Via: gsnowman ]
.NET Rocks Comes to Town [Via: gsnowman ]
[.NET...
# September 26, 2005 10:17 PM

Jay said:

An interesting view point and I agree with most of it. The only thing I have a problem with is your view of code reviews. I think that the kind of response that you portray is more indicative of the participants than the practice. Code review should not be perceived as some sort of kangaroo court. It should be seen as an opportunity to learn from one's mistakes and figure out new and interesting ways of doing things. I've seen some very indignant responses to code reviews, but I have to say, that is usually based on the coder deciding that they are god's gift. If all parties involved carry out the review in the way in which it is meant to be carried out, I can't see how it can be problematic. Just my opinion based on my experience of being on the receiving end of code reviews and what I got out of it. I always learn from them.

Jay
# September 27, 2005 8:26 AM

Jeremy D. Miller said:

Jay,

Thanks for your comment. My negativity towards formal code reviews is strictly based on bad experiences in the past. I'd still rather lean on pairing or more informal peer reviews than the heavier formal code reviews. I think constant pairing and iteration retrospectives accomplish the same goals as code reviews in a more pleasant way.
# September 27, 2005 9:00 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Between being extremely short handed at work, tech' reviewing a new book, a
possible book proposal...
# August 7, 2006 4:51 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Between being extremely short handed at work, tech' reviewing a new book, a possible book proposal

# September 1, 2006 2:33 PM

Jeremy D. Miller -- The Shade Tree Developer said:

In a post last week I talked about the Anti Team . It was sarcastic, snarky, negative, and generally

# January 29, 2007 11:05 PM

Jeremy D. Miller -- The Shade Tree Developer said:

To everybody that attended one of my talks at DevTeach this week. All of the materials are now online

# November 29, 2007 12:03 PM

Jeff said:

Just read this post and am amazed at how similar it is to my situation.  Came into a crap situation, seized the lead role thinking I could fix things.  Now a little while in, and I've been stuck in the 'losing strategies'.  Worst thing is, I've been aware of it for a while, but inertia is hard to overcome!  Great post.  I'm working on eliminating those losing strategies, and moving to the winning strategies.

# December 4, 2007 1:30 AM

ActiveEngine Sensei said:

@Jeremy Great post.  The juxtaposition of losing and winning strategies is good.  Your point that you need to fight the urge to not trust the team is one of most challenging parts of being a lead for the first time.

@Jeff  Above all the qualities that you will need will be honesty, integrity and patience.  But for the new coders out there, take from someone who has been beaten up by the worst and the best, you'll find this situation where you inherit someone else's bad code / sloppy work to be the norm.  

Mostly that is fostered by the business units not caring about how you do what is important.  Many times you'll find that the person who created the mess that you're stuck with was LOVED by the customer / business unit because he / she gave them what they wanted instead of what they needed.  As a leader, you will need every ability at your disposal to communicate this back to the customer in their terms.  Now you have discredit someone who, in their eyes, was a great asset to them.  

# December 4, 2007 7:14 AM

technical lead said:

Pingback from  technical lead

# June 4, 2008 8:44 AM

Bil Simser said:

@Jeremy: I'm torn on the code review comment. I frankly don't like sitting in a meeting for more than 15 minutes (our Scrum limit) and an hour (or longer) wallowing through code doesn't seem to be condusive to a healthy collaborative environment. Most of the time it's "this is bad", "this needs work", "why didn't you try this". All good suggestions, but sometimes never even implemented due to cost concerns (another issue). However, with peer reviews you run the problem of the team. On a small Agile team of say 4 devs (2 senior, 2 junior paired) your gene pool quickly empties out as the senior guys are always reviewing the junior guys and you're left with 2 peoples opinion (or sometimes 1). Not sure how to resolve that and pitch the code review free zone to my client as a result of that (situation I"m in right now). A good discussion to have (psst, come up to Canada in August for some good ALT.NET'ing)

# July 2, 2008 11:48 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP