What is build and release management?

Last month I took on some new responsibilities at Fog Creek - I am now the build and release manager for our products. Since starting here a little less than a year ago, I’ve been making regular suggestions around our processes for developing and releasing our software. That, combined with a pretty heavy load on my manager, who was spending 50-75% of his time managing builds and releases, made it obvious that we needed someone whose sole responsibility was maintaining and improving our build and release scripts and processes. Once we all realized that I would be a good fit, I started the transition to this new role about a month ago.

So what do I do? Well, I see my responsibilities falling into a few major areas.

  • Monitor our daily builds and farm out any build breaks
  • Make sure the QA team has current builds for testing purposes
  • Create and deploy major and minor releases of FogBugz, Kiln, and our supporting tools (such as the Fog Creek website)
  • Improve, streamline, refactor, etc. all of our build and deployment scripts
  • Create and maintain developer and management tools related to building and releasing our software
  • Improve our company culture around builds and releases
  • Where appropriate , be a liaison between developers and the system administrators

When I worked on Microsoft Office, they had quite a large team of developers who took care of these responsibilities. Obviously, a smaller company will probably not even have a dedicated person doing these tasks - it wouldn’t make sense. But even one person development shops should take stock of where they stand in the areas I mentioned above. With a proper focus on these tasks over the last few years, I suspect Fog Creek could have delayed dedicating someone to this work. As it stands now, there is plenty to do, and I feel much busier than I did writing new features for Kiln. As I get deeper into the work and learn more about the responsibilities involved I may change my mind. Whether or not I do, I plan to share both what I currently know and what I learn through hard experience (or just from reading good books and blogs).

Productivity is about Habits. Period.

With all of the great advice about productivity in the world, why aren’t we all more productive? Why haven’t we figured out the right system for managing our time, our lives, our actions, or whatever, so that we can stop reading more self-help books? Or at least stop feeling like we should read more self-help books. Why do we jump at new planning systems, then jump back to old planning systems, only to give up on anything for a while before we realize we need something to keep us from forgetting stuff? More importantly, why didn’t the last system we tried, which seemed so promising, fall flat on its face? And why is it that your current planning system will fail - you know it will eventually, all the other ones did - leaving you looking once more for the silver bullet to end your inability to get things done while feeling calm and at peace?

You are the problem

The answer is simple, but hard to accept. You are the problem. You are the common factor through all of the failures. You are the one who couldn’t keep up the practices of each system; the weekly planning, the regular review of next actions, processing your inbox to zero, or remembering to copy tasks from one planner page to the next. And when you think about it you have to admit that for almost any practice espoused by some particular system or style of planning, if you were doing that one thing consistently you’d be better off now than if you weren’t.

I’ve often asked myself the questions above and often avoided the answer I just gave. It’s far more satisfying to just assume that the fault is in the system. That’s easy enough to do by claiming that it’s too complicated, or it’s not worth the effort, or it doesn’t cover enough unique situations, or it’s not a complete solution to your problems, or it tries to solve every problem, even ones you don’t have. While any or all of these might very well be true, I’m going to claim that that is not the real problem. If you’re still looking for the right planner, the right tool, the right technique, the right practice, it’s because you haven’t accepted personal responsibility for your own past failures. You’re blaming them on the tools, techniques, and practices you were using at the time.

Different Questions

Once you do take responsibility, truly owning up to the challenge of managing your own time and life, you’ll start to wonder what you could have done differently with the tools, practices, and techniques, rather than trying to find different tools, practices and techniques. The questions you’ll ask will be different. Why didn’t I do a weekly review each week? Why were my next actions lists overwhelming to me? Why didn’t my weekly compass translate into a good week? Why did my inbox zero devolve to inbox ten, then inbox 100? Why did a tickler file seem so useful in theory but fall flat on its face when I tried to use it?

Notice that these question don’t contain the assumption that the problem was with the tools, practices, or techniques. They contain the assumption that you could have done something differently to make things work out. Once you and I accept and internalize that assumption, we change the way we approach the problem. The answers to those questions look different than our past excuses for failure. Why didn’t I do a weekly review each week? Because I didn’t make it a priority and underestimated how much effort it would take to keep doing it regularly. Why were my next actions lists overwhelming? Because I spent more time making lists than actually doing anything on them. Why didn’t my weekly compass translate into a good week? Because I wrote it up on Sunday and never looked at it again through the week. Why did the tickler file fall flat when I tried to use it? Because I could never get into the habit of looking at it on a daily basis.

Habits

