views:

86

answers:

4

Hi,

Further to my question at accidentally-released-code-to-live-how-to-prevent-happening-again. After client UAT we often have the client saying they are happy for a subset of features to be released while others they want in a future release instead.

My question is "How do you release 2/3 (two out of 3) of your features". I'd be interested in how the big players such as Microsoft handle situations like.. "Right we're only going to release 45/50 of the initially proposed features/fixes in the next version of Word, package it and ship it out".

Assuming those 5 features not being released in the next release have been started.. how can you ignore them in the release build & deployment?

How do you release 2/3 of your developed features?

How to release a subset of deliverables?

-- Lee

A: 

Its usually a function of version control, but doing something like that can be quite complicated depending on the size of the project and how many changesets/revisions you have to classify as being desired or not desired.

A different but fairly successful strategy that I've employed in the past is making the features themselves configurable and just deploying them as disabled for unfinished features or for clients who don't want to use certain features yet.

This approach has several advantages in that you don't have to juggle what features/fixes have been merged and have not been merged, and depending on how you implement the configuration and if the feature was finished at the time of deployment, the client can change their mind and not have to wait until a new release to take advantage of the additional functionality.

Dan Rigby
+1  A: 

If you haven't thought about this in advance, it's pretty hard to do.

But in the future, here's how you could set yourself up to do this:

  1. Get a real version control system, with very good support for both branching and merging. Historically, this has meant something like git or Mercurial, because Subversion's merge support has been very weak. (The Subversion team has recently been working improving their merge support, however.) On the Windows side, I don't know what VC tools are best for something like this.

  2. Decide how to organize work on individual features. One approach is to keep each feature on its own branch, and only merge it back to the main branch when the new feature is ready. The goal here is to keep the main branch almost shippable at all times. This is easiest when the feature branches don't sit around collecting dust—perhaps each programmer could work on only 1 or 2 features at a time, and merge them as soon as they're ready?

Alternatively, you can try to cherry-pick individual patches out of your version control history. This is tedious and error-prone, but it may be possible for certain very disciplined development groups who write very clean patches that make exactly 1 complete change. You see this type of patch in the Linux kernel community. Try looking at some patches on the Linux 2.6 gitweb to see what this style of development looks like.

If you have trouble keeping your trunk "almost shippable" at all times, you might want to read a book on agile programming, such as Extreme Programming Explained. All the branching and merging in the world will be useless if your new code tends to be very buggy and require long periods of testing to find basic logic errors.

Updates

How do feature branches work with continuous integration? In general, I tend to build feature branches after each check-in, just like the main branch, and I expect developers to commit more-or-less daily. But more importantly, I try to merge feature branches back to the main branch very aggressively—a 2-week-old feature branch would make me very, very nervous, because it means somebody is living off in their own little world.

What if the client only wants some of the already working features? This would worry me a bit, and I would want to ask them why the client only wants some of the features. Are they nervous about the quality of the code? Are we building the right features? If we're working on features that the client really wants, and if our main branch is always solid, then the client should be eager to get everything we've implemented. So in this case, I would first look hard for underlying problems with our process and try to fix them.

However, if there were some special once-in-a-blue-moon reason for this request, I would basically create a new trunk, re-merge some branches, and cherry-pick other patches. Or disable some of the UI, as the other posters have suggested. But I wouldn't make a habit of it.

emk
I think I like your idea about having a branch for each new major feature.. in theory.. except i would still want people checking in often even if it is to the branch. As my CI will be initially checking the trunk would you set CI up on the branches as well??
Lee Englestone
Also i'm coming from the viewpoint that the new features may have been merged into the trunk for UAT, then after UAT the client wants 2/3 of the new features to go live. Can you demerge? Or would you find a point in the repository before the 1/3 unwanted feature was integrated but the other 2/3 were?
Lee Englestone
I've tried to answer some of questions. The answers are based on my own personal experiences, so your mileage may vary. :-)
emk
+1  A: 

This reminds me a lot of an interview question I was asked at Borland when I was applying for a program manager position. There the question was phrased differently — there's a major bug in one feature that can't be fixed before a fixed release date — but I think the same approach can work: remove the UI elements for the features for a future release.

Of course this assume that there's no effect of the features you want to leave out with the rest of what you want to ship... but if that's the case just changing the UI is easier than trying to make a more drastic change.

In practice what I think you would do would be to branch the code for release and then make the UI removals on that branch.

Jeffrey Fredrick
Cheers Jeff sounds good
Lee Englestone
A: 

That's easy, been there done that:

  1. Create a 2/3 release branch off your current mainline.
  2. In the 2/3 release branch, delete unwanted features.
  3. Stabilize the 2/3 release branch.
  4. Name the version My Product 2.1 2/3.
  5. Release from the 2/3 release branch.
  6. Return to the development in the mainline.
Slava Imeshev