Jeremy D. Miller -- The Shade Tree Developer

Sponsors

The Lounge

Syndication

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Jeremy's Other Laws of Continuous Integration

Since the first one inevitably irritated people, let's go for rule #2 & #3:

2.) Check in as often as you come to a stopping point.  The more frequently you check in, the less troubling your merge conflicts will be.  For the most part, I think you can make merge conflicts almost entirely go away after the first couple weeks of the project.  We had a mild conflict today (that spawned my tongue in cheek remark about checking in first) that was caused by one pair renaming a testing utility method to make it more consistent with our other testing methods, while my pair was still using the existing method name.  Both pairs knew it was coming so it was no harm, no foul

3.) Communicate with your team members anytime you think you might be doing something that would cause a merge conflict.  Yet one more reason why a colocated team beats a distributed team

4.) Find ways to divide your work into smaller chunks.  If you can't check in new code for days at a time because you aren't at a clean point, you may have some serious problems with your design.

5.) If you can't check in your code for a long time ( > 1/2 a day let's say), be sure to update your version of the source code with the updates from the rest of the team to make your eventual checkin easier

6.) Rotate your build notification sounds.

7.) And in the "do as I say not as I do" category, you might learn how to use a merging tool (then come teach me).

 

And yes, you can solve the merge conflict problem by going to a pessimistic locking strategy, but I think that causes much more friction than the occasional merge conflict.

 

 

...and some other boring things like making sure the build actually succeeds, fixing broken builds immediately, and making sure that the build sets up the development environment and other details you can find in the Check In Dance.


Posted Mon, Sep 22 2008 8:40 PM by Jeremy D. Miller

[Advertisement]

Comments

Dave Laribee wrote Laribee's Final Law of Continuous Integration
on Mon, Sep 22 2008 9:04 PM

Seeing that DJ Miller is spinning up some amusing-but-true laws of continuous integration , I'm gonna

Jeremy Gray wrote re: Jeremy's Other Laws of Continuous Integration
on Mon, Sep 22 2008 9:14 PM

:D

Mirrored Blogs wrote Laribee's Final Law of Continuous Integration
on Mon, Sep 22 2008 9:53 PM

Seeing that DJ Miller is spinning up some amusing-but-true laws of continuous integration , I'm gonna

Community Blogs wrote Laribee's Final Law of Continuous Integration
on Mon, Sep 22 2008 10:01 PM

Seeing that DJ Miller is spinning up some amusing-but-true laws of continuous integration , I'm gonna

josh wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 12:37 AM

winmerge (http://winmerge.org/)  I've tried others but keep going back to this; prolly partly because its also free/oss.

Reflective Perspective - Chris Alcock » The Morning Brew #185 wrote Reflective Perspective - Chris Alcock » The Morning Brew #185
on Tue, Sep 23 2008 2:49 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #185

alberto wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 3:23 AM

Just in case it was not very clear from my comment in your last post, it was not about CI, but about SVN. It sucks badly both at managing renamed files (which is especially relevant when merging), but it seems like it is not an issue for anyone.

Jeremy D. Miller wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 8:02 AM

@alberto,

Just use VisualSVN.  The old rename file problem from the Ankh days completely goes away.

alberto wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 12:34 PM

I am not talking about that. I am talking about the conflicts and problems at commit time when someone moves/renames a file (svn move, not explorer) and someone else changes it.

Jeremy D. Miller wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 12:57 PM

@alberto,

See #3:

3.) Communicate with your team members anytime you think you might be doing something that would cause a merge conflict.  Yet one more reason why a colocated team beats a distributed team

alberto wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 1:32 PM

It's not a problem of lack of comunication, it's a problem with the tool. Knowing the problem beforehand doesn't fix it, just blocks you. It's not a very big problem when all you are changing is a file, but it's much harder when you make a branch to make significant refactorings (or is it unrealistic to do such things in a branch?)

Dew Drop - September 23, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - September 23, 2008 | Alvin Ashcraft's Morning Dew
on Tue, Sep 23 2008 3:23 PM

Pingback from  Dew Drop - September 23, 2008 | Alvin Ashcraft's Morning Dew

Jeremy D. Miller wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 3:26 PM

@alberto,

I wouldn't say that branching is completely unavoidable, but I've never seen a real refactoring that I couldn't do in the trunk.  The only thing I branch for is support releases and experimental spikes.

alberto wrote re: Jeremy's Other Laws of Continuous Integration
on Tue, Sep 23 2008 4:07 PM

Even for just support releases you'll find the very same problems when you merge bugfixes into trunk.

Hadi Hariri wrote re: Jeremy's Other Laws of Continuous Integration
on Wed, Sep 24 2008 5:56 AM

@Jeremy

Use BeyondCompare. It's not a "merge" tool, it's a diff tool, but that is the entire beauty of it. It makes merges so easy.

Laribee’s Final Law of Continuous Integration - taccato! trend tracker, cool hunting, new business ideas wrote Laribee’s Final Law of Continuous Integration - taccato! trend tracker, cool hunting, new business ideas
on Mon, Oct 6 2008 5:06 PM

Pingback from  Laribee’s Final Law of Continuous Integration - taccato! trend tracker, cool hunting, new business ideas

Outdoor Activities wrote Outdoor Activities
on Tue, Oct 7 2008 12:33 AM

Pingback from  Outdoor Activities

World of .NET show wrote Podcast #4 - Continuous Integration and FireBug
on Wed, Oct 15 2008 12:19 AM

Podcast #4 - Continuous Integration and FireBug

World of .NET wrote Podcast #4 - Continuous Integration and FireBug
on Thu, Apr 9 2009 12:41 AM

Podcast #4 - Continuous Integration and FireBug

Add a Comment

(required)  
(optional)
(required)  
Remember Me?