Why Extreme Programming (XP) Matters More Than Ever in the Age of AI
Extreme Programming (XP) has many benefits. Are they still impactful to delivering a quality product in the age of AI?
Software development can be a turmoil of ever-changing variables. Requirements, technology, people, financials, direction of the industry—these are just a small part of a machine that has few constants. How we respond to change is a significant indicator of success on a personal, project, organizational, and industrial level. I will primarily focus on the project level in this post, but I think it’s important to get the gears turning on having larger discussions around change, especially at what I consider to be the inflection point of AI.
How do we bring structure to chaos on a project? We select a SDLC (Software Development Life Cycle) methodology. While there are several of these that deserve their own discussion, I have spent years alternating between Waterfall and Agile approaches to building software, with Agile being the most prominent. I haven’t experienced any true Waterfall projects in recent years due to it being regarded as an older practice—for good reason. Waterfall expects complete definition of each stage of the project and approaches them in a linear fashion. A team will start with original requirements, and finish with a production release that implements those requirements.
The software development life cycle is anything but linear. Things change—but how do we respond to that change? How do we demonstrate and deliver value to the client or customer sooner rather than later? How do we split up the work into potentially shippable chunks? The Agile methodology solves this and even more. Since there’s too much to cover regarding Agile to condense into a single blog post, the following should set the foundation for what comes next. Agile itself has multiple methodology types, each unique in its definition and often mixed and matched (e.g., a team can follow Scrum and also implement XP). We are focused on one type in this post—Extreme Programming (XP)—and how it holds up with new AI-infused developer workflows.
While XP inherits many Agile benefits of building software through feedback and iteration, it’s unique in its focus on collaboration and knowledge sharing. I make an assumption in this post that the reader has a bird’s eye view understanding of Agile as I’ll be focused on XP and its nature as a highly test-driven, collaborative sub-methodology and how AI affects it.
Two unique XP practices are rigid TDD (Test Driven Development) and Pair Programming.
TDD is highly methodical in how the developer implements their code. A developer begins by looking at the big picture of the problem they’re solving. Then they break that problem down, and then they break that down further, and then—they write a test for a small piece of functionality. The developer will then write some code to ensure that what they assert in the test passes. Then they will do some incremental refactoring to keep the code clean and finally begin the process again.
This, in my view, is a way to approach software development as a true craft. Small building blocks that a developer can conceptualize and repeat until they have a complete understanding of their system. A developer knows exactly what to expect and why something was implemented a certain way. AI has significantly increased the rate of delivery for developers, yet it has also made it easier to introduce pesky bugs into the codebase that become more difficult to track down over time. This can be due in part to how a developer uses an AI tool, especially if the agent modifies a large amount of files at once or does not use a standardized instructions README. This potentially leads to unfamiliar implementations for the developer. The developer must then refactor code that they don’t fully understand, potentially missing important details and learning opportunities. TDD addresses this issue at the root by ensuring that the developer understands their code like a gardener understands the process of planting a seed, nurturing it and evolving it into a beautiful flower.
How do we use the benefits of AI and TDD in tandem? AI is very useful for helping provide test cases in plain language. The developer can then analyze the output and follow TDD to write the test, write the code, and then refactor. This way TDD remains the focus of how a developer implements their code, meanwhile AI can help ensure that tests are small and actionable. I personally find the ‘Ask’ option to be the most useful as I practice this since it allows me to have more control over the output before implementing. AI can also be a great way to approach the ‘refactor’ step, as it can be good at simplifying an implementation or reducing the amount of code present.
Another important aspect of XP is the practice of Pair Programming. There is a big question in the software development community that I have personally witnessed on several occasions. It goes something like this: “Given that AI complements any proficient senior developer—what’s going to happen to the need for junior developers? How are there going to be more senior developers if there are no junior developers?”
Proper implementation of XP has been a great boon for junior developers, as they’re able to learn from senior developers through pair programming. There are more knowledge transfer opportunities across the team because of the cross-training happening daily. Team members gain exposure to areas of the code they were unfamiliar with more frequently. While the junior developer can still use AI, the senior will be able to offer additional context or point out potential bugs and explain why they would occur. Two developers can also compose better agent requests, review the produced code with greater effectiveness, and discover more teaching opportunities. Additionally—organizational knowledge transfer is very important, and this practice can keep the machine well-oiled!
Does Extreme Programming still have its place during the inflection point of AI? While AI certainly assists with faster delivery, XP ensures that we understand what we are building. TDD keeps developers intentional in their implementation, while AI helps them explore edge cases. Pair Programming in tandem with AI can help foster a more collaborative development environment with more teaching moments and offer greater knowledge sharing. Perhaps there’s a better question than the one I posed initially: “Why isn’t XP implemented more frequently in conjunction with AI-assisted development?” XP’s principles, which include rigorous testing and continuous feedback, are not relics of a world before AI existed but rather act as guardrails that we need right now more than ever.