TrainingConferencesAbout UsContact UsAdvertiseSQE.comRSS Feed

StickyMinds.com: brain food for building better software

Log In
 Clarify Your Search Criteria

Tips on Using Our Search Feature(s)
 
StickyMinds.com Home
ResourcesTopicsCommunityPowerPass
Home  >  Detail: How Much Building Is Too Much?



A StickyMinds.com Original
Article Picture
How Much Building Is Too Much?

By Johanna Rothman

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: Staged integration versus continuous integration--which does your team prefer? Can't decide if one is better than the other? In this week's column, Johanna Rothman explains that you can create the perfect blend of the two. Developers and testers benefit from frequent builds, but be careful with how much you build. Build too much or too little and a project could topple.


McCabe Software
During a recent in-house project management class, I suggested that the project teams move from weekly builds to nightly builds, preferably with an automated smoke test as a technique to increase the pace of the project. "We can't do that," one of the project managers said. "Our testers can't keep up." Why do your testers need to keep up? Nightly (or hourly) builds aren't for the testers--though they can take advantage of newer builds--but for the developers.

Developers receive timely and frequent feedback
With staged integration--building weekly or less often--developers receive feedback about their work at least a week after they check it in (sometimes a month or more, in my experience). With nightly builds, developers receive feedback the next day on the previous day’s work, which is a hallmark of agile development.

With nightly builds, if a developer has a bad development day, that developer receives feedback the next day, wasting only one day’s worth of work. With less frequent builds, developers receive feedback days or sometimes weeks after they've finished their work. It's too easy for developers to get stuck with incomplete or wrong thinking and not realize it until weeks have passed, making the project late and adding to the needed rework.

One of my clients can only build their system about once a month. They need a full week to resolve the compile circularities, and then another couple of weeks to find all the people who broke the build to fix their problems, resume or restart the compiles, and finally complete the build process. It's possible for a developer there to have to change something checked in two or three months ago, because problems with that code didn't appear until a build or two later when someone else checked in a complete piece of work.

Staged integration, in which developers wait until an entire piece is done to check in the whole darn thing, helps each developer complete a chunk of work, but slows the progress of a project. Here's why: A developer starts developing in a private sandbox, and every day pulls down the latest changes from the mainline. The developer checks for differences and integrates any found into the code under development. With any luck, no other developer is working in the same area. But if there is someone else working in that area, the developer has a choice to make: does she take the updated code or continue to work in solitude until her piece is complete?

Many developers wait to integrate their code until it is structurally complete and cohesive. But the longer it takes for that developer to complete the code, the more the mainline is changing. And the longer the developer waits to integrate that piece of code with the mainline, the more work the developer has to complete for integration--and the longer the developer has to wait to receive feedback from the build process.

Contrast staged integration with continuous integration: where small pieces are integrated every day and the system is built every night. Every day the developer brings down the new changes into the private sandbox, makes changes to the code, saves the changes, and updates the mainline. Not only does the developer receive feedback on the code via the build process, but also other developers can see what’s changing in that area.

If multiple developers are changing code in exactly the same area, they have to talk to each other to make sure they don't step on each other's code (a practice that helps any project). But chances are good that even if developers are working in the same set of files, they're not working in precisely the same areas of the files. Most configuration management systems will automatically merge the changes without problems.

When developers integrate small pieces every day, they are less likely to propagate mistakes for weeks. Instead, because changes are available to everyone using the updated sources and builds, the developers receive feedback within a day. If something is wrong, they only have to look at yesterday's changes, not a week's or month's worth of work.

Testers receive the option of which builds to take
While continuous integration (nightly builds at minimum), solves the problem of ensuring developers receive feedback about their changes, testers might feel left out in the cold. In fact, one tester told me, "I can't take every night's build—my regression tests alone take three days to run."

Testers have a choice. They don't have to fully test every nightly build. Maybe they'll use the weekly build on which to run regression tests. Maybe they'll choose to do some exploratory testing on a nightly build in a particular area. Maybe they'll verify fixes in a different area for a particular build. Testers are responsible for assessing the risky areas of the product and deciding how to test that area in the current build.

It's not reasonable to expect testers to fully test every build every day. It is reasonable to discuss with testers what their testing strategy will be during the different times of development, so you know the testers are making progress and the developers can receive the testers' invaluable feedback.

Nightly builds might not be for everyone
I have yet to encounter a project where someone can't use nightly builds, but, then again, I haven't encountered all projects. It's possible that your particular circumstance prevents the use of nightly builds. Certainly, if the testers are the only people on the project who use the build, nightly builds may be building too often. But increasing the frequency of your project's builds is a quick step toward helping the developers see where they're going, and that helps the project make forward progress.

About the Author
Johanna Rothman consults on managing high-technology product development. She uses pragmatic techniques for managing people, projects, and risk to create successful teams and projects. Johanna is the author of the highly acclaimed Hiring the Best Knowledge Workers, Techies & Nerds: The Secrets & Science of Hiring Technical People and is a regular columnist on StickyMinds.com. You can reach Johanna by email, jr@jrothman.com, or by visiting her Web site, www.jrothman.com.

