Source code is just not enough

My English is just too bad to express in a “haniful” way my feelings, so please insert random curses and swearwords yourself: I’ll just jot down a few notes to let some steam off.

Suppose you’re a pretty successful software house: you have been developing a nice product and, also thanks to some kind of “innovative” and apparently OSS-friendly license model, you had some success and recognition. So much that you start having partners around the world, people who – apart from selling your stuff – are doing integration work for the enterprise.

Suppose that, due to some kind of oversight, you built your data model around a (weak) Map object, providing a simple API around it:

interface SuccessfulCompanyInterface {

     void doSomething(Map objectModel);
}

so that people extending your stuff had to do something like this:

class ConcreteStuff implements SuccessfulCompanyInterface {

     void doSomething(Map objectModel) {

          String foo = (String)objectModel.get("foo");

          Bar bar = (Bar)objectModel.get("bar");

          performSomeUsefulStuff(foo, bar);
     }
     
}

Now, some engineer with a clue notices how the model contract is too loose, and decides to build a proper object model:

interface ObjectModel {

     String getFoo();
     
     Bar getBar();
}

So far, so good, uh? Now, however, you have a problem: what happens to the SuccessfulCompanyInterface? How can you deal with that Map being passed around instead than your new nice and dandy ObjectModel? Well, for one everyone with some software engineering experience would think about something like this for a while:

/**
 * @deprecated starting from version x.x this interface 
 *             will be abandoned in favor of NewSuccessfulCompanyInterface
 */
interface SuccessfulCompanyInterface {

     /**
      *
      * @deprecated Don't use this anymore
      */
 
     void doSomething(Map someKindOfObjectModelAdapter);
}

coupled with:

interface NewSuccessfulCompanyInterface {

     void doSomething(ObjectModel model);

}

As an alternative, you could fire your engineer with a clue and make your partner’s life a living hell just like this:

class SuccesfulCompanyController {

   void someWhereInsideTheMainLogic() {

       ObjectModel model;

       Map letsFuckUpOurPartners = new HashMap();

       letsFuckUpOurPartners.put("model", model); // FOOOOOD FIIIIGHTTT!!!
       
       while (successfulCompanyInterfaceIterator.hasNext()) {

            ((SuccessfulCompanyInterface)successfulCompanyInterfaceIterator.next()).
                doSomething(letsFuckUpOurPartners);

       }
   }
}

so that EVERY piece of your partner’s code has to become:

class ConcreteStuff implements SuccessfulCompanyInterface {

     void doSomething(Map objectModel) {

          ObjectModel model = (ObjectModel)objectModel.get("model");

          String foo = model.getFoo();

          Bar bar = model.getBar();

          performSomeUsefulStuff(foo, bar);
     }
     
}

See? Now, to further ensure that you’re going to piss people off big time, just include this massive pile of stinking stuff inside a DAMN MINOR VERSION. And double check not to include this in the release notes, or at a very least hide it deep down a sleeve of perfectly useless stuff.

This minor nit (NOT!) is going to cost us a few days of painful debugging and double checking – of course there is no way to check this crap at compile time – loads of money and massive delays, not to mention a significant branching of our code to support this “minor version” change. Shouldn’t I be pissed off?

This is yet another proof that “bastardization” of Open Source doesn’t really work. In a fully disclosed environment, we would have had a guy developing stuff for the project, or at least monitoring mailing lists and giving us a decent advance warning before stuff hit the fan.

What really matters, once more, is an open process rather than just available source code. And while I do like (usually) the way the guys above work, I’m even more convinced that there is no substitute for the amount of control available in Open Source Software: it’s our business after all, for $DEITY‘s sake!

Comments

comments

2 thoughts on “Source code is just not enough”

  1. The importance of maintaining your SPIs
    Gianugo recently had a problem with a third party supplier modifying their SPI between minor versions. Perhaps more importantly, they modified it in such as way as to deliver almost no benefit, while simultaneously clouding the migration path. See his…

Comments are closed.