Logo

dev-resources.site

for different kinds of informations.

What DevOps Engineers can learn from Extreme Programming (XP)

Published at
10/8/2019
Categories
devops
xp
testing
ci
Author
johnnystarr
Categories
4 categories in total
devops
open
xp
open
testing
open
ci
open
Author
11 person written this
johnnystarr
open
What DevOps Engineers can learn from Extreme Programming (XP)

Alt Text

Is it a stretch to say that modern day DevOps folks can learn something from a bygone movement? Absolutely not. Although XP has a bad reputation for some specific reasons, it contains some principles that are of value to us today in 2019.

YAGNI

This acronym stands for "You aren't gonna need it". This is one of the pillars of XP. It makes the assertion that you shouldn't spend time on components or features that you might need down the line. In modern development languages like GoLang, we see the application of this principle is inherit in Go's design. A practical example of this, is Get/Set methods not being idiomatic. For purest Java DEVs, this can be troubling at best. Yet, modern platforms such as Kubernetes and Docker we're written in GoLang. A cursory review of the source-code on Github reveals that the engineers hardly follow a dogmatic OOP standard.

I can't say how many times I've tried to implement code for my systems that "I might need later" only to realize that new technology has lapped us yet again. This can be frustrating, as you never seem to get to the gold-plating stage. If we are able to apply YAGNI, we can save valuable time and effort. But what happens when the time comes to make the changes? Simple, we refactor.

Continuous Refactoring

Refactoring is often neglected in the DevOps realm. This is because that "Ops" portion of your title is always going to be concerned about stability. And lets face, we're feature oriented. At the same time, many engineers fail to understand what "refactoring" truly means:

Code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. - Wikipedia

One of the misunderstandings is that "refactoring" gets confused with "gold plating" or new features. Instead, our efforts should be on the following:

  • Optimization
  • Increased Readability
  • Increased Maintainability
  • Documentation

Test Drive Development (TDD)

So let me be clear: You cannot continuously refactor without continuous testing. If you change your code often without tests, it will lead to unmanageable code and defects. This can be challenging for engineers who "haven't gotten around to writing tests yet."

TDD ensures that you write your tests, because it requires that you write them first! TDD works like so:

  • Write a test for a unit of work
  • This test will automatically fail because this code does not yet exist
  • Write the code to pass the test

I have found TDD to work well with IaC projects such as Chef, Puppet, Ansible and friends.

TDD is not synonymous with XP, but it was largely embraced by it.

Peer Coding

Ok, this one is very controversial. I've heard many arguments about the practicality of a group of developers attacking a problem all at once. Like all things, you don't have to follow XP to perfection to get some benefit out of peer coding.

Working with distributed teams can be a challenge, but you shouldn't have to wait until you open a PR to have someone else take a look at your code. I have found that 1-2 hours a week can be well spent in an interactive screenshare session. Remember that diversity is great for problem solving. Having more than one mind solving an issue will unlock potential in all involved. In my opinion, the best possible scenario for team building, is team coding!

Final Thoughts

I'm sure there's still folks out there that love XP and use it daily. As a DevOps engineer, I'm fascinated with Dev practices and better understanding the platforms that others have built in the past. I strongly believe that each methodology is built on principles that have their place in the modern world. There is a lot more to XP than I've covered, and I don't claim to be an expert. I just wanted to share what has worked for myself and my team.

xp Article's
30 articles in total
Favicon
My Favorite Quotes in Extreme Programming
Favicon
Extreme Programming Meets the Cloud: How Serverless Would Have Been XP's BFF
Favicon
Regra 4: A generalização demanda três exemplos
Favicon
Renaming Bugs as "UnWritten Test Cases"
Favicon
AI-XP Unpacked: Integrating AI with Extreme Programming for Enhanced Agility
Favicon
Di una charla sobre cómo trabajamos con XP
Favicon
Quality Coding Manifesto
Favicon
Gradient Descent for XP practitioners
Favicon
Demystifying XP Values, Principles & Practices
Favicon
The Real Reasons for Doing Test-Driven Development 💎
Favicon
TDD: Benefits and Drawback of test-driven development
Favicon
Behaviors for a better pair programming experience
Favicon
Book review: Modern Software Engineering
Favicon
Scrum is great in theory, but "it will never work in the real world"
Favicon
Pair Programming - Why you should try it
Favicon
The importance of seeing red
Favicon
Pick a methodology: Scrum, Kanban, XP, Lean or DevOps?
Favicon
BDUF vs emergant design
Favicon
Hot-air balloon Retrospective Template
Favicon
Three modes for an enhanced pair programming experience
Favicon
Ryan Bergman loves terrible code... and other things I learned recording his DevJourney (#150)
Favicon
Schedule chicken
Favicon
DEV3L on Extreme Programming Explained
Favicon
DEV3L on Certified Scrum Developer
Favicon
Dependências: Bibliotecas ou OTP Applications?
Favicon
The Software Quality Cost Myth
Favicon
What DevOps Engineers can learn from Extreme Programming (XP)
Favicon
Want to run a kata at your company? I did it. Here are some tips.
Favicon
How I use CRC (Class Responsibility Collaboration) Cards every day (Part 1)
Favicon
Soft(er) skills that make you a better programmer

Featured ones: