The shortest amount of time that could possibly work – shrinking your iterations

It’ll never work

It’s hard to believe this with my looks, but back in Liverpool I sang and played guitar in a band. One day, in rehearsal we were working on a new song, and I asked the guitarist to play an unusual arrangement.[1] His response was, “it’ll never work – the chords are going to clash together.”

Now bear in mind, at this point we are in a rehearsal room, with guitars strapped around our necks and plugged into amplifiers. It would have taken thirty seconds to try this out and see (or in this case, hear) whether or not it worked, but instead a long argument about music theory ensued. Eventually we played it, and it worked.[2]

In retrospect, to get the guitarist to try out the idea, what I should have done (instead of arguing about music theory), was to say, “you know, you might be right, but let’s try it – if it doesn’t work, we’ll know pretty quickly and we’ll try something else.”

A resistance to short iterations

One of the things I almost always find when working with customers is a reluctance to shorten their development cycles. Although they begin to adopt a lot of good development practices and are enthusiastic about the benefits of an agile approach, they’ve been conditioned over the years to think that there’s nothing achievable in a week or less, and they want to start out with iterations a month long or more.

This resistance to change was recently summed up by Mike “GeePaw” Hill as a case of the “Yabbits.”

Yabbitting is when people go through a sequence of resistance statements, where each statement begins with the words, “Yeah, but…”.

While Yabbits can be annoying, Mike goes on to state their value:

Yabbits don’t always, or even usually, represent real resistance to change. On the contrary, they are probes, whose intent is to test an idea’s prima facie validity.

A person who offers you yabbits is typically more open to an idea than a person who says nothing at all.

So when faced with this resistance, remember that these objections are often coming because people care and because they have real concerns. I should have been happy that the guitarist cared enough about how the song would sound, rather than just going along with my idea.

Often it is easy to show someone who is resistant to change a way forward by asking them to try something for a little while and show them that there is little risk in trying it out. This approach avoids getting embroiled in an argument about about some esoteric theory of agile software development (or music theory!) For some practices, the change may be perceived as risky, but for others, like shortening an iteration, or playing a new arrangement of a song, the risk is minimal.

The shortest amount of time that could possibly work

The problem with having long cycles (particularly when transitioning from a traditional approach to an agile one) is that the cycles tend to behave like mini waterfalls: most of the work gets done at the end of the cycle, the testers have most of the features dropped into their laps in the last few days of the cycle, and a lot of the real tools and practices needed for a sustainable pace (for example continuous integration, build automation, automated regression test suites and improved communication) often don’t happen early enough in the project for the team to get real benefit from them and ease their transition.

The benefits of a short iteration far outweigh the risks. The only real risk is that you won’t get much done in the iteration, and the overhead of settingClock up the iteration will be high. However, shortening the cycle means that you will not waste time in high ceremony activities, and any pain points or roadblocks will become evident very quickly. In addition, the risk of not achieving much soon disappears as you become much better at slicing requirements down into small but valuable features. You will also improve several techniques that will help you work at a sustainable pace.

To summarize, you will see the following benefits:

  • Risks and inefficiencies are exposed earlier.
  • High overhead activities like long meetings that don’t get you closer to your goal of releasing a valuable feature are removed or reduced.
  • The team will work together, swarming on a single feature until it is complete, rather than continuing to work across many features in the traditional manner.
  • Improved communication between the team and the business owners is necessary to keep the work flowing.
  • Automation becomes a necessity, rather than a nice to have.
  • Less temptation and opportunity to revert to old practices and do mini waterfall.

So given all of these benefits,  how short should an iteration be?

Ward Cunningham famously rephrased Occam’s razor when applied to software development as:

…ask yourself, “What’s the simplest thing that could possibly work?”

Let’s redefine an iteration in this way:

Ask yourself, “What’s the shortest amount of time that could possibly work?”

In other words, find the shortest time-frame in which you can get something of value to the business done.

How short is that? Almost certainly shorter than you think.

How do you get there? Luckily, several people smarter than me have some ideas.

The disappearing iteration meme

