DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Culture and Methodologies
  3. Agile
  4. Fix Broken Builds Immediately

Fix Broken Builds Immediately

There are good crutches and bad crutches in life. Being addicted to using a working build is a good, healthy crutch that I hope to encourage.

David Bernstein user avatar by
David Bernstein
CORE ·
Jun. 24, 19 · Opinion
Like (1)
Save
Tweet
Share
9.58K Views

Join the DZone community and get the full member experience.

Join For Free

Fix it now

If it's broken, we've got a problem.

A healthy, well-maintained build is the heartbeat of a project. Removing friction from the build can greatly improve developers' productivity. We want to make sure that the build is easy-to-use, and if it breaks, we want to make sure that it gives us informative error messages, so we can quickly diagnose and fix the problems.

13 Things That Make a Good Build System

To me, a healthy build is the very essence of Agile software development. I say this because the first principle of the Agile Manifesto says, "Our highest priority is to satisfy the customer through early and continuous delivery a valuable software."

Continuous delivery of valuable software requires continuous delivery. We have to be able to automate not only the build but the entire verification process for the behavior we build in the system. This is what it means to be agile in software development and to be able to respond to last-minute changes.

If we have a manual process for assuring quality, then any minor change or addition to the system will often require a complete regression test of the entire system, making it prohibitively expensive.

My preferred way of building an automated system is through test-first development. Since all the code that I write when doing TDD is to make a failing test pass, I usually have 100 percent code coverage. The tests that I write when doing TDD are behavioral unit tests, which I find are usually the best for validating features. I often find that it's best to think about my unit tests and testing in general as happening in two phases and for two very different purposes.

The first set of tests that I write are behavioral tests or acceptance tests, and I write them at the unit level around units of behavior. These become the acceptance tests for my projects; they support me when I refactor my code because they should continue to pass when I correctly change the implementation.

This actually gives me the support that I need as a developer to refactor existing code, and this is one of the main values of having behavioral tests, which we get naturally when we do test-first development correctly.

These tests are great, but they may not be enough to validate all aspects of a feature, so I often build up a set of additional tests that reach a bit further into implementation. I typically write these tests after I write my code or someone on my QA team writes them with me. These tests may give me more confidence that the system is working as it's supposed to, but these tests might break when I refactor the code, and if they do, I generally delete them or rewrite them.

A healthy build is a prerequisite for nearly every client that I have. We depend so heavily on our build that when it breaks, it often means that the entire team can't make any progress. So, keeping the build up and working is imperative.

Several years ago, my friend Thomas was showing me around his company one evening after everyone else had left. They were a true XP shop with team agreements on the walls and pairing stations everywhere. It was beautiful.

I noticed some heavy duty hardware set up in the corner, and I asked my friend about this. "That's our build server," he said. "Want to see what happens when somebody breaks the build?" he asked me.

He walked over to a workstation, logged in, and typed a few lines. Suddenly, all the fluorescent lights in the building went out. The emergency lighting came on and a siren began to sound. I thought it was the fire alarm, and I got up and ready to go, but my friend stopped me.

"This is not a fire," he said. "This is what happens when somebody breaks the build," he said. "We don't tolerate broken builds in our organization."

When somebody breaks the build in his company, everybody knows it and they have to fix it immediately. They can't go to the bathroom or do anything else. They have to either fix the broken build or back out their changes so the system reverts to where it was working before. This is how dependent teams get when they have a reliable build.

A lot of crutches are bad, but I find that when I have a reliable build that I depend on, it can give me such great superpowers that I find my dependency is worth it.

Note: This blog post is based on a section in my book, Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software, called "Seven Strategies for Seven Strategies for Agile Infrastructure."

Further reading

Why Is the Build Broken?

Breaking the Build Is Not a Crime

Continuous Integration/Deployment unit test Software development agile

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Isolating Noisy Neighbors in Distributed Systems: The Power of Shuffle-Sharding
  • Best Practices for Writing Clean and Maintainable Code
  • Specification by Example Is Not a Test Framework
  • 7 Ways for Better Collaboration Among Your Testers and Developers

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: