The Artima Developer Community
Sponsored Link

Let's Reconsider That
The Bar is Higher Now
by Michael Feathers
April 2, 2004
I don't care how good you think your design is. If I can't walk in and write a test for an arbitrary method of yours in five minutes its not as good as you think it is, and whether you know it or not, you're paying a price for it.


I'm convinced that there is a chasm in the industry and it's getting wider.

I'm tired of seeing design that is brittle and hard to change. I'm sick to death of seeing people groping through their code, trying little things and then building the whole system so that they can run it manually and see if it does what they think it should do.

You think your design is good? Pick a class, any class, and try to instantiate it in a test harness. I used to think that my earlier designs were good until I started to apply that test. We can talk about coupling and encapsulation and all those nice pretty things, but put your money where your mouth is. Can you make this class work outside the application? Can you get it to the point where you can tinker with it, in real time, build it alone in less than a second, and add tests to find out what it really does in certain situations. Not what you think might happen, not what you hope might happen, but what it really does?

That's where we are in the industry now. Some teams can work with their classes that way. Others can only work that way with a small percentage of their classes. And, if you ask them whether they'd rather work in the code without unit tests or the code with them, the answer is clear. You can simply work faster when you your turnaround time is faster. Your steps can be more sure when you know what the effects are.

People who know me, know I'm a rather quiet guy. I don't shout about too many things, but frankly I think there is just too much at stake in the software industry right now. If you haven't seen the difference there is in working this way, you need to. The bar is higher now. Best practices have gotten a whole lot better in the last five years. Don't tell me your design is good when I see you struggling.

Talk Back!

Have an opinion? Readers have already posted 25 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 © 2004 Michael Feathers. All rights reserved.

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use