There has been a recent meme about shortening iterations, with several people blogging on the topic from different approaches.

Michael Feathers recently wrote about Zeno length iterations, where he proposes an experiment:

Suppose that you had an iteration of one week, followed by an iteration of 2 days, followed by an iteration of 1 day, followed by an iteration of one-half a day, and so on…

…you can deliver business value in shorter times than you can currently imagine.

From Michael’s perspective, one of the main benefits of short time boxes is that they force trade-offs and produce creative solutions. He concludes by saying:

Look at your product today.  If you only had one day to develop and deploy some feature, before putting the product on ice and letting it generate revenue as is forever, what would it be?

While I think Michael’s experiment is a little abstract, the point he is making is that you can deliver value with very small chunks of code – smaller than you think today.

Kent Beck recently proposed a different experiment in extremely short iterations, for a different reason, continuous deployment immersion:

Get the whole team in a conference room Monday morning. Choose a feature you are going to add. Have one person come up to the one machine in the room. Write one line of code. Deploy.

If you can’t deploy, erase that line of code and write a different line of code first. Deploy.

Once the deployment is done, write another line of code. Deploy.

About this time some of the rest of the team is going to be bored watching all the manual steps in the deployment. Have them go off and automate the most tedious, boring, or error-prone step. Bring the automation back to the conference room and start using it.

Kent suggests that by doing this, you will start to automate your deployment, automate your tests and understand a lot more about slicing up your features into smaller chunks.

By Friday afternoon you may not have made much progress on your feature (but you may be pleasantly surprised), but you will understand deployment much better than you do now. You will also understand how to slice development more finely and rearrange the pieces. You will also understand the value of automation.

He also (with tongue in cheek) concludes that it’s a crazy idea, but in reality, there is also a lot of value here. Forcing everyone to think about where their pain points are and making the pain points happen often (due to shortening the cycle) means that the team will be motivated to remove and automate those pain points and ultimately work more efficiently.

James Shore and Arlo Belshee also recently gave a very entertaining talk at the Lean Software and Systems 2010 conference, entitled “Single-Piece Flow in Kanban: A How-To.”

Single Piece Flow In Kanban

In it they propose stripping down a lot of the complexity of Lean and only having two queues, On Deck, and In Progress.

Ideally, only one item (Minimum Marketable Feature, or MMF to use Lean terminology) would be in progress at any time. Instead of moving the MMF through the traditional production line of Kanban (for example, through requirements definition, story queue, development, testing and deployment), you instead create a detective’s blackboard by putting all of the information about the MMF onto the board. The name comes from detective TV shows, where all of the information about a crime is displayed on a blackboard. This information might translate to tasks or information about the feature.

The whole team swarms on this single feature until it’s completed and then it is removed from the board and the next item added from the On Deck queue. What is fascinating about this talk is that while Jim and Arlo disagree about some details and definitions (including their definitions of an MMF), they both agree that this is a more efficient way to build software.

Try it!

While there are several approaches to shortening the iteration, or taking a Lean approach and not having iterations at all[3],  the best approach for you is the one that you try. Whether you take Michael Feathers’ approach of shortening the iteration length to find a workable minimum, Kent Beck’s approach of starting with a single line of code at a time, James Shore and Arlo Belshee’s Lean approach of swarming on a single feature, or some other means doesn’t really matter. What does matter is not being scared to shorten the cycle until things are a little uncomfortable and real work needs to be done to make efficiencies such as automation or continuous integration, or coming up with creative ways to solve problems and chunk up work.

Don’t get bogged down in figuring which way will be the best to shorten your iterations – that is like arguing about music theory when you have guitars in your hands. Instead, just pick an approach and try it.

You’ll soon arrive at the shortest iteration that works for your team, and it’s almost certainly shorter than you think.

And before you become a Yabbit and say “it’ll never work” ask yourself this: “what’s the risk?”

  1. For the music geeks amongst you, one guitarist would play the three chord trick in the chorus, and the other guitarist would play the relative minor chords at the same time []
  2. We recorded the song some time later and I think that those chords played together still sound rather nice []
  3. For more information on Lean and Kanban development, read Jeff Patton’s excellent post, Kanban development oversimplified []

