Writing code is the most important practice in software development—very few projects can succeed without writing code. Most of the time and energy devoted to a project are concentrated on producing code. Consequently, XP is very much concerned with code.
The code is the most important artifact of the project—without it, the project does nothing. It is the final authority on how the system actually behaves. As a developer, code is your business. This focus worries many people, who fear that XP is the domain of cowboy coders who jump headfirst into hacking without planning. This is not the case. XP uses working code to validate and to evaluate its plans. The four coding practices work together to produce code that is easy to maintain and extend and is always ready to be delivered to the customer.
Goal: to produce software that’s easy to change.
Code and design simply. Solve the customer’s current need. Resist the urge to guess at future needs, whether you’re designing the next feature or coding it. XP has three rules that govern simplicity: Do the Simplest Thing That Could Possibly Work, You Aren’t Gonna Need It, and Once and Only Once (these are explained in Part VI).
Flexibility is the goal. Simplicity is the means to that end. Simple designs are easier to understand and to explain. Simple code is easier to test, maintain, and change.
XP spends comparatively little time creating designs before writing code, preferring ...