Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Stop Hitting Yourself

DZone's Guide to

Stop Hitting Yourself

Continuous Integration is the best way to stop making the same mistakes over and over again.

· DevOps Zone ·
Free Resource

Discover how you can reduce your Kubernetes installation from 22 steps to 1.

If there was a button on your computer that said “DO NOT PUSH,” would you push it?

If you push the button and a hand comes out of the monitor and slaps you on the face, would you push it again and again?

Of course not! But then why do you continue to use branching in version control? I understand that there are some legitimate uses for branching but it’s often overused, and feature branches are almost always a bad idea.

As soon as a branch is created, the system’s capabilities become divergent and the cost of bringing those pieces back together again can be very high. Branching development either by team or feature may seem like a good idea up front because nobody’s code affects the other people, but this can cause problems when integrating code later. Creating branches in this way is only postponing the inevitable, and postponing these little problems along the way causes them to become big problems later on. Integrating code becomes a bigger problem the longer you wait. So it’s better to integrate as soon as possible and best to integrate continuously.

Continuous integration may take some time to set up, but it pays back huge dividends rather quickly. The pain of integration and testing goes away and is replaced by a build system that gives valuable and immediate feedback to developers as soon as they check in their code.

Continuous integration provides the infrastructure for agility. In fact, I believe that continuous integration is at the very essence of Agile. If you integrate code as it’s built, you’re doing Agile. And if you wait to integrate code, even if it’s just a few weeks, then you are not doing Agile no matter how many stand up meetings you have. Iterations must end with integration, and ideally, developers integrate their code as they’re building it.

But how do we integrate features into a production system as it’s being built without using branching?

I’m glad you asked. It’s a good question and the answer to that question can be found in my next blog post: Use Flexible Feature Flags.

Download the Kubernetes cheatsheet to learn more about how easy it is to run Kubernetes on any infrastructure with Mesosphere DC/OS

Topics:
agile approach ,continious integration

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}