Thursday, August 03, 2006

Lisp is changing my habits

Back when we were doing serious heavy-lifting on the agent for Manage most of the subversion wrangling inevitably fell to Jasko. He very quickly realized that his fellow team members were not doing the best of jobs putting meaningful comments with our source code repository commits. Often times he would end up wading through half-a-dozen revision numbers with absolutely no comments, trying to figure out which one he needed. He very kindly reminded us to make sure and include meaningful messages with all of our commits, and we (mostly) complied.

To make matters worse, I would often find myself with a working copy littered with many unrelated changes. Instead of breaking them up after-the-fact, they would often go into the repository with a comment listing all of the changes. At least there were comments! Of course, this made rollbacks and merges difficult if you were later only concerned with an individual change that occurred in a single revision.

Obviously the main culprit of my bad source code control habits is simply procrastination. I would let the commit tasks build up until someone needed the changes I had been making. "Hey Tim, you ever get the whazits name working?" someone would IM. "Oh, yeah. Let me commit that," followed by a dump of everything I had been working on for the last couple days. I think one factor that contributed subconsciously to commit delinquency was the long code-build-test cycle that our agent required. A full build of the agent on a dual Xeon workstation takes 7-8 minutes. This stretched out the whole code-build-test cycle enough that we all avoided anything that would require us to rebuild the entire project.

It hit me a few weeks ago that I was making commits on a much more fine-grained scale. I was committing almost every little change. While I would like to believe that I am improving on my very bad procrastination streak, I'm starting to wonder if it isn't something more subtle. With my current Lisp setup (SBCL, Slime and Emacs) I can now make a small change in a function, hit Ctrl-c Ctrl-c in slime, and in seconds determine if my changes were for the better. If it knocks out a task, I can commit, and mark it off my todo. While the REPL has obviously-cool implications that can make for strong advocacy fodder, I wonder how much it is the subtle changes in habit over the long term that make Lisp's allure hard to express.

0 Comments:

Post a Comment

<< Home