Back to Top
 
 


Member Comments
Add Your CommentExpand Comments
 
Comment:    
by Sundar Ganesh 2/4/2006

You have mentioned that the testers the can choose to ignore the nightly build and look at testing them on a weekly basis. If this is the case or recommendation how will nightly build help in moving the project faster. Should I interpret it as, nightly builds are for unit level testing and weekly will be the system level testing team.

Author's Response:
2/5/2006    
Sundar, in the cases where the testers cannot test the entire system in one day, you can think of the nightly build as a way to gather the results of unit level and integration testing. If the testers only use the weekly build, then that is the system level testing.

 
 
Comment:    
by Tracy Benton 1/23/2006

This is a very interesting article, but actually I was reading it for guidance on how often to TAKE the nightly build, from the testing perspective. I've recently begun work at a company that builds nightly. It takes about 15 minutes to uninstall and reinstall the new build, which isn't unreasonable. But I feel like I'm testing on "shifting sands" -- refocusing my testing based on yesterday's results may or may not get me anywhere. And I'm baffled as to how anyone can reproduce a bug reliably when the code is different every day. I need reasoned thinking on how often we should install the new builds... and I personally haven't got...Read On

Author's Response:
1/24/2006    
Tracy, maybe the key is that your test group only verifies fixes once a week (although I wouldn't do that). The code is different every day as long as developers are changing anything. A nightly build gives the testers a choice about taking the most recent build or not. Without the nightly build, the testers have no choice.

 
 
Comment:    
by Ludo Noens 1/22/2006

The answer to the question “How much building is too much?” depends mainly on the objectives of building and the way related activities are organized. The objectives can range from simply ensuring error-free builds to fully tested changes. Who’s involved in this, can range from the developer(s) to a large external / independent test team. The optimal frequency depends on several factors, that can change during the course of a project. I think building becomes too much when the overhead created with it exceeds the benefits (whatever these are). Therefore, one should strive to keep the overhead low. This can be done by...Read On

Author's Response:
1/22/2006    
Ludo, I agree that it's important to decide which of the coding, integrating, building, and testing activities are linked and when. When the project team makes a decision, they can decide how quickly and how well they can proceed.

 
 
Comment:    
by Gary Feldman 1/20/2006

Having learned about nightly builds at my second real job, back in 1985, I'm always amazed that there are still teams this century that aren't doing it. As I read the objections to frequent builds, I observe that many people don't take into account the way individual development steps fit into the big picture, the software development process. As with any tool, it can be used effectively or recklessly. The primary beneficiaries of frequent builds are the developers, not the QC team. The purpose is to catch integration problems as quickly as possible, which reduces the cost of fixes, since the code is still fresh in the minds of the...Read On

Author's Response:
1/20/2006    
Gary, I really like what you said, " A coding task that takes more than a day is a coding task that can't all fit into a programmer's head." That's been my experience also.

 
 
Comment:    
by Ed Weller 1/19/2006

The optimum frequency and size of integration builds, and the outcome, is a function of how good the product is when going into the build. GIGO, in other words. If of low quality, frequent incremental changes are a necessity to make the problem analysis a manageable task. Whth high quality, big bang integration , with fewer regression test sequences, become possible. I've seen 100+ modules integrated at one time (part of the I/O Supervisor of a mainframe system that was about 20 years old and therefore rather convoluted by then) with no problems. I also have seen nightly integratiopn builds take up to 2 weeks to resolve all problems found by...Read On

Author's Response:
1/19/2006    
Ed, I do like your example of proactive defect-finding. 20 (or so) years ago, when I was attemtpting to do staged integration, we were not proactive at finding defects, and it only took one build that took over 2 weeks to resolve to change my mind.

 
 
Comment:    
by Software Team 1/18/2006

There is confusion about the issue that is due that the author is actually mixed two different things: coding and building. The first presume how often you commit changes back to a source control system and the second how often you pull a code from the source control system and produce a build. That's why some people said that nightly builds are working perfectly for them and other that it doesn’t. The nightly builds itself is very useful tool to improve quality and team’s performance. But if you require that developers must commit in all their code on daily basis on the top of it then you will have problems. Because some changes...Read On

Author's Response:
1/19/2006    
Good differentiation.

 
 
Comment:    
by Allan DeKoninck 1/18/2006

Interesting article and was the way we did business prior to focusing on CMM processes and process improvements. One of the biggest issues we had with frequent builds is that it encouraged poor development practices and poorer requirements definition. As soon as errors were found the developers provided the fix and moved it into the next build (usually once or twice a day). The fix would often create other issues which would compound and create delays in other project deliverables. The root cause analysis of this found that often the original error was due to poor requirements definition, but daily builds did not encourage the team to...Read On

Author's Response:
1/19/2006    
Allan, wow, I'm impressed. You've found a way to make staged integration work. You are definitely the exception.

 
 
Comment:    
by Lisa Crisipn 1/17/2006

We use CruiseControl to do continuous builds. I am guessing some days we get 20 or 30 builds. Anytime a checkin is done, a build kicks off. It sends an email with the modules checked in and the comments. I've never found any problem with this. I can deploy a build in about 30 seconds so I just take a new one whenever I want. I know from the emails what is checked in, plus we have a task board so that we know whenever a programmer is finished with a task and it's ready to test. I honestly cannot imagine a situation in which there are too many builds - I only have to deploy them when I want to.

Author's Response:
1/19/2006    
Lisa, this is my experience, too.

 
 
Comment:    
by Rose Eliff 1/17/2006

I have to admit, Johanna, that as I started to read your article, I started to twitch ... and not in a good way. As a QA Manager, I've always preferred that we execute all test scripts completely in Build A, log issues in the defect tracking system, resolve the issues, then go to Build B to verify the fixed defects and perform regression testing to ensure nothing other than fixes were changed in Build B. In my experience, frequent builds resulted in much longer test periods; each build introduced new issues or changes that weren't in the previous build, requiring us to regression test first to ensure that previously validated items were...Read On

Author's Response:
1/19/2006    
Rose, sorry about the twitching :-) There are times in certain lifecycles when multiple changes and builds do not help the testers make progress. But in my experience, those times are at the very end of the project, and the testers can continue to make progress before then, just by deciding which builds to take, when to start over again and when to continue.

 
 
