Why you should adopt Extreme Programming practices?
Extreme Programming (XP) practices might seem too extreme for junior developers and for those who are on the business side of an organisation. Encouraging merciless refactoring, comprehensive testing, collective code ownership and pair programming among other practices; itβs been often seen as an engineering-centric approach that brings more value to developers than to business.
- So why would you work in pairs on the same task?
- Do you really need to write a test before every code change?
- Should we spend time on refactoring instead of building more new features?
These are the questions that you might hear from managers in a feature-factory setting or even in more enlightened organizations.
While benefits gained from practicing XP might not be obvious for business decision makers, many development teams eventually are likely to mature and come to some of the XP practices naturally or with a help of a software craftsperson driving change from inside the team.
Some [developers] may even be lucky enough to find themselves doing Extreme Programming, also known as βThe Scrum That Actually Worksβ.
Ron Jeffries, βDevelopers Should Abandon Agileβ, May 10, 2018
Since XP is rarely used as the only agile methodology and with its adoption rate of 1% according to the Annual State of Agile Report; organisations tend to combine XP with prima ballerina of Agile frameworks β Scrum.
So what are the core XP practices and why you should adopt them?
Kent BeckΒ developed XP while working on a payroll project atΒ CryslerΒ andΒ described its core practices in his first bookΒ Extreme Programming Explained,Β published in 1999 almost two years prior to theΒ Agile ManifestoΒ creation.Β The practicesΒ heΒ recommends adoptingΒ are:Β Β
1.Β Simple code and design
Simplicity is the means to flexibility and building software thatβs easy to change. Beck suggestsΒ thinkingΒ about the questionΒ βWhat is the simplest thing that could possibly work?βΒ to achieve simplicity and eliminate unnecessary cumbersome features that complicate the system.
2.Β Refactoring
Refactoring might seem like a fancy technical term but essentially it means redesigning existing code without changing its behaviour. Why do you need to redesign something that works?Β To find codeβs optimal designΒ and contribute to simplicity.Β Β
3.Β Coding standards
Code as any form of language has its specific conventions thatΒ help developers to communicate within the project. Well-defined coding guidelines facilitate communication through code and save time.Β Β
4.Β Common vocabulary
Common vocabulary and a memorable metaphor toΒ describe a feature or a system help to clarify and explain complexΒ technicalΒ conceptsΒ in ground-to-earth ideas.Β For example, describing yourΒ systemΒ as aΒ Lego setΒ and how different components are assembled and connected toΒ make everything work together can be aΒ resonant image.
5.Β Test-driven development
Test-drivenΒ developmentΒ advocatesΒ creating a testΒ beforeΒ writing codeΒ per each unique component of the system.Β In doing so,Β itβs possible to identify problems at early stages, validate that the current code is enough to implement the required feature andΒ feel safe to introduce changes.Β
6.Β Pair programming
Working in pairs helps to share knowledge and experience within the whole team, while positive peerΒ pressure tends to promote codingΒ standardsΒ andΒ good programming habits.Β Programming in pairsΒ also contributes to creating a sense of collective code ownership and teamwork.Β
7.Β Collective code ownershipΒ
When the entire codebase belongs to the whole team rather than when specific areasΒ belong to specific individuals, there is aΒ smaller chance ofΒ creating a βsingle point of failureβ.Β Adopting collective code ownership along with pair programmingΒ prevents team members from developing an attachment toΒ an individual subsystem or feature rather than toΒ the entire product.Β After all, people do needΒ holidays, takeΒ sick leave and occasionally leave companies.
8.Β ContinualΒ integrationΒ
ContinualΒ integrationΒ presupposesΒ merging working code into the main repository as soon asΒ itβs completedΒ toΒ keep an environment in an up-to-date, releasable state.Β Small, incremental changes reduce the impact that dramatic, large changes might haveΒ and help to keep everyone on the same page, working with the freshest version ofΒ an application.Β
9.Β Customer in the team
A real customer in the team or someone representing a customerβs voiceΒ (i.e. Product Owner in Scrum)Β provides a business perspective and addresses business concerns proactively with the team.Β TheΒ βcustomerβΒ is responsible for the projectβs scope, which is a set of features the team would deliver.Β TheyΒ writeΒ story cards that describe required featuresΒ in a sentence or two and prioritiseΒ them for development.Β Β Β
10.Β Planning game
During the planning game,Β aΒ customer and the teamΒ determineΒ their scope for the next iteration.Β TheΒ customer comesΒ up with prioritised story cards and the developersΒ produceΒ estimatesΒ in the form of an imaginary unitΒ (akaΒ StoryΒ PointΒ in Scrum).Β DevelopersΒ thenΒ createΒ task cardsΒ that present the actual development activities needed toΒ implementΒ story cards written by the customer.Β
11.Β Regular releases
AΒ release should happen at the end of each iteration β from one toΒ four weeks. Frequent releases enable the customer to return onΒ theirΒ investment quickly and get feedback from end customers in shorter cycles.Β
12.Β Suitable pace
Pushing your limits, overtiming and working 60-80Β hours a weekΒ mightΒ seem productive inΒ aΒ short term but leads to burnout andΒ fatigue in a long run.Β XP, much likeΒ todayβsΒ mindfulnessΒ gurus,Β believesΒ in a work-life balance, finding your suitable pace and level of productivity, and loving yourself.Β
Whatβs next?
These 12 extreme programming practices rely on and support each other. The list is robust and might seem overwhelming, especially since XP advocates forΒ adoptingΒ all ofΒ theΒ practices.Β ShouldΒ you adopt all of them or just give upΒ on XP as it requires too much time and discipline to implement?Β There is no binary answer.Β As the practice shows,Β you can still see great benefits with only a few practicesΒ in place. After all, Agile is aboutΒ beingΒ agile and finding what works best for you and your teams.Β Β
Kateryna Novozhylova
Hi! I'm Kateryna Novozhylova, co-founder at Fractional Teams. I write about product, marketing and tech.