The root of each of these answers takes us back to developing good habits. The key to most productivity gains is not the actions that any given author or system espouses, but that you make those actions into habits. It’s not doing a weekly review, but the habit of doing a weekly review. It’s not next action lists, but the habit of keeping next action lists up to date and reviewing and doing the actions on them regularly. It’s not having a weekly compass but the habit of making one each week and using it to guide your actions each day. Its not getting to inbox zero, but the habit of getting to inbox zero on a regular basis. It’s not keeping a tickler file, but the habit of checking it daily.

Now I have to apologize. It’s not completely your fault that none of these planning systems or tools worked out for you. Part of the problem is that the proponents of Inbox Zero, GTD, 7 Habits, etc. don’t always focus on the development of habit as the key to success. They may pay lip service to it. They may, as 7 Habits does, even spend a fair amount of time talking about the importance of developing habits. But they don’t offer a step-by-step approach to creating new habits in your life, or eliminating the bad ones. And they rarely call out which specific habits you should develop and in what order. The 7 Habits mentioned in Stephen Coveys book also present the challenge of being quite abstract, and other systems sometimes espouse equally abstract principles that make it hard to develop actual habits which translate the principle into daily actions that improve your life.

Take responsibility

Remember, though you may not be totally to blame, it’s still your responsibility to do these things, not some author who lives across the country. You’re the one who needs to recognize that any given tool or practice isn’t going to improve your life unless you develop the habit of using it regularly and correctly. You’re the one who has to do the hard work to develop those habits. You’re the one who has to pick yourself up and keep trying after minor or major failures. And blaming the tool or practice when you haven’t done any of those things is a cop out.

I know. I used it as an excuse for too long. Even after I started developing new habits using the ideas at 6changes.com, it’s still taken months to realize how the power of good habits takes away my excuses. It’s humbling but it’s also very empowering.

One Change At A Time

One of the responses to my first post on the 6 Changes method of developing habits was from someone who admired how I had combined a few different things that I wanted to get done each day into a single habit that I did each night before going to bed. I took that to heart and tried to do the same again in March and April by bringing together some bad habits I wanted to overcome with my desire to start blogging regularly to create a single habit to work on. I started off well, setting aside time each day to write, timeboxing my internet surfing, etc. But because the individual steps weren’t really incremental improvements toward a single habit, I didn’t benefit from the slow but steady accumulation of conditioned responses. And because of that, some of the changes haven’t stuck at all. Others I manage to do sometimes, but I cannot say that they’ve become habits I’ll keep my whole life.

Basically, I fell into the classic beginners trap. Some initial success made me think I was more capable than I really was. So I tackled something even harder, only to have my true abilities and limitations made glaringly clear. The experience has taught me the value of some of the points Leo makes at 6Changes.com. I understood what he was saying my first time through the material, but I didn’t value them enough to make them a part of my efforts to develop new habits.

Pick One Thing

First, pick one thing to work on. That should be obvious from what I just said, but I want to emphasize this. If your “one thing” requires a blog post to explain how each incremental step is related to your overall habit, you’ve probably got more than one thing. If you find yourself explaining to a spouse or friend how this week’s “incremental step” fits into the overall goal, even if it doesn’t really build on last week’s, you’ve probably got more than one thing. If, after three weeks, you’ve got three separate triggers for the habit you’re developing, you’ve probably got more than one thing.

One thing means that there is one trigger for one simple activity that can be explained in a sentence of ten words or less, preferably without commas in the sentence. Yes, when you pick a habit like this, your weekly incremental steps will seem amazingly insignificant. That’s the point! To develop a habit that will last you need to do the same things over and over and over again.

Build Incrementally

Second, incrementally build the habit from the beginning to the end. My nightly planning session has largely stuck, despite being a few different activities, because I do them all at the same time. One thing I believe I did get right with that habit is that I built it up from start to finish. I didn’t begin with the things I felt would be most beneficial: planning my day, or writing in my journal, or going through my inbox. I began with simply organizing my desk area, putting things where they went. It was kind of hard at the time to start with something so simple, but by slowly building on what had gone before each week, it gave me a set of conditioned responses that are almost hard not to do each night.

If, instead, I had started with the things I most wanted done, and then added other steps before those, I would have broken that set of conditioned responses, possibly each week during the two months I focused on developing that habit. I never would have built up the conditioning that makes it effortless to keep practicing my habit.

Do The Core Quickly

