Over a million developers have joined DZone.

Stop Hitting Yourself

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

· DevOps Zone

The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today

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.

The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today

agile approach,continious integration

Published at DZone with permission of David Bernstein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}