# Microspeak: The train

Work on Windows occurs in several different branches of the source code, and changes in one branch propagate to other branches. The goal is to push changes toward the trunk on a regular cadence. I will illustrate with an extremely simplified example because the complexities aren't really important. Consider this branch structure:

 Trunk A B C D A1 A2 B1 B2 C1 C2 D1 D2

Suppose for the sake of simplicity that odd-numbered leaf branches push their changes to the first-level branches on Mondays and Wednesdays, and even-numbered leaf branches push their changes on Tuesdays and Thursdays. Furthermore, once a week (A on Monday, B on Tuesday, etc, with Friday as a buffer day) each first-level branch pushes its changes to the trunk. It does this before accepting changes from the child branch that same day, so that every change spends at least one day baking in a first-level branch.

This means that if you work in A1 and you want a change to land in the trunk by next Monday, you need to commit it to A1 by Wednesday. Otherwise, you will miss the train.

The metaphor here is that code changes are cargo (known in the lingo as payload) which are transported by an imaginary train to the next station (branch). If you miss the train, then your change sits on the platform and waits for the next train.

The imaginary train schedule looks like this:

Day Train Departure
Monday A → Trunk 4pm
A1 → A 5pm
B1 → B 5pm
C1 → C 5pm
D1 → D 5pm
Tuesday B → Trunk 4pm
A2 → A 5pm
B2 → B 5pm
C2 → C 5pm
D2 → D 5pm
Wednesday C → Trunk 4pm
A1 → A 5pm
B1 → B 5pm
C1 → C 5pm
D1 → D 5pm
Thursday D → Trunk 4pm
A2 → A 5pm
B2 → B 5pm
C2 → C 5pm
D2 → D 5pm
Friday No trains

(Note that nobody actually refers to this as the train schedule. We call it the RI schedule, where RI is pronounced as two letters and not like the word rye.)

Suppose that there's a problem in B1 on Monday, and the branch managers decide to delay pushing their changes to B until they understand the problem and have a fix for it. If they cannot get this done before 4pm Tuesday, then the scheduled RI from B to the trunk will take place without any payload from B1. B1 is said to have missed the RI train. Unless they take special steps, their changes won't appear in the trunk until the following Tuesday at the earliest.

There are few things that B1 could do when they find themselves in this situation.

They could ask that the RI from B to the trunk be delayed until after they figure out the problem and push the fix from B1 into B. This is like asking for a train to be held at the station so that passengers on an inbound train can make their connection.

Maybe there's a bad bug that's in the trunk, and B1 has a fix for it. They could push just the one bug fix from B1 into B, and let that fix get pushed to the trunk on Tuesday. I guess this is like kicking everybody off the train back onto the platform except for the one fix you want to take.

B1 could negotiate a deal with C. "Hi, we have a fix that needs to go the trunk, but our branch is in kind of bad shape. Could you take it to the trunk for us?" The fix is pushed from B1 to C on Tuesday, and then it catches the train from C to the trunk on Wednesday. This is sort of like going to a different station.

They could ask for permission to make a direct change to the trunk, bypassing all the trains that normally take changes to the trunk. I'm running out of metaphors here. Maybe this is "taking the plane"? No wait, we actually have lingo for this too. It's called fast-track, sometimes written as fasttrack without the hyphen.

The train terminology can get more specific, with trains named after the release they are destined for. For example, the C1 branch manager might say, "The last beta train has left C1. If you still have a beta bug and you can get your fix signed off before Wednesday, contact the C branch team; we may be able to get you onto the last beta train out of C. Otherwise, you need to work with the beta release team. See the XYZ Web site for further information."

Here's some sample text from the trunk management team which incorporates a lot of the lingo. Practice it and you too can sound like a hip insider.

Today, we took the scheduled RI from A and two fast-track fixes, one from the B team (for bug 3141) and one from the C team (for bug 2718)

Tags

1. Joshua says:

I'm glad you published this. The literature on handling a large project is sparse.

Incidentally the correct term in analogy where you mentioned plane is "hiring a special".

2. dave says:

"Man is born free, but is everywhere in trains" — Jean-Jacques_Rousseau.

FWIW, the train analogy is quite common. In several places I've worked, it's the "release train" — version N is shipping on a particular date, whether your contribution is on board or not.

3. ErikF says:

I wonder if anyone's been told to "Take the 'A' Train" in those e-mails… :-)

4. 12BitSlab says:

@ Erikf — one of Billy Strayhorn's finest!

5. Ken in NH says:

Gimme a ticket for an aeroplane

I ain't got time to take a fast train

Buggy days are gone, I'm a-goin' home

'Cause my manager just wrote me a memo

6. 3142, surely.

[3141 is a stopgap fix, obviously. The more précise fix is being tracked as 3142. -Raymond]
7. DWalker says:

After 3141 comes 59265358979, right?  and 2178….  Hmmm..  looks like e!

8. Myria says:

How do security fixes fit into the picture?

[Servicing shipped products follows a different process. -Raymond]
9. kog999 says:

i was so hoping to see this in the schedule.

Day               Train              Departure

Saturday   South Detroit → Anywhere     12 A.M.

10. Myria says:

kog999: Don't stop believin' in such journeys, city boy.

11. IanB says:

> The more précise fix

As 'precise' was forked 600 years ago I would have expected it to have dropped the accent by now?

[Autocorrect was too aggressive and I didn't notice. -Raymond]
12. Brian_EE says:

@Dwalker: I'm not sure how you take the factorial of e, since e is an irrational number.

13. @Brian_EE: According to Wolfram Alpha, the factorial of e can be found using the gamma function.

http://www.wolframalpha.com/input

14. SilverFox says:

We call it the bus scheduled. And if you miss the bus, you take a cab or bike messenger it in.

15. Random832 says:

So does the other direction of integration (mentioned, briefly, in the Larry Osterman post you linked) not get to participate in the train analogy?

[The train analogy isn't much used in the other direction because the interesting destination is nearly always the trunk, not some leaf branch. -Raymond]