Third, don’t leave the most important steps of your habit to the end. Just as you shouldn’t push the most important incremental steps for developing your habit to the first weeks if that will break up your conditioned responses, so you also shouldn’t leave them to the last weeks. However, the challenge here is a different one: you just won’t have as much time to solidify the habit if you add it at the end of your two months, before you move on to the next habit. The steps I added to my nightly planning in the last two weeks of February are still the weakest part of that habit. Partly, that’s due to the fact that I was trying to do more than one thing. But it’s also because I only did those steps for a week or two before focusing my mind and efforts on my next habit. This leads me to believe the best use for the last couple of weeks of habit development is reinforcement of earlier steps. It may be appropriate to divvy up your habit into 6 incremental steps and then for the last two or three weeks focus on those aspects of your habit that are the weakest.

Physical Actions

Fourth, physical actions are important. The habits and steps that involve physical action, even if it’s just typing on my keyboard, stick better than purely mental, emotional, or spiritual work. The physical actions of my nightly planning habit - sitting down, processing my inbox, typing on my keyboard, and kneeling in prayer - are easy and habitual. I have no problem doing them each day, and just doing them is a great benefit. But I know that my habit would be much more beneficial if I could really change and improve the mental and emotional aspects of the habit - the analysis of the past day, truly examining and consciously choosing what to do with my inbox items, as well as the plan for the next days activities, deeply communicating with God in prayer without being distracted by other thoughts, etc. Those changes are much harder to make. By their very nature, these mental activities cannot be both habitual and consciously chosen. If they are habitual, they lose their effectiveness.

However, if I could somehow tie them more closely to physical actions I suspect I could improve them more easily. I’d be interested in others thoughts on how to work on these aspects of developing habits.

Checkpoint

Steve Pavlina has said that you can do just about anything for a month. And he’s used that maxim to get him through some interesting changes in habit. But he also reserves the right to drop something if it’s not working out for him. I like this idea, and I feel that it would be a good addition to my current attempts to develop habits over the course of two months. I can take a step back after the first month and consider how the habit is helping and whether I want to keep it up. For most habits, especially the ones I’m working on initially, I suspect that the answers will be yes, but giving myself that kind of leeway can make it easier to start something more risky, something I’m not sure I want to commit to as a lifelong habit, even if I later decide to.

Exercise

So lets apply this learning to my next habit: exercise. My exercise of choice has always been running, and I recently got some Vibram Five Fingers to see if they would help me with some foot pain I’ve had off and on over the last few years. Overall, I think just wearing them on my commute is helping a little. It’s time to start running in them, and see how that goes. One of the things that probably contributed to past injuries was trying to run each day. So, although I’d like to work on my habit daily, I know I shouldn’t be running each day. And besides, I’d also like to develop some strength, by doing simple strength training (i.e. no weights, just stuff like situps and pushups). I can set aside 20-30 minutes for this each day, and possibly a little more on Saturday’s, though it will be hard to make Saturday’s workout follow a standard trigger.

For the pushups I’ll follow the program at http://hundredpushups.com, to develop a habit of doing them regularly. I’ll do the pushups on Monday, Wednesday, and Friday. On Tuesday, Thursday, and Saturday I’ll be running, initially very short distances. The pushups program by it’s nature is gradual, so I’m not worried about that. The running program I’ll follow will also be simple, and very gradual since I’m getting used to the Vibram Five Fingers:

  1. Dress to run, then shower
  2. Dress to run, Run a block and back, then shower
  3. Do a full 1/4 mile warmup
  4. Run 1/2 mile
  5. Run 1/2 mile, sprint all out for block or two
  6. Run 3/4 mile, sprint all out in the middle
  7. Run a full mile, sprint all out in the middle
  8. Reinforcement
  9. Reinforcement

Finally, I’ll want to do the checkpoint at one month just to decide how the running is going with the VFF’s and also because I’ve had some minor pain in one of my arms, and may need to stop the pushups. Overall, I’ m excited to get started on this one.

Tags - Subversion Conversion to Mercurial, Part 3

Well, if converting the trunk was a necessary appetizer, and converting branches was the meat and potatoes of Subversion to Mercurial conversion, then surely converting the tags is the dessert. We now understand all of the basics of converting the trunk and branches of a Subversion repository to Mercurial. All we need to do is pull over the tags that label specific revisions. Before we dive into dessert, let’s admire it a little by examining how tags are stored in both Subversion and Mercurial.

What Are Tags?

First, in Subversion, because revisions are stored as a set of pointers to the files that make up a revision, then a tag is just a set of pointers to the files at specific states in their history. This is done be making a copy of the file pointers we want in the tag at another location in the repository directory structure. O course, because it uses this generic way of creating tags, then tags might not only be tags. They could be branches, if further changes were made to the copied files. Additionally, a tag need not include all of the files in the trunk or in a branch.

