Categories
Uncategorized

Software Branching and Parallel Universes

“Savage Chickens” comic: “What if your life is boring in all the parallel universes?”


Over at his blog Coding Horror, Jeff Atwood talks about what’s probably the trickiest part of version control: branching.
He quotes the Subversion docs’ layperson-friendly explanation of branching:

Suppose it’s your job to maintain a handbook for a particular division of your company. One day a different division asks you for the same handbook– but with a few parts modified specifically for them, as they do things slightly differently.

What do you do in this situation? You do the obvious thing: you make a second copy of your document, and begin maintaining the two copies separately. As each department asks you to make small changes, you incorporate them into one copy or the other. But you often find yourself wanting to make the same change to both copies. For example, if you discover a typo in the first copy, it’s very likely that the same typo exists in the second copy. The two documents are almost the same, after all; they only differ in small, specific ways.

This is the basic concept of a branch — a line of development that exists independently of another line, yet still shares a common history. A branch always begins life as a copy of something, and moves on from there, generating its own history.

If branching reminds you of parallel universes, you’re not alone. Parallel universes are a staple of science fiction and geek literature, from the Star Trek episode where Spock has a Fu Manchu-style beard to that oddball Gwyneth Paltrow movie to the out-of-continuity comics like Marvel’s What If… and DC’s Elseworlds series. Jeff finds “parallel universes” to be a handy analogy for explaining branching. (He also cites some comic book classics featuring parallel universes for geek bonus points.)

He lists a number of approaches to branching (or “branching patterns”, if you prefer), complete with diagrams. I’ve gathered the diagrams and placed them into a single graphic below — he describes each in a little more detail.

Diagrams of different branching patterns, by Jeff Atwood.

Branching is tricky, but if you’re not making use of it, you’re missing out on one of version control’s most important benefits. As Jeff puts it:

Still, I urge developers to make an effort to understand branching– really understand it– and explore using branching strategies where appropriate on their projects. Done right, the mental cost of the branching tax pales in comparison to the benefits of concurrent development it enables. Embrace the idea of parallel universes in your code, and you may find that you can get more done, with less risk. Just try to avoid a crisis on infinite codebases while you’re at it.

Cross-posted to the Tucows Developer Blog.

Categories
Uncategorized

The Boy of the 20th Century, Through 19th-Century Eyes

“20th Century Boy” illustration from the 19th century
Click the picture to see it at full size.
Image courtesy of Miss Fipi Lele.

The caption of this 19th-century lithograph reads: “A LOOK TO THE FUTURE: The boy of the present has a glimpse of the twentieth century boy.”

Categories
Uncategorized

Download the PDF of “Build Your Own Ruby on Rails Applications” for Free!

Build Your Own Ruby on Rails ApplicationsSitePoint is making the PDF version of their Rails book Build Your Own Ruby on Rails Applications available for FREE for the next 60 days.

Here’s what SitePoint has to say about this giveaway:

That’s right… Not an extract… Not a sample chapter… The ENTIRE 447 pages of Patrick Lenz’s incredible book is (for the next 60 days) free to download.

From installing Ruby, Rails and MySQL, to building and deploying a fully featured web application, this book has it all. Imagine building a Web 2.0 social news application, while learning the ins-and-outs of Ruby on Rails. This book shows you how to do it, step by step …

It’s no wonder this book has been described as the best Ruby on Rails beginners’ book on the market.

If you’ve ever thought about trying out Ruby on Rails, you’ll never get a better chance to learn why everyone’s talking about this revolutionary web development framework.

The book isn’t quite up-to-date — it covers Ruby on Rails 1.1.6 rather than Ruby 1.2 — but the material in the book as well as the code examples seem to be compatible with the current version. The book has been reviewed quite favorably, and it looks as though it might make a good companion to a book like the Pragmatic Programmers’ Agile Web Development with Rails.

Cross-posted tot he Tucows Developer Blog.

Categories
Uncategorized

Pair Programming and Sign Language

Here’s a video of two guys doing pair programming, purportedly taken with a hidden camera:


Can’t see the video? Click here.

Cross-posted to the Tucows Developer Blog.

Categories
Uncategorized

The “Duke Nukem Forever” / “Halo” Connection, Revealed at Last!

We’ve been told that “Master Chief” from the Halo series of games reveals his face at the end of Halo 3. If you can’t wait to finish the game to find out who he is, the webcomic Godmode has given away the answer:

“Godmode” comic that tells the secret of “Master Chief” from the “Halo” games — He’s really Duke Nukem, and if you’ve been playing “Halo”, you were playing “Duke Nukem Forever” all along.
Click the comic to see it at full size on its original page.

Categories
Uncategorized

How Do You Like Them Apples?

Mollie Sterling wrote in her blog:

It does my heart good to see these photos from my alma mater, The Missouri School of Journalism. Back in the fall of 2001 when I was a freshman, it was me and two other kids in the back row with our glowing Apples. Now I feel almost sad for that poor kid with the Windows machine in the front row:)

Missouri School of Journalism class, with most people sporting Mac laptops.
Click to see the photo on its original page at full size.

Categories
Uncategorized

John Harvard is Master Chief!

Oh, those crazy MIT Guys…

Statue of John Harvard, modded to give him Master Chief’s helmet and gun.
Click to see the photo on its original page.

Here’s what the MIT Hacks gallery has to say:

During the night prior to the release of the heavily advertised Halo 3 video game, MIT hackers transformed the statue of John Harvard into the Master Chief character from the game. In the game, the character’s real name is known only as John. John was wearing the signature helmet from the game and was also holding a gun from the game. The hack was removed by around 8am.