Comment:    
by Scott Barber 1/17/2006

Johanna, I have to admit that I'm a little surprised to hear the objections from testers (and managers on behalf of testers) to nightly builds. My experience is quite the opposite. "Way back" in 1999 I was a tester who was simply *begging* my development team to create nightly builds -- or at least periodic builds -- so I could get a jump start on learning the application, preparing my tests and maybe even providing a little feedback. I never once convince a dev team to switch from "build the morning it's supposed to go to the testers". They were the ones complaining that it was too hard. "It'll never build...Read On

Author's Response:
1/19/2006    
Scott, I agree :-) Seriously, I'm beginning to wonder if the people who object to nightly builds are the same people who want to protect their code from being looked at by other people?

 
 
Comment:    
by Gerold Keefer 1/17/2006

hello johanna, thanks for this interesting article! i think that for a discussion on the topic we need to clarify what "building" actually stands for in the context of that article: my interpretation is that it stands for "automated program code verification" (or more commonly automated program code checking). the checks that are usually employed are a blend of syntax and type checking by a compiler, check for cross-module inconsistencies by a linker, additional checks by a static code analyzer and automated unit and integration tests executed during the build. in other words, builds work as a filter against a whole bunch...Read On

Author's Response:
1/19/2006    
Gerold, in addition to your list, I like to add some *minimal* testing--as in can the build execute at all? But yes, this is using the build as automated code verification. That's it.

 
 
Comment:    
by Stephanie van Dijck 1/17/2006

I'm probably lucky that I've mostly worked in projects where nightly builds are a normal way of working. If the regression tests take too long to run, we divide the set of regression tests into chunks: one part covers the high-risk areas of the system, the other the lower-risk areas. Sometimes, we even use more than two parts. The result of the high-risk regression tests are be available within a few hours - the result decides whether the developers use the new mainline or continue with yesterday's version and the new mainline is not made available to the team. The developers working on the high-risk parts are informed about the problems...Read On

Author's Response:
1/19/2006    
A risk matrix is an excellent technique to choose where to put those scarce testing resources.

 
 
Comment:    
by Paul Hodgetts 1/17/2006

The summary of the article states: "but be careful with how much you build. Build too much or too little and a project could topple." However, nothing in the article ever really argues against frequent builds, and there is nothing at all that supports that the "project could topple" from too frequent builds. For that matter, the article doesn't answer the title question "How Much Building Is Too Much?" Since both testers and developers can choose to ignore build frequencies (of the baseline) that exceed their ability to respond, can we ever build too much or too often? I've worked with teams that do...Read On

Author's Response:
1/19/2006    
Paul, as long as someone is using the build, then I don't think it's possible to build too much. The key is to make the building as automatic as possible, so the builds don't use people's time.

 
Back to Top


Marketplace

RESOLVE SUPPORT ISSUES from your Desktop!
Minimize downtime with a remote support solution that lets you resolve issues right from the desktop

TAKE CONTROL OF REMOTE COMPUTERS
Support, configure and install applications and updates remotely for greater efficiency.

Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.

Census: Web-based Bug Tracking and Defect Tracking
Track software bugs, defects, enhancements, support calls, and more. Issue tracking software that is scaleable, fully customizable and integrated with VSS. Includes e-mail notifications, role-based workflow, change history, and Crystal reporting.

Experience Adobe® FLASH MEDIA SERVER 3
Introducing the media solution for total action without interruption. TRY IT NOW FOR FREE!

Get your product or service listed here.
Subscribe to Better Software Magazine
Subscribe to Better Software Magazine

First Name:

Last Name:

Email Address:


Home   |   Resources   |   Topics   |   Community   |   PowerPass



© 2008 StickyMinds.com. All rights reserved.
StickyMinds.com is a division of Software Quality Engineering.
Privacy Policy    Terms & Conditions    Link to StickyMinds.com    Feedback


AccuRev

Software Quality Engineering



Better Software Conference & EXPO 2008