Mercurial, on the other hand, records a tag as just a name associated with a revision id. That revision id specifies the entire state of the repository at that time, so by definition a tag includes all files in a repository. Additionally, tags in Mercurial are versioned, as any other file is. This means that your repository won’t know about tags created in another repository unless you’ve pulled the changes that create those tags, even though you may have the revisions specified by the tags.

Generically

As you can imagine, these fundamental differences make converting tags a very ambiguous process. Not any more ambiguous than converting branches, of course, but not any less either. The generic part of the algorithm that hg convert uses for converting tags, or the work done no matter what the type of the source destination, is fairly straightforward. The converter asks the source converter object for the tags, as a simple dictionary from the tag name to the revision id. The source revision ids are then mapped to destination revision ids, as long as that revision wasn’t skipped in the conversion process, e.g. by a file mapping that excluded it. The destination converter object then records the tags in the destination repository. The converter then updates the revision map, so that future conversions parent new children to the revision that creates the tags, rather than its parent. This avoids the problem of branching to create the tags. It also means that all tags are created after all other revisions have been converted into the new repository, which may seem odd. Unfortunately, it’s the least ambiguous way to convert the tags.

Finding the tags

Of course, this high-level description abstracts away the real work - getting the tags from the Subversion repository and putting them into the Mercurial repository. So let’s dive into the Subversion side first. Because of the way tags are recorded in Subversion repositories, as well as all of the non-tag things you can do with and to the files there, this is a rather tricky process, that can easily miss tags if the Subversion repository is in any way unconventional. Additionally, the algorithm may change if someone comes up with better heuristics for determining the tags in a Subversion repository. This comment before the algorithm for getting tags sums things up well:

# svn tags are just a convention, project branches left in a
# 'tags' directory. There is no other relationship than
# ancestry, which is expensive to discover and makes them hard
# to update incrementally.  Worse, past revisions may be
# referenced by tags far away in the future, requiring a deep
# history traversal on every calculation.  Current code
# performs a single backward traversal, tracking moves within
# the tags directory (tag renaming) and recording a new tag
# everytime a project is copied from outside the tags
# directory. It also lists deleted tags, this behaviour may
# change in the future.

The Subversion converter object goes through the svn log from the latest revision to the revision specified as the start revision in the converter config section (defaults to 0). From each log entry, it finds changes that are copies from one location to another, and sorts those copies from more specific to more general. Then it looks to see if the most generic copy is actually copying the tags directory itself. If so, we make sure that as we continue backward through the log we start looking in the old tags directory, rather than where it was moved to. Then, for each copy we check to see if the file(s) copied are copied into the tags directory.

After that check, we then look through all the copies seen so far, to see if the current copy is just a rename of an existing tag. If so, we update our record of the tag. The subversion converter object then checks each of the files added in the revision against the pending tags. If any file added creates a tag that tags files from different branches of the repository—i.e. files from the trunk as well as files from a branch—then it is discarded, since it cannot be represented in Mercurial.

Finally the source converter object goes through each pending tag, and determines the name. If the tag is a rename of another tag, it leaves it in the pending list, and continues to the next tag. Next it gets the revision id for the tag, by looking at the source revision from which the tag was created. Finally, if it hasn’t yet been added to the official tags list, it is.

Tagging the new repository

The work to put these tags into the new repository is much simpler. But first, one limitation of the tags conversion code is that all converted tags must be placed in a single cloned branch. This limitation exists because tags are not converted in line with other revisions, so the challenge of ensuring that changes to the .hgtags file are in all the right cloned branch repos is a tricky one. Each cloned branch could determine which tags apply to it, but then each cloned branch would have a different set of changes to the .hgtags file at its tip after the conversion, all of which would have to be merged when doing merges between these cloned branches.

So first, the destination converter object determines in which repository to place the updated tags. This is necessary if the –clonebranches option was specified on the command line, otherwise there is only one repository to put them in. It then loads up the old tags from the .hgtags file, and creates the full list of entries to be placed in that file from the tags dictionary retrieved from Subversion. If no new tags have been created, then it returns. If some have, then it saves the full list of entries to the file and commits the changes to the repository.

Summing Up

Now we’ve gone over all the basics of converting a repository from Subversion to Mercurial: the trunk, the branches, and the tags. But we’ve just barely touched on the many different tricks of converting repositories, and cleaning them up after the fact. Tools like svnadmin dump with dumpfilters, the mq extension to Mercurial, hg histedit, the hgsubversion extension, not to mention the possibilities with going through another VCS in the process, such as Git, all offer possibilities worth exploring when you run into issues with conversion. Though I don’t have concrete plans for writing about each of these, I will occasionally share tips and tricks as I learn about them. In the meantime, happy coding!