Reversibility

Leena
Continuous Delivery
2 min readNov 7, 2017

There Are No Final Decisions

No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.

~Dave Thomas, Andrew Hunt — The Pragmatic Programmer: From Journeyman to Master

Reversibility is one of the ideas mentioned in the classic book — Pragmatic Programmer by Dave Thomas and Andy Hunt. I would highly recommend reading the book if you are yet to do so.

The premise for reversibility is that decisions are not final. Instead, decisions are made in a context and can be changed anytime in the future. And that is why reversibility is essential as it makes the product more flexible.

But you said we’d use database XYZ! We are 85% done coding the project, we can’t change now!” the programmer protested.

Sorry, but our company decided to standardize on database PDQ instead — for all projects. It’s out of my hands. We’ll just have to recode. All of you will be working weekends until further notice.

We were in a similar situation when we had to move from Redis to H2 for a product we were building. It didn’t burn our weekends because we had an abstraction layer. With the tests, it gave us the confidence nothing is broken because of the changes we are introducing.

Flexible Architecture

Orthogonality and DRY are other concepts that help you achieve Reversibility. If you can add and remove stuff easily in your product, then it has the flexible architecture. Usually, we add stuff quickly, but we struggle when we’ve to delete stuff. And that is where reversibility comes into the picture. As mentioned in the book, If something is added automatically, it can be taken out automatically as well.

Feature Toggles helps you to achieve reversibility by giving you the hook for turning the feature on or off.

Branch by abstraction, recommended technique for handling long running changes, too helps to achieve reversibility.

Always releasable

The basis of all the above is the idea of production readiness, i.e., making sure that the product is always releasable. And doing Continuous Integration right, yes with Mainline Development, is mandatory for this.

--

--

Leena
Continuous Delivery

Co-founder/CTO @ PracticeNow, Bangalore, India. A strong believer of lean principles, an evangelist and practitioner of Continuous delivery