Monthly Archives: February 2011

Pimp my Team

Abstract

From the middle of January 2011, our organization has been working in a new structure. There were different outcomes of this change, one of them was that my former firefighting team has been dismissed, and so has the team introduced in my Kanban Nightmares article. This post is not about ther organizational change and its effects, but about the start-up of a new team in the agile world. I’m going to launch my first series of posts in which I’m going share – because sharing is good – the life of my new team in an agile perspective.

The title of the article is influenced by MTV’s Pimp My Ride series, in which talented and creative engineers are customizing cars. The team members and I are the engineers, and our way of working is the car. While watching the show, I got the impression that not every customization is necessary for having a well-functioning vehicle, but if I take away the fancy, unnecessary extras, the engineers are doing a damn well job. This is what we are going to do: customize our car, maybe a little bit too much, and after driving it a little, we are going to add new or remove existing extras in order to have a very good car. The show has the following chapters:

  • Introduction of the car owner, and her situation
  • Meeting, where the engineers discuss the customization – similar to a planning meeting
  • Assembling the car - short session about how the engineers are building the car
  • The showdown – the engineers present the car to the owner - explain what they have built and for what purpose
  • Test drive

Before starting the actual post, I would like to thank Daniel H. Pink and Olaf Lewitz for their insights on demo cancellation and rewarding systems, which topics will be presented shortly.

Read more »

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)

XP with Kanban instead of Scrum

Abstract

I’m going to step into a minefield, because in this post, I’m going to share my subjective experiences with Scrum, and I’m going to share the reasons why I moved from Scrum to XP + Kanban. I’m using the minefield metaphor, because every single sentence I’m going to share can be exploded with good explanations, mostly from advanced scrum practitioners.

Again, this post is going to be very subjective, and is based on my experiences from the last two years. So please keep this in mind, and be gentle when you share a comment.

The Background

Every organization is different. Ours is a strange one: we inherited Scrum, while the organizations we were working with were still doing waterfall. Scrum has a very different terminology, and since nobody else is doing it, they do not understand us. We had a lot of problems from misinterpretations. Story points are a good example.

For example, we told the project management that we are going to deliver 400 story points. They asked in reply how much that was in man hours? We answered that in Scrum we don’t count man hours, we are working with story points. They insisted on the man hours, and since they pay our bills, we gave in and made an estimation in man hours. Almost the same happened with sprints, because the higher-level organizations had release cycles of six months, while we had sprints of two weeks. This means that we deliver a lot of features in one giant step, and lose all the benefits of continuous delivery, like faster feedback on our product. And the list goes on.

After a while, I had the feeling that we are doing several things unnecessarily, and our management does not understand our output, and they don’t care what we are doing internally. Some of us made conversions between our Scrum measures and the company-required measures, which turned out to be a disaster. No one can make a good conversion in this situation. We started to fail, but not at the beginning, but at the worst place ever: around global delivery dates. Additionally, we spent two years trying to change our environment, and the way how people think in this environment. We failed at it, of course. The environment is huge, one small organization cannot make a difference, unfortunately.

My first thought was that we may be doing Scrum wrong. And the next one was that maybe Scrum is not the agile method that we should choose. There are lots of methodologies out there, we should try them out, and after that we’ll see whether we did Scrum wrong, or it just wasn’t for us. Henrik Kniberg has a very entertaining and thoughtful presentation on this topic. I highly recommend reading it.

So I decided that we are going to try out the Kanban methodology. The principles of Kanban would help us handle frequent changes and the diversified work item backlog. However, Kanban isn’t a software development methodology like Scrum. You cannot do Kanban, you need a process on which you apply the principles of Kanban. I usually hear the expression that “We are working in Kanban“, which is partially true. Actually they are working according to their process following Kanban principles. There is a difference. A very well known and good example is Scrum-ban. It is a Kanban system which is applied on the Scrum methodology.