Helper Application – DiffMerge – File Comparison and Merge tool

Interesting Find

As Software Consultants we are always on the prowl for tools and applications that can speed up the development and delivery process. One of our fearless leaders, Peter Drum, recently shared a tool with us and I thought I would pass this along. The tool is called DiffMerge and is distributed by SourceGear. From the SourceGear site, here are some features for DiffMerge:

DiffMerge is an application to visually compare and merge files for Windows, Mac OS X and Linux.

Product Features

  • Diff. Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing.
  • Merge. Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file.
  • Folder Diff. Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical or different.
  • Configurable. Rulesets and options provide for customized appearance and behavior.
  • International. Compatible with 42 different character encodings.
  • FREE. Full featured. Not a demo!

Why another tool (you may ask)? One of the tools that I had used until most recently was WinMerge. Some key points from the Keith Craig on the SourceGear blog regarding differences between WinMerge and DiffMerge below (the main point being that based on what you main intent is (comparing or merging) the tool you use may be different).

Things I really like about DiffMerge include:

  • You can select text from any of the panes and patch it together in the merge result window as necessary
  • It displays differences within a line, which can be a huge time-saver!
  • It does true three-way merges (it uses the common ancestor of a file to determine what it can merge automatically)
  • It is completely free for commercial or personal usage
  • I believe that one of most disappointing “features” of most compare tools has been an lack of displaying in line changes between files, most tools will show that a line has changed, but does not show the actual portion of the line that has changed. Chasing down an errant carriage return, or spelling change in a long line of code can take awhile. From the screen shots in the Blog above, you can see that this is addressed.

    Happy Comparing and Merging!

    Heilmeier’s Catechism – a checklist for software projects

    Speak & SpellUntil recently, I am ashamed to say that I had never heard of George Harry Heilmeier. A recent retweet by Roy Osherove on Twitter soon had me digging for more information.

    It turns out that not only was Mr. Heilmeier  a pioneering contributor to liquid crystal displays, he was a Vice President (and later CTO) of Texas Instruments during the time they produced the mighty Speak and Spell.

    Mr Heilmeier’s Wikipedia page lists an amazing amount of awards, including the National Medal of Science  and the IEEE Medal of Honor, but that’s not what sparked my curiousity.

    What was interesting to me about Mr. Heilmeier was a series of questions anyone should be able to answer when proposing a research project or product development effort. These questions are known as Heilmeier’s Catechism.

    Here is Heilmeier’s original list of questions:

    Heilmeier’s Catechism

    • What are you trying to do? Articulate your objectives using absolutely no jargon.
    • How is it done today, and what are the limits of current practice?
    • What’s new in your approach and why do you think it will be successful?
    • Who cares?
    • If you’re successful, what difference will it make?
    • What are the risks and the payoffs?
    • How much will it cost?
    • How long will it take?
    • What are the midterm and final “exams” to check for success?

    When I read this list, it struck me that these questions could easily be adapted as a software project checklist.

    With some small tweaks in language, this list becomes a standard project checklist that any consulting organization should work on with their customers to answer when deciding whether or not to go ahead with a project:

    Project Checklist

    • What is the underlying business problem we are trying to solve with this project?
    • What happens today? Is this problem worked around with manual processes?
    • What’s new in this approach and why do we think it will be successful?
    • Who are the project stakeholders?
    • If we’re successful, what difference will it make?
    • What are the risks and the payoffs? How can the risks be mitigated?
    • How much will it cost?
    • How long will it take?
    • How will we measure progress on the project? How do we know we’ve been successful?

    What about your organization’s project approval process? Does your company use Heilmeier’s Catechism to decide whether to give a project a green light? What other questions should be asked before starting a project?

    SOQL Group By – Grouping records in Salesforce.com

    Overview

    One of the most sought after features in SOQL (Salesforce.com Object Query Language) has been the inclusion of record grouping. While Aggregate functions such as Min, Max, Count, and Sum have been available, they have not been available to retrieve grouped Aggregate results. For example, if you wanted to retrieve the Count and Sum(Amount) of Opportunity Records grouped by an Account, you have to retrieve all of the Opportunities and create a loop to increment Counts and Sum based on the Account associated with the Opportunity. Ugly!
    With the introduction of the Salesforce Platform Winter 2010 release and version 18 of the API, grouping and a few other functions are available. In this post I will concentrate on the “GROUP BY” clause. In future posts, I will examine other clauses such as:

    • GROUP BY ROLLUP ()
    • GROUPING ()
    • GROUP BY CUBE ()
    • HAVING ()

    EXAMPLE

    In this example, I want to showcase the different types of Grouping and Aggregate Functions that can be combined to come up with some interesting results. I want to create a Visual Force Page bound to a Custom Controller, where I can display the results of the SOQL statement.

    First, let’s start with the Controller code. I wanted to bind the results of the query directly to a apex:dataTable, so I created an object to hold the Grouping values and Aggregated results. Below is the object:

    public class GroupedQuery
    {
        public string GroupBy1     {get;set;}
        public string GroupBy2     {get;set;}
        public string GroupBy3     {get;set;}
        public integer Count {get;set;}
        public Decimal Sum {get;set;}
        public Decimal Average {get;set;}
        public Decimal Min {get;set;}
        public Decimal Max {get;set;}
    }

    In addition, in order to bind an object to the dataTable within the Visual Force page, you need to expose a public member from your Controller code. For brevity sake, I just added a public List<> member like this:

    public List<GroupedQuery> queryResults {get;set;}

    Next in the Controller Constructor (keep in mind this is for demo purposes!) we use a SOQL query to retrieve a List of generic sObjects:

    List<sObject> queries = [select Account.Name AccountName, Count(Name) CountResult
                                               from Opportunity group by Account.Name];

    Once we have the Results we iterate through a loop to create our collection of GroupedQuery objects:

    queryResults = new List<GroupedQuery>();
    for (sObject query: queries)
    {
        GroupedQuery myObject = new GroupedQuery();
        myObject.Count = Integer.valueOf(query.get('CountResult'));
        myObject.GroupBy1 = String.valueOf(query.get('AccountName'));
        queryResults.Add(myObject);
    }

    The variable queryResults is exposed as a public variable from the controller and thus we can tie this List directly to a dataTable and access the public properties of the GroupedQuery object contained in the List. Below is the Visual Force page code:

    <apex:dataTable id="queryResults" value="{!queryResults}"
                    var="queryResultsRow" border="1" width="100%">
        <apex:column >
            <apex:facet name="header">GroupBy1</apex:facet>
            {!queryResultsRow.GroupBy1}
        </apex:column>
        <apex:column >
            <apex:facet name="header">Count</apex:facet>
            {!queryResultsRow.Count}
        </apex:column>
    </apex:dataTable>

    The code above will output the following results (the Account data is data from the Developer Edition of Salesforce.com)

    A more involved example is included below. This includes two levels of grouping, as well as Min, Max, Sum and Average functions:

    Summary

    As demonstrated, the new functionality released with the Salesforce.com API Version 18 with regards to Grouping is extremely powerful and addresses a pain point that many developers have had to overcome to achieve Rollup type queries. This information is contained within the What’s New notes for Salesforce.com Version 18. Keep in mind this is included with the Winter 2010 release of the Salesforce.com platform, so you will need to ensure that your organization has been upgraded in order to avail of this functionality.

    Are you tired of working with consulting companies who give you what you ask for, but not what you need? If you want to partner with us to extend your IT capabilities and produce real results, contact us

    public class GroupedQuery
    {
    public string GroupBy1     {get;set;}
    public string GroupBy2     {get;set;}
    public string GroupBy3     {get;set;}
    public integer Count {get;set;}
    public Decimal Sum {get;set;}
    public Decimal Average {get;set;}
    public Decimal Min {get;set;}
    public Decimal Max {get;set;}
    }

    It hurts when I do this – an open letter to Software Consultants

    There’s an old joke that goes something like this:

    A young woman went to her doctor complaining of pain.”Where are you hurting?” asked the doctor.
    “You have to help me, I hurt all over”, said the woman.
    “What do you mean, all over?” asked the doctor, “be a little more specific.”
    “The woman touched her right knee with her index finger and yelled, “Ow, that hurts.” Then she touched her left cheek and again yelled, “Ouch! That hurts, too.” Then she touched her right earlobe, “Ow, even THAT hurts”, she cried.
    The doctor checked her thoughtfully for a moment and told her his diagnosis; “You have a broken finger.”

    So what does this have to do with software development?

    Too many times consulting companies get customers to tell them what they want and then they build it. What’s wrong with that? Isn’t there an old saying that says the customer is always right?

    If you build what the customer asks for without digging deeper into the underlying business problem, then I guarantee that you will not build what they need. If you are just delivering a technical solution to a customer without figuring out whether you are solving the right problem in the best way, you aren’t giving your customer value for money. In fact, no matter how low you put your rates, you are short changing your customers, because you are charging them money to not fix their problems.

    Just like a doctor’s patient can describe their symptoms, but doesn’t necessarily know the correct prescription to cure their ills, a customer is typically able to describe the business problem they are facing – but that doesn’t always make them the best person to come up with the solution. You need to collaborate with the customer and dig deeper to understand what the underlying issues are.

    Of course, the customer is typically the expert in their domain and you should be the expert in yours, but you have to be more than just a technical expert to deliver business value. You need to be creative and passionate, you need to establish trust with the customer and build a collective sense of ownership of the problem so that you and the customer can both contribute to the solution.

    You can use techniques like the Five Whys to perform root cause analysis, but ultimately you need to be interested and involved with your customers and care about their business. Only after defining the root cause of the problem can you then relate the problem to a solution you can provide with your domain expertise.

    Ultimately, it’s not about delivering a project on time and under budget if that project isn’t effective; only by helping your customers succeed have you given value for money.


    Are you tired of working with consulting companies who give you what you ask for, but not what you need? If you want to partner with us to extend your IT capabilities and produce real results, contact us

    About us

    Michael Locherer Michael Locherer

    Michael (AKA “Milo”) serves as ext.IT’s President, and provides executive management of all ext.IT operations.

    Formerly CEO of a technology services company based in Munich, Germany, and a practice leader with Onyx Software’s European and North American professional services team, Michael brings more than 15 years of experience in the technology industry across a broad range of organizations.

    Milo will be blogging about business and software development.

    Peter Drum Peter Drum

    Peter serves as ext.IT’s Vice-President of Business Development and oversees all sales, partnering and business development in all geographies. Peter also manages the Australia/New Zealand operations of ext.IT through extend.IT Australia.

    Prior to co-founding ext.IT, Peter filled roles with Onyx Software’s North American and Asia-Pacific offices in vertical industry development and consulting management roles. Peter has more than 14 years experience in the technology industry across many geographies and markets.

    Peter will be blogging about business development and other topics of interest to him.

    Paddy Healey Paddy Healey

    Paddy serves as ext.IT’s Director of Technical Consulting and Methodology, overseeing the quality of technical deliverables and working on constantly improving our methodology.

    Prior to joining ext.IT, Paddy worked in corporate and government IT departments as well as Onyx R&D and  Professional Services. Paddy has more than 20 years experience in the technology industry.

    Paddy will be blogging about consulting and development best practices.

    Andy JimenezAndy

    Andy is a Technical Consultant at ext.IT. His job responsibilities include, well, whatever is needed! Andy has experience ranging from custom Systems integration,  web application development to SaaS platform development and more!

    Prior to joining ext.IT, Andy worked within Corporate IT departments as well as Onyx Professional Services. Andy has more than 10 years experience in the technology industry.

    Andy will be blogging about technical tips and tricks, new technologies and solutions to interesting business problems.

    Are you tired of working with consulting companies who give you what you ask for, but not what you need? If you want to partner with us to extend your IT capabilities and produce real results, contact us