O'Reilly logo

Extreme Programming Pocket Guide by Chromatic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18. You Aren’t Gonna Need It

The phrase Chapter 18 is a reminder to do today’s work today and tomorrow’s work tomorrow. It’s tempting to work on future requirements, but it is risky to invest in features that may be necessary at the expense of features that are necessary now. Spending time and resources on one task leaves less time and fewer resources for other tasks. Implement only the features you need when you need them.

The temptation to build in extra flexibility comes from two motivations. The first is fear. Many software projects are brittle and inflexible. Dragons lurk in dusty, dark corners. A simple bugfix may have repercussions throughout the codebase. Practicing XP with discipline can conquer this fear. Your tests will allow you to make changes with confidence. Refactoring will keep your code flexible. Doing the simplest thing that could possibly work will produce understandable and changeable code.

The second motivation is the desire to work on “interesting bits.” Exploring the latest and greatest new library or fine-tuning a complicated new algorithm can be exciting. However, writing code for an unrequested and unscheduled feature undermines the customer’s business authority just as the customer mentally halving your estimates undermines your judgment.

Anticipating future needs is gambling. If the customer someday actually requests an unrequested feature, will it take the same shape as when you first thought of it? Will the customer even ever ask for the feature? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required