Confessions of a Recovering Proprietary Programmer, Part III

My first-ever source-code control system was a large metal cabinet filled with these:

 

 

Punched Cards

This worked quite well, especially once you mastered the art of creating drum cards for the keypunch and of programming the card sorter. You will notice that this punched card (from an assembly-language program for a now-ancient machine) does not have a sequence number punched in the right-most columns, meaning that I was still in the process of writing it when this deck was punched. Another trick essential to preserving my sanity in case the rubber band broke was to use a felt-tip pen to draw a slanted line across the edge of the deck. This allowed me to reassemble the deck by restoring the line. I printed listings very frequently, marking them up before keypunching the changes. In the worst case, I could then use a recent listing to get the card deck back into some semblance of order. Or keypunch it from the listing in case the cardreader was especially hungry that day.

Of course, the BASIC programmers would ostentatiously drop their card decks any time someone new showed up. You see, the old versions of BASIC required a line number on each and every line, in ascending order. This meant that such a BASIC program had the same meaning no matter what order the cards were in: the first thing that the BASIC interpreter would do was to sort the program into line-number order.

But later on, as technology advanced, I found myself consulting for a company that had more advanced hardware, including hard disks with many megabytes of capacity. Because we had multiple developers working on this project, we needed a modern source-code control system. We therefore pressed a large whiteboard into service. Each developer would write the names of the files being modified in his portion of the whiteboard. All in all, this system worked quite well, especially given that we all worked in the same room.

Networking? That was for fishermen.

Remote access? Yes, we did download crash dumps over a 1200-baud modem, but not if we could possibly avoid it.

Even later, I consulted for a company that ran BSD 2.9 UNIX. We handled the source-code control problem by assigning different developers to the separate programs making up the application. We also made use of floppy disks for backup, though you had to be very careful, since accessing an empty floppy drive would panic the system. This was of course an excellent way of terminally annoying the other developers sharing the machine, especially given that this was long before “vi” gained the “-r” command-line argument. Listings were still vitally important, and it was not unusual to find oneself re-typing a program from a listing (hopefully not too far out of date) while vigorously cursing whoever tried to use the floppy drive without having first put a floppy disk in the drive.

Later still, I worked as a system administrator for a system that not only boasted 32-bit addressing, but also possessed almost a full gigabyte of disk. Suddenly, a tool called “RCS” appeared on the scene. This had an amazing impact — you could actually undo mistakes without having to find an old listing of the program!!! I used RCS for about 20 years, often wrapped up in elaborate scripts, but not infrequently in its raw form.

Of course, after I started working with the Linux community, I was introduced to a number of new tools, including cvs and bitkeeper. These supported remote access, but were otherwise similar in spirit to RCS. But mostly I just downloaded Linux-kernel tarballs, submitted patches, and quite happily left the source-code control to Linus and his maintainers.

Then, with much noise and fanfare, “git” arrived. My first encounters with this tool were not particularly happy ones. When I did need to access someone's git tree, I would delete my old version and reclone the new one. It was quite some time before I learned about git checkout linus/master, without which git remote update appears to be an extremely slow no-op. I did make a few attempts to actually modify a git tree, but these ended in frustration. It would be quite some time before I learned that git requires you to add files even though they are already there!!! After I learned the subtleties of git add and git commit -a, I had to wonder if this was some sort of divine punishment for having loosed RCU on the Linux kernel community.

Over time, numerous git how-tos appeared on the web, and they did help a little. The problem was that most of them were written for people who were new to source code control, so they didn't help dinosaurs like myself unlearn all the now-counterproductive habits from our decades with RCS. But over time, I read enough of them to be able to issue up to ten git commands without destroying my local git archive.

Over the past year, I started working with Ingo's and Thomas's -tip tree, which included README files that led me step by step through a few common tasks. Once I learned about the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL environment variables, the --signoff arguments suddenly seemed significantly less sadistic. When I foolishly made multiple changes to RCU at the same time, git add allowed me to split it up into several commits. Suddenly it made sense to tell git about a change to an already-existing file. The fact that git kept all my commits in time order grew on me (you can do this in RCS, but it requires much more care than I am usually able to muster). The git diff command frequently (but pleasantly) surprised me by doing what I meant it to, despite my having accidentally hit the return key before I was telling it all I thought it needed to know. The gitk command is wonderful, especially its ability to focus on only those commits that affect a specified list of files or subtrees. The git format-patch and git send-email commands automate the otherwise painstaking task of sending a multi-part patch to LKML.

So after some years of fear and loathing, I have finally gotten to the point where git is extremely useful to me. Earlier today, I even found myself explaining it to someone else.

Who knows, some day I might even start really liking git!