We needed a process under Kanban, and I chose eXtreme Programming. I needed something without an exact requirement on iterations. XP also talks about iterations, but it is not based on them that strictly. DSDM was a candidate for 5 minutes, but it is also iteration-based. Crystal was also a candidate, but since we already have experience with XP, we know its principles – although we still have to practice –, I chose XP.

Read more »

VN:F [1.9.17_1161]
Rating: 10.0/10 (4 votes cast)

The Currency Format Kata

A couple of days ago, I needed a function which is capable of printing out a certain amount in Hungarian currency format. At that time I found the implementation of this function challenging, so I decided to implement it on my own, without googling for an existing solution. It was fun – as I expected – and I also realized that it would be a great Coding Kata exercise, because:

  • The exercise is quite simple
  • It can be finished in a short period of time
  • There are multiple choices on how to do it

The definition of the exercise:

Implement a functionality which shall receive a double number as string input. It shall format its input according to the Hungarian currency format, and it shall return the formatted value as string. In this particular format, the thousands are separated with spaces, and the decimal mark is a comma. You can assume that the input is always in the right format.

For example:

  • 100 -> 100
  • 1000 -> 1 000
  • 1000000.01 -> 1 000 000,01

I did the pilot Kata with my friend and colleague Tamás Győrfi in a pair programming session with TDD. we had a great time, and learnt new things even though we were unable to finish our implementation due to our time limit on the kata session. The following code demonstrates how far we got:

public class HungarianCurrencyFormatter {
    public String format(String number) {
        if (isInteger(number)) {
            return insertThousandSeparator(number);
        } else {
            String integerValueOfTheNumber = number.split("\\.")[0];
            StringBuilder formattedNumber = new StringBuilder();
            formattedNumber.append(insertThousandSeparator(integerValueOfTheNumber));
            formattedNumber.append(",");
            formattedNumber.append(number.split("\\.")[1]);
            return formattedNumber.toString();
        }
    }
 
    private boolean isInteger(String number) {
        return !number.contains(".");
    }
 
    private String insertThousandSeparator(String number) {
        final StringBuilder formattedNumber = new StringBuilder(number);
        for (int i = 1; i <= (number.length() / 3); i++) {
            int position = number.length() - 3 * i;
            if (position != 0) {
                formattedNumber.insert(position, " ");
            }
        }
        return formattedNumber.toString();
    }
}

The code above could use some refactoring, because there are duplications in the code such as calling the String#split() method twice, and the inserThousandSeparator method is not self-explanatory.

I tried a different way using the NumberFormat.getCurrencyInstance(Locale) method. The returned formatted String had some extras in it like an “ Ft” suffix and a strange thousand separator:

public class HungarianCurrencyFormatter {
    private static Locale HUN = new Locale("hu", "HU");
 
    public String format(String number) {
        NumberFormat currencyFormatter =
            NumberFormat.getCurrencyInstance(HUN);
 
        String currencyFormattedNumber =
            currencyFormatter.format(Double.parseDouble(number));
 
        String formattedNumberWithProperGroupSeparator =
            replaceLocaleSpecificGroupSeparatorWithSpace(currencyFormattedNumber);
 
        return removeFtSuffix(formattedNumberWithProperGroupSeparator);
    }
 
    private String removeFtSuffix(String number) {
        return number.substring(0, number.indexOf(" Ft"));
    }
 
    private String replaceLocaleSpecificGroupSeparatorWithSpace(String number) {
        char separator = DecimalFormatSymbols.getInstance(HUN).getGroupingSeparator();
        return number.replace(separator, ' ');
    }
}

The full source code is available on github.

The extras made the code a bit complicated, and I don’t feel that the second solution is much better than the first one. So I’ll keep exercising, maybe I found one which is much better than the versions above.

If the exercise is no longer challenging for you, you can do the following:

  • Accept any kind of string, and do proper error handling
  • Do the Kata with different constraints, like
VN:F [1.9.17_1161]
Rating: 10.0/10 (2 votes cast)