Wednesday, September 12, 2007

Branching for code-reuse

You wrote some code. Your app works. Now you want to do something slightly different. Timelines are tight. You want to give the new team enough control to get their job done. Yet you want to leverage what you've already done.

"Lets create a branch of the same code for the new team", you say, "Once they are through their time crunch, lets integrate the two branches."

Sounds simple. But there are three main problems with that:

  1. The time crunch never really ends. There is no time to take a break and merge.

  2. If you do find the time, you also find that the code has diverged to the point where merging becomes more expensive than maintaining multiple branches.

  3. Features are added, time goes on and re-use becomes next to impossible.


You started out thinking that re-use through branching is going to have a multiplier effect to the functionality you deliver. Initially, it is. But soon, it becomes a multiplier on how much you invest into getting simple stuff done.

So, what's the right way to do it? How do we avoid this? How do you get out of it? Well, there has been a lot written on code re-use. And I really don't feel like getting into that right now. It maybe a topic for another day. Today, I just wanted to say that if you're looking to branch your source code for re-use, then don't! If you really want to, then don't expect everything to be merged back. If you really really want to merge it back, then its going to cost you!

Wednesday, July 4, 2007

A girl named Suhasini

Her father left their village in northern Karnataka to find work in Bangalore. He never returned. Three children and the social stigma of being a single mother were more than Suhasini's mother could handle. That is when Suhasini was sold for the first time.

It was only four years later when she went to school again. But for Suhasini, a lifetime had passed before she landed at the orphage. Reading and writing would get easier once she learned to trust grown-ups again. She missed her mother. Or at least what she remembered of her.

Suhasini was one of the lucky few. She was rescued. Millions of children have been pushed into a life much more horrifying than hers. Having been involved with Asha for Education since 1999, I have met dozens and seen hundreds of children whose life has been altered for the better by organizations fighting child labor and trafficking. Their eyes twinkle with hope and their beaming smiles remind us that while we need to find a strategic solution to this despicable injustice, the tactical solution of taking care of these kids makes the world of difference to them.

This year, Asha for Education is bringing focus to these issues through our annual online fundraiser, "Work an Hour". Please visit http://www.ashanet.org/workanhour to engage and to contribute.

PS: Details of this story have been modified to protect the privacy of the kids involved.

Saturday, June 16, 2007

I'm starting a blog!

Woohoo! I’m excited! But what am I going to blog about? My intention is to write about two topics, primarily: socio-economic development (especially in India) and the art of software. But I’m sure other topics will creep up. We’ll see how it goes!