Why you can't find the latest version of your source code

Managing code developed collectively is a hard problem

Have you ever had a discussion like this?

ALICE: Hey, Bob, in ImportantResearchProject I need to make some changes to SuperDuperModel. I have a two-year old version of the source code. Do you know if it’s up-to-date?

BOB: No, I fixed several bugs a few months ago. But maybe my copy is also outdated—I think Charlie worked on it lately.

If you have, you are (obviously) not alone. You have probably tried putting the thing in some kind of shared folder, but this has created more problems than it solved.

Unfortunately, the “correct” solution—using a “version control” or “source control management” system—is hard to learn. One reason is that the problem these tools are solving is inherently complicated. The other reason is that the most popular such tool, “git”, has a very confusing design. A joke goes that git is easy to understand once you get the basic idea that branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space.

We programmers have learnt git—it’s our job to do so. But scientists and non-computer engineers aren’t the kind of people who enjoy learning such a tool. In theory your investment will pay off and you should learn git. In practice, you are likely to never do so.

Therefore I suggest that you continue having silly discussions with Bob and Charlie about the whereabouts of the source code—the good news is that in many cases the primitive solution works, if suboptimally.

If, however, you decide to learn git, AND you think that the other people involved will also learn it, I suggest that you read Pro Git. You probably only need chapters 1, 2, 3 and 6.