Monday, January 28, 2008

Why the Software Factory Analogy fails.

Software development is a domain of high change and instability.

There are studies that show that [ 1 , 2 ].

There are a lot of reasons for this fact:
  • Technically, software can easily and cheaply be changed.
  • Software systems are often very complex and therefore difficult to grasp at the first attempt.
  • New software often changes the way people work, so it changes the context in which it is growing. For further growth this new context has to be taken into consideration.
  • Technology is still changing so fast, that it is often not clear what is feasible at the time the a project will be done.
  • Software is meant to serve the business, not the other way round. When the business changes, software has to go along.
  • river.jpg
    The point is, that in software development change is not an avoidable effect but lies at the core of the domain!

    In the industry the domain of new product development has those characteristics of high change and instability.
    The area of mass manufacturing on the other hand does explicitly not have these characteristics: It is predictable and has a low change rate. This makes it possible to get a stable specification and reliable plans near the start.
    In my opinion concepts which are trying to bring the ideas of mass manufacturing to software development are not the way to go. Software Factories in the sense of the industrial revolution will never be possible.

    Even if you are able to ramp up an infrastructure that would technically allow mass manufacturing, you still cannot avoid dealing with change, which lies in the core of software development. Dealing with change does not fit into the process of mass manufacturing, it actually prevents it! [Remeber the armory scene in Jabberwocky?]
    I think the analogy for an optimal process, a perfect toolchain and a mighty framework should not be the factory but rather the perfectly equipped laboratory: Everything you need for work is available, but doing the work is still a craft and a creative process!

    Sunday, January 27, 2008

    Japanese Hardcore Tetris

    Saturday, January 26, 2008

    Understanding ? Redemption : Reinvention

    Those who do not understand Unix are condemned to reinvent it, poorly.

    -- Henry Spencer

    Friday, January 25, 2008

    Earn your Lunch


    Our Tech Lead buys us lunch every time we add 1000 unit-tests...

    -- Pramod Sadalage,
    IT matters #2

    Wednesday, January 23, 2008

    Enhancing Quick Look

    I fell in love with Quick Look, the new feature in OS X Leopard (Love on first Look?):


    It is very useful to quickly skim through your directories... just hit space and have a look!

    However, as it comes out of the box it's not yet very useful for a programmer, since for a lot of file types there is no useful preview-generator ...

    Fortunately there are several possibilities to extend/enhance the Quick Look functionality:

    The most convenient is downloading a generator and installing it into /Library/QuickLook or ~/Library/QuickLook. After putting a generator into one of those directories you have to wait some time, until the new generator is recognized. If you are impatient, you can execute qmanage -r in a terminal.

    A good source for Quick Look Plugins is

    But I still could not use Quick Look to look at my .properties-files. These are plain text-files, but you have to tell this to Quick Look. I achieved this by adding the following passage to the Info.plist of TextMate (-> Show Contents).
      <!-- inserted jb, 2080119 for QuickLook improvement -->
          <string>Properties in plain text</string>

    Then you have to touch /Applications/ on a terminal. The same should work for any other text-editor.

    I found this last tip here.

    Approaching eternity


    Eternity is a very long time, especially towards the end.

    -- Stephen Hawking

    Being on the last week on my current job, I feel it the other way round:

    The end can be a very long time, almost like eternity...

    PS: The above picture from the diamond store is called "half eternity" ... maybe not suited for a wedding ring?

    Tuesday, January 22, 2008

    Choosing vs. Deciding: Which is the real pain?

    Googling for "Pain" (don't ask!), I tripped over this funny picture:

    The green guy seems to have grasped the "Tell, Don't Ask"-Principle, which can be applied in a much broader context than just programming.

    But often the situation is the other way round:

    Blue Guy: "Just tell me what you want."
    Green Guy: "Cant't you just give me a list to choose from?"
    (Zapping TV-channels, anyone?)

    A person I worked with once said: "Usually the customer has to be forced to his happiness!"

    The next step leads into the realm of manipulation: Forcing the other side while giving the impression of leaving a choice... but that's a dangerous dance on the edge between a win-win-situation and a psychological warfare.

    PS: Do not confuse the "Tell, Don't Ask"-Principle with the "Don't Tell, Don't Ask"-Policy ...

    PPS: I thought about naming this post "Heading for Madness, Part 1.5"...

    Friday, January 18, 2008

    Faith no More?

    Microsoft has launched the .NET Reference Source project. They provide the source code of some parts of the .NET framework for reference and debugging for everybody. You can read more about it here.

    With a lot of enthusiasm I went to experiment with it ...

    ... and about the first lines of code that crossed my way were the following ones:

    try {
        using( Graphics graphics = Graphics.FromHwndInternal(IntPtr.Zero /*screen*/) ) { 
            string magicString = "The quick brown fox jumped over the lazy dog.";
            double magicNumber = 44.549996948242189; // chosen for compatibility with older versions of windows forms, but approximately magicString.Length
            float stringWidth = graphics.MeasureString(magicString, font).Width;
            width = (float) (stringWidth / magicNumber); 
    catch { // We may get an bogus OutOfMemoryException 
            // (which is a critical exception - according to ClientUtils.IsCriticalException())
            // from GDI+. So we can't use ClientUtils.IsCriticalException here and rethrow. 
    That is productive code from System.Windows.Forms.Form.

    Saturday, January 12, 2008

    Image is everything ...

    2008 is the year of computer science in Switzerland. This is a measure to reduce the shortage of IT-personnel. One goal of the project is to put computer science in a good light. But it seems there is still a long way to go...
    [picture found here. Ok, its from 2005...]

    Thursday, January 10, 2008

    Take it easy ...


    I think my computer is giving up (two weeks before me) ...

    Tuesday, January 8, 2008

    Care and Commitment - Don't even get started without them


    Programming is very difficult. To do it well requires a phenomenal amount of commitment. To motivate yourself and keep yourself committed, you need to have pride in what you're doing. If instead you consider yourself a mechanical assembly line worker, [...] then you're not going to have enough interest in what you're doing to do it well.

    This is from an interesting article about broken windows, technical dept and careful firemen.

    I personally like to share this belief. I like to see Software Development as craft rather than chore... but maybe this is a bit a romantic, blindfolded self-perception, and we wanna-be alpha-geeks are all just divas in disguise ...

    Mixins: Can you do it Ruby-Style? (Part 1)

    Ok, Ruby shows us how to do it:
    module TalkMixin
       def say_hello
           puts "hello"
    class Animal
       def eat
           puts "mpf mpf mpf ..."
    class Dog < Animal
       include TalkMixin
       def bark
           puts "wuff wuff"
    dog =

    Now, extension methods in C# allow us to do something similar:

    public interface ITalker{}
    public static class TalkMixin {
       public static void SayHello(this ITalker animal){
    public class Animal {
       public void Eat() {
           Console.WriteLine("mpf mpf mpf ...");
    public class Dog : Animal, ITalker {
       public void Bark() {
           Console.WriteLine("wuff wuff");
    public class MixinTest {
       public void Inerface_Mixin() {
           Dog dog = new Dog();
    Not bad... this technique is heavily used in .NET 3.5, for instance in the IEnumerable interface.

    Monday, January 7, 2008

    Configuring Ruby SDK in IntelliJ

    I have installed the Ruby Plugin into my current IntelliJ 7.02.

    You have to specify a 'Ruby SDK' when creating a new Ruby project. For me it was not obvious what that meant... But you cannot run your Ruby scripts out of the IDE as long as you do not configure the 'Ruby SDK'.

    After experimenting a bit I found out that you must point your 'Home Directory for Ruby SDK' to /usr. IntelliJ will then detect your Ruby installation.

    I am running OS X Leopard with the default Ruby installation.

    Picture 1.png

    Sunday, January 6, 2008

    Chain Reaction


    Along with separation of concerns comes testability and with testability comes maintainability.

    --Jeffrey Palermo, DNR 299

    Saturday, January 5, 2008

    Tainted Love


    As much as I love a debugger, it is disheartening to need to use it to understand my code.

    --Yet Another Language Geek

    This is meant as an argument in favor for functional programming.

    I think that moving away from an imperative statement-oriented style towards a declarative expression-oriented style does indeed help us not to fall into the vicious write-debug-circle. I mean, do you debug your SQL-expressions?

    On the other hand, isn't the possibility to assemble a complex program from simplest instructions the strength of imperative languages? Is it only my brain that has repeatedly problems to wrap itself around ever growing, conceptionally twisted SQL-expressions? I thought it was a common agreement, that SQL is hard to maintain? I would put a big part of the blame on its declarative style, that does hardly allow decomposition or modularization... and I am a bit afraid of seeing mainstream application languages moving in this direction.

    And somewhere out there is still lurking the danger of ready-only languages.

    Friday, January 4, 2008

    How do you want to spend your time in 2008?

    Last summer Scott Hanselman blogged about joining Microsoft. There he painted an interesting diagram:
    The diagram kept popping around in my head, especially in respect to my recent job-search. But I think the diagram can be looked at in a broader context:
    You only have a limited amount of time to spend for any aspect of your life, not just your job. The question is how do you want to spend the time you have?
    There are different strategies. All (or at least most) of them are perfectly valid. But I, for myself at least, think this should be a conscious decision and I could pay more attention to it.

    Well, I fear I am giving the impression of having an overdose of TheMeaningOfLifeAmericanBeautyWonderboysLostInTranslation- HighFidelityLoveActuallyBrokenFlowersTheBeach... but hey, its a new year and I am starting a new job next month. It has never been a better time for good resolutions!

    Thursday, January 3, 2008

    C# on the journey to functional programming

    From old-school imperative...
    var list = new List<int>(){1, 2, 3};
    int sum = 0;
    foreach (int n in list)
       sum += n;
    Assert.AreEqual(6, sum);
    ...over clumsy delegate...
    var list = new List<int>(){1, 2, 3};
    int sum = 0;
    list.ForEach(delegate(int number) { sum += number; });
    Assert.AreEqual(6, sum); sexy lambda.
    var list = new List<int>(){1, 2, 3};
    int sum = 0;
    list.ForEach(number => sum += number);
    Assert.AreEqual(6, sum);
    Related Posts Plugin for WordPress, Blogger...