Home > Articles > Programming

  • Print
  • + Share This
This chapter is from the book

Simple Design

Most software architects would agree with simplicity of design as a foundational tenet. But what is simplicity, and how do you achieve it? XP has a very clear definition of what simplicity means:

  • Runs all the tests

  • Contains no duplicate code

  • States the programmer's intent for all the code clearly

  • Contains the fewest possible classes and methods

Critics claim that XP is weak in design as it lacks a design phase. The difference between XP and Waterfall is that with XP there is no big design up-front or BDUF. In the world of Agile development, viewing design as a one-time event is simplistic and narrow. BDUF is too frozen, static, and doesn't allow for the reality of real-world change, ultimately locking in development. The thinking in XP is that design is a continuous process that happens at both the conceptual and physical levels. This makes perfect sense when you consider the change is a given in XP and we're never quite sure what is around the corner.

As XP developers we're building and designing things that are as simple as possible, doing all we need today. The tendency to add in features "just in case" is more likely to result in spaghetti code than delaying design. As you get more familiar with XP you'll come across some new acronyms and sayings such as YAGNI. YAGNI stands for "You Are Not Going To Need It," and in essence means don't add anything because you think you might need it. Chances are that you won't and you wasted time either solving problems that don't exist or adding features that no customer is paying for! To develop with restrain could be one of the hardest things to learn for developers who are new to XP. Only do what you need to do now.

  • + Share This
  • 🔖 Save To Your Account