When Nate was wrapping up his senior year of college, he hunted around for a job that would hire an undergrad on flexible hours. He knew that the kinds of companies that tended to hire on those terms could often have… creative practices, but college wasn’t about to pay for itself.

He found a small shop that needed an extra hand. Extremely small- there was only one other developer, Gordon. Nate was prepared to enter a tiny shop with no real practices or procedures, because with only one developer, you don’t expect a lot of rules and bureaucracy.

Tangled tree roots Neroberg

Gordon was only one person, but he was able to create enough contrived, arcane, and downright mysterious bureaucratic policies and procedures for fifty developers. Reading the style-guide was closer to reading a novel, but not a good novel where there was a clear point and narrative thread, but something meandering and pointless, like a Douglas Adams book.

Gordon wasn’t just opinionated about style. He also had Opinions™ on the proper use of source control. “Branches,” Gordon explained, “are absolutely vital for separating units of work.”

Gordon’s explanation came after Nate was stunned by the sheer number of branches- there were hundreds of branches in the repository. “Look,” Gordon said, “you don’t have to be intimidated by this. We can start you out, just do this small change in the main branch, then I’ll show you how to release it.”

Nate dutifully checked out master, made the change, and committed it. He sent Gordon a pull request.

“You used the wrong branch. Back out your change, and put it in the main one.”

“Which branch is the main one? It’s not master?”

“It used to be, but we don’t really use master anymore. Use master_4513.”

As it turned out, the “main branch” was usually whichever branch Gordon touched last. There were five or six different branches that could be the “main” branch at any given time. Maybe seven- it was very hard for Nate to be certain.

Nate made the changes in master_4513, but that was only the start of the nightmare. Now, those changes had to be merged into the correct branch for deployment. “This is pretty complex, do you want me to walk you through it?” Gordon asked.

Nate said yes, and so Gordon sat down next to him, and started explaining each step that Nate needed to perform. These “explanations” started with Gordon pressing his fingers against Nate’s monitor and saying, “Click here.” “No, fire up the GUI, not the CLI.” “Select this branch.” The instructional process was recorded as a smear of fingerprints on Nate’s screen.

Changes merged outward from the main branch (whatever “main” happened to be that day). Instead of merging back towards a known-good trunk of code, changes were made to the trunk, and then percolated outward, according to Gordon’s own twisted logic. “You see,” he explained, “we’ve gotta maintain, like, 15 different versions, and some of them depend on a different version of our framework lib. This main version builds against version 1.2 of the framework.”

“But… isn’t your framework up to version 4.5? Like… for years now?”

“Yeah, but this change only goes out to the 2.0 users, so you need to merge from main to master_51, then to frameworkupgradeA1, then to perky_peregrine. You’ll need to resolve conflicts.”

Nate ground his teeth hard enough to make diamonds between them, and fought his way through the merge conflicts. A few hours later, Nate’s one line change was merged into a releasable version, but Nate had no idea how that change would migrate to any other version, if it ever did.

Nate’s next assignment was to make a change to the same version, and since it was a larger change, he made a feature branch off of perky_peregrine, do the changes there, then merge right back into perky_peregrine after the work was done. Then he could propagate the changes back to the current “main” branch, asdfg. This resulted in an angry visit from Gordon.

“Are you trying to mess this up?” Gordon demanded. “There is a system. There are policies! Did you even read the development guide I gave you? Feature branches are fine, but they have to come off the main branch, not one of the dependent branches!”

Nate had tried valiantly to read it, but failed. “I was just going to do the work, merge into perky_peregrine, and then delete the branch, why does it matter?”

“Merge back?” Gordon shrieked. “DELETE the BRANCH? Branches don’t merge backwards, only outwards. Like a tree. Each feature branch is supposed to be an entirely new line of development. Have you even used source control?”

Something snapped in the back of Nate’s brain, because for a brief, terrifying moment, that almost made sense. Nate had been puzzling over the bizarre state of their source control repository, and those words from Gordon put understanding it within tantalizing reach. If he asked a few more questions, he might just see the method to this madness…

Nate chose the wiser path. He smiled, he nodded, he complied with Gordon’s policies, and moved on to the next feature, weeks after cutting through the shrubbery that was Gordon’s branching system.

The next feature was to make a change that only impacted users of the latest version of the base framework. The current “main” branch was back on version 2.3, so Nate needed to start by making a branch from there. Then he had to bring it up to version 4.0, then convert a few of the datafiles into a new format, then finish the upgrade to 4.5. This was about two weeks of hair pulling frustration. Then he could make his changes. He spent that week asking serious questions about the career path he was on. Finally, he could merge his changes into the actual 4.5 release branch, but never back into any master branch.

This resulted in tens of thousands of merge conflicts. The next few weeks were spent cutting through them, and by the end of that time, Nate discovered the semester was nearly over. He was about to graduate. He went to Lindsey, the co-owner of the small company, and handed in his resignation.

“We’ve been really impressed by your work,” she said. “You could stay on after college, if you like.”

Her tone was even, perhaps even a little indifferent, but there was a plea in her eyes. Nate vaguely recalled hearing that Gordon was a friend of Reggie, the other co-owner. Nate saw a hint that Lindsay knew what Gordon was doing to their software product. Maybe she thought Nate could be her ally in fixing it.

Or maybe Nate was reading too much into it. Discretion was the better part of valor. “I’m sorry, I just don’t think I’m the right fit for this team,” he said. They made the polite noises, she promised him a recommendation letter, they connected on LinkedIn, and Nate went off to find a source tree that didn’t look like a tangled briar.

A few months after Nate settled into his new job, he snooped on Gordon’s LinkedIn profile- he was unemployed. A message to Lindsay confirmed that she’d fired him over his inability to deliver new features. The last anyone had heard, Gordon had retired to a cabin in the woods, where he could be alone with many branches that never merged back into their trunks.

Editors Note: We meant no harm in teasing Douglas Adams, but your reaction was much more interesting than it would have been to another tired Twilight joke.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!