The Artima Developer Community
Sponsored Link

Let's Reconsider That
And Now.. Legacy Code
by Michael Feathers
April 4, 2005
Summary
The hardest part of writing a book is discovering that you can't read it any more. That's when you get scared.

Advertisement

A week ago, a friend of mine chided me for not having blogged my book 'Working Effectively with Legacy Code' (WELC). It was easy to tell him "No, I'm just not good at the self-promotion thing" but, thinking about it, I realized that there was also a deeper reason. The sad truth is, that the writing process got me to the point where I just couldn't write about the topic any more. I also could barely read what I'd written. You can only read your own words so many times before you just don't see them anymore. I remember talking to Martin Fowler at a conference just before his Refactoring book came out. I asked "So how's the refactoring book going?" and he answered with something to the effect that he couldn't look at it anymore. That's pretty much how I felt up until a month or so ago.

Anyway, I'm at the point now where I can read it, and I am going to do a lot more writing and talking about the topic, because I feel it is an important one even though it is hard to discuss. After all, who wants to talk about legacy code? What is it? Ancient COBOL? CICS? K&R C? Well, to me, legacy code is code that makes us say "eeeww... who did this?", even when the people responsible may be ourselves, days, months or years ago before we knew better. In other words, legacy code is code that we don't understand, code that is hard to work with.

The topic isn't as "cool" as MDA, .NET programming, or AOP. We don't get to imagine some pristine technological world where we are starting from scratch and all the problems get swept aside, it's just the sort of work that people can do day-to-day in existing systems to make them more pliable and easy to work with. Sounds like refactoring, doesn't it? Well, refactoring is involved, but most of what I've been writing and talking about is how to get portions of code under test so that you can refactor it or add new features safely.

A lot has happened since the book was published late last year. Like I said, I've had that period where I tried not to think about the topic, and I had a long period of self-doubt (when you can't even read your own words any more, it's very hard to convince yourself that what you've explained things well enough). Regardless, the book seems to be selling well and I've received some great personal notes in email (thanks). When I was at SD West a few weeks ago, during one of my visits back to the conference bookstore, the book seller said "Hey, I think you are my top seller." The next day the book sold out. The reviews on Amazon have been great. The book has been floating pretty high in the sales rank for a while. It dips down and then soars again, unpredictably. Brian Marick shocked me by calling the book one of the most influential computer books of the past ten years, JavaRanch gave it ten horseshoes and Gregory V. Wilson said, in a review in C/C++ Users Journal, "Working Effectively with Legacy Code is quite simply a great book. I've folded down more corners on it than any other book I've read this year..."

So, that's all the shameless promotion I'll do for the book here. It's hard to do because I see the little things I would change now, things I've learned since then, however I feel that I do have to push the book a bit. The term "legacy code" isn't very sexy and I want to make sure that the book gets in the hands of the people who need it the most.

Over the next few weeks, I'll be writing articles about various techniques that can be used in legacy code and I'll link them from here.

In other news, a good friend of mine, Brian Button has started a series of blogs about his experiences using techniques from the book, and I've gotten word my tutorials on WELC have been accepted by UML World in San Antonio and XP2005 in Sheffield, UK.

If you want to discuss issues related to the topic, feel free to post them here or join the WELC yahoo group at http://groups.yahoo.com/group/welc/

I'll be speaking at SPA2005 next week in Bedfordshire, UK on a completely different topic (coaching) but I am looking forward to side discussions about legacy code. Please say hi if you are there.

Talk Back!

Have an opinion? Readers have already posted 6 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Michael Feathers adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Michael has been active in the XP community for the past five years, balancing his time between working with, training, and coaching various teams around the world. Prior to joining Object Mentor, Michael designed a proprietary programming language and wrote a compiler for it, he also designed a large multi-platform class library and a framework for instrumentation control. When he isn't engaged with a team, he spends most of this time investigating ways of altering design over time in codebases.

This weblog entry is Copyright © 2005 Michael Feathers. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us