Better software through software architecture and devops

@jamessnape

Monthly Archives: March 2024

  • Grey spiral staircase looping upwards to a small patch of blue sky at the top.

    An early task for your new project it so configure an iteration path. Going a little further than the standard iteration model can help with planning later.

    Introduction

    The online documentation for iteration paths has a graphic which could cost you some time in the future. Care to guess?

    Example release and sprints

    In case its not obvious, the sprint numbering starts from 1 again for each release. In my experience releases can move around but you really want sprints to be a consistent drum beat for the project.

    Sprints

    This first question you need to answer is how long will a sprint be? You shouldn’t be changing the length at all so picking a length can be tricky. The scrum guide says this:

    Sprints are the heartbeat of Scrum, where ideas are turned into value.

    They are fixed length events of one month or less to create consistency. A new Sprint starts immediately after the conclusion of the previous Sprint.

    A single week is less common but useful where you are not delivering software and have very short deadlines; though at this point maybe a simple kanban would be more efficient. The most common length is 2 weeks. Microsoft DevDiv adopted a 3 week duration. 4-weeks seems a little too long for me, long enough to be doing mini-waterfalls which is to be avoided.

    I once heard somewhere is the length of a sprint should be as long as you can go and risk going in the wrong direction. Since feedback from customers only comes at the end of each sprint the opportunity for course correction is similarly timed.

    Personally, if you are delivering software I would pick two weeks unless you can make a great case for three. This is especially true if you are new to agile - you really want that feedback regularly.

    I would also recommend that you don’t start/end sprints on Mondays or Fridays - these days are often when folks are not around for various reasons. Plus, who wants to spend all day in sprint meetings on a Friday.

    You can now go and create a bunch of sprints in Azure DevOps. Create a nice long, but flat, list of sprints at the project level with start and end dates.

    Releases and other Milestones

    Only after you have your sprint list should you apply any hierarchy to it. A sprint should deliver potentially shippable code but often not released. A release is a more formal affair. Scheduling with milestones can help with planning at epic or feature level for larger projects.

    For large, long running product deliveries your planning will reach further out than your PBI backlog. At range, things get fuzzy so trying to plan in detail is a futile waste of effort. Remember that any work items specified but not delivered are considered inventory and incomplete work depreciates rapidly with knowledge and feedback gained along the way.

    To help, I’m a fan of multiple levels as shown below (also from Microsoft). At the top you have a strategic outlook for the next 12 months. These consist of epics only. Below that a roadmap of features you plan to deliver over the next six months. PBIs don’t start to appear until the quarterly plan which is your main backlog. Finally tasks are created during sprint planning.

    Sprints and Plans

    However you break this up you will have a hierarchy of iterations similar to the following:

    • Vision-2024
      • Roadmap-2024-H1
        • Plan-2024-Q2
          • Sprint-1
          • Sprint-2
          • Sprint-3
          • Sprint-4
          • Sprint-5
          • Sprint-6
      • Roadmap-2024-H2
        • Plan-2024-Q3
          • Sprint-7
          • Sprint-8
          • Sprint-9
          • Sprint-10
          • Sprint-11
          • Sprint-12
        • Plan-2024-Q4
          • Sprint-13
          • Sprint-14
          • Sprint-15
          • Sprint-16
          • Sprint-17
          • Sprint-18
    • Vision-2025
      • Roadmap-2025-H1
        • Plan-2025-Q1
          • Sprint-19
          • Sprint-20
          • Sprint-21
          • Sprint-22
          • Sprint-23
          • Sprint-24
        • Plan-2025-Q2
      • Roadmap-2025-H2
    • Vision-2026

    With a structure like this you can throw epics and features into a future planning bucket without worrying which iteration. This is a bit generic though; far better if you have catchy names for the vision, roadmap and plan levels since its easier to remember which one is current.

    Sprints won’t neatly fit into calendar boundaries like quarters, halves and years but its not a big deal. Just put an extra sprint somewhere or one less to keep them from drifting. Make sure the numbering is sequential still. Teams just work with sprints and its confusing if the sequence jumps.

    Also, there are no releases on this list, just planning windows. Releases are orthogonal to iterations and move around a lot so the release a work item is completed in may not be the one originally intended. You can use build and release numbers for tracking this instead.

    Since teams can use different iterations then unfortunately you need to select iterations at a team level too which just needs a lot of clicking. Go click one more time on Team Configuration Option: Auto Populate Team Iterations with Project Iterations if you would rather have them auto populated instead.

    If you are going to be doing a lot of this then scripting the creation of iterations is a way to save some time.

    Summary

    Usually iterations don’t get much thought at the start of a project and end up being rearranged as you need but they can be a useful way of planning deliveries at just the right level.

    Photo by Henry & Co. on Unsplash

    This entry was posted in agile  and tagged #agile #Azure DevOps #opinion  on .
    Discuss this on Twitter or LinkedIn
  • Image of two people drawing on whiteboard

    Which process model should you pick for your brand new Azure DevOps project? You can change later but its easier to get it right at the start. Some processes might even cause you issues.

    Introduction

    There are four process models supplied currently: Basic, Agile, Scrum, and CMMI. I’m not going to regurgitate the information already available online. Go and read for yourself the main distinctions among the default processes. Some differences might not be that obvious but will become apparent later.

    History

    Azure DevOps has technically been around for quite some time. Before its current incarnation it used to be an on-premise version called Team Foundation Server (TFS). Before that I belive it existed as a Microsoft internal tool called Source Depot, but that might just have been the source control tool. TFS had two process templates - Agile and CMMI. Both of these were designed specifically for the Microsoft Solutions Framework process used by Microsoft Consulting Services, and others. It was part of my job at Microsoft to go and talk to customers about it as you can see from this very dated PowerPoint. Gotta love that gold gradient shadow text.

    Introduction to Microsoft Solutions Framework slide deck front page

    The two flavours of this process were MSF for Agile Software Development and MSF For CMMI® Process Improvement.

    Microsoft Solutions Framework Families and Products

    So, the current Agile and CMMI process models have been around for a while. Both of them pre-date the first official Scrum guide release in 2010. They have been tweaked but not really modified to stay current. I can’t imagine any team in Microsoft follows these processes any more.

    Making Your Selection

    The history above is useful context but doesn’t say why you shouldn’t use these models apart from the fact they are old.

    The CMMI process is really heavy with extra work item types and states used to manage a formal change management process. Work items have lots more fields that need to be filled out and steps from start to finish. It doesn’t scream agile.

    The Agile process, on the other hand, is a bit sly. It uses the right terms like User Story, Acceptance Criteria, and Story Points but a couple of things don’t really marry with modern agile.

    Firstly, the state transitions New > Active > Resolved > Closed. There isn’t a state that really represents the backlog. You could use New but then you are mixing up work with the half baked ideas that may not make it onto the backlog. Also, the Resolved state implies there must be some form of verification before closure and that they must be done in order. Cross functional agile teams work together on committed work items until they are done. Sequencing work via a Resolved step means you are queuing.

    Some fields can be unhelpful too specifically the Completed Work field which I wrote about a long time ago: https://snape.me/2014/09/06/tracking-hours-worked-on-a-scrum-task-is-counterproductive/. Interestingly, I’ve just checked my current Azure DevOps and this field has been removed from the Agile process so it is being improved.

    To recap the above in a nice easy summary.

    Do not use the Agile or CMMI process models.

    The two remaining models are Basic and Scrum. I love them both but they have very different purposes.

    The Basic process model it reduced to a bare minimum. All work items are simply Issues with a higher level Epic. To differentiate different types of work you use tagging in the same way GitHub uses labels on its issues. Issue states are To Do > Doing > Done without extra process steps too.

    The Scrum process model really looks like modern scrum with Approved > Committed > Done states to map onto product backlog, sprint backlog and done respectively. Additional approval states are removed to encourage in-sprint completion. Even the terminology of Done vs Closed maps better onto agile. Feature work items aren’t defined in scrum but I find them useful as a unit of release deliverable vs product backlog item (PBI) as a unit of sprint deliverable (more on this in a future post).

    My rule of thumb for choosing between these two process models is:

    It the process is for delivering software then pick Scrum otherwise pick Basic.

    I use the Basic process model all the time for ad-hoc boards and task tracking for example: tracking architecture review board work, personal to do lists, support ticketing, governance structures etc. It is particularly useful for use with business users and other non-technical customers because most folks will understand the basics of a to do list whereas trying to describe the nuances between a task, a bug and a product backlog item can be tricky.

    Dealing With Process Jealousy

    OK, so you picked Basic or Scrum but you quite like some of the things in other process models? That isn’t too much of an issue since you can copy the definition of an interesting work item from the model it lives in to your model. There is an important point though:

    Always create an inherited process before selecting one for your projects.

    You cannot change the standard processes so save yourself a minor inconvenience in the future by creating a model you can modify when you need to.

    Examples of work item types I often add are:

    • Question - used to document known unknowns typically associated with architecture or planning activities.
    • Decision - for tracking decisions that need making and the outcome of those decisions.
    • Feedback - used to formally track feedback from show and tell sessions. Often I prefer to just add new children (tasks or PBIs) to the existing work item than needs more effort.

    Finally

    Its a trivial step at the point you create a project in Azure DevOps. Picking the right process model can help point you in the right direction. I’m interested in how you chose the right process or what work item types would you add? Click one of the buttons below and tell me.

    Photo by Kaleidico on Unsplash

    This entry was posted in agile  and tagged #agile #Azure DevOps #opinion  on .
    Discuss this on Twitter or LinkedIn
  • Image of a white mug on a table with 'Everyone is entitled to my opinion' written on the side

    Teaser article for a series on how to do agile without starting from scratch.

    One of the core tenets of agile is continuous improvement and finding out what works for you. This comes from the principle that:

    At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.

    For this reason I’m hesitant to provide a ready made process to folks. Saying “here, do all this and you will be agile” feels wrong. I’ve been the subject of one of these consulting led lean transformations so I know what its like to have a bunch of outside folks tell you how to operate.

    On the flip side I’ve been involved with agile projects since the start in 2001 and before that one of the precursors ‘rapid application development’ so I would say I have a lot of experience to share. I’ve worked in high performing teams and seen cases where agile has been misinterpreted and failing. I would like to share these experiences and resulting advice.

    Over the years I’ve developed an system of agile that works for me. My interpretations go beyond the scrum guide or agile principles. It continues to evolve as expected. Some of the articles on this site are going to describe this system, opinions on commonly accepted practices such as planning poker, and other suggestions.

    Whilst these work for me they may not work for you. There is no reason not to continue with your existing improvement process. If you read along you will find thoughts on Azure DevOps process models, team structure, giving value to epics, specific steps to running scrum ceremonies, tips like card styling and more.

    Feel free to borrow the ideas and make them your own.

    Photo by Steve Johnson on Unsplash

    This entry was posted in agile  and tagged #agile #opinion  on .
    Discuss this on Twitter or LinkedIn
  • "Queue for Coffee". You know they serve good coffee when you see this. A line of people queuing for coffee at a street vendor. Rusty's Market, Cairns Australia.

    Queues are used to load balance work between teams but its easy to overlook a decrease in efficiency they bring.

    Its fairly common knowledge that batching work causes inefficiencies. This is why a core technique for lean software delivery is map your value stream and then limit the amount of work in progress. I wanted to see just how much efficiency can be gained by removing queues so started to map this with an idea example.

    Traditional Batched delivery

    Imagine we have a fairly standard software delivery pipeline: specify, build, verify, and release. I’m being purposefully vague here as the actual work doesn’t matter. In a traditional waterfall style delivery you would generally work on the specify part first to create a big requirements document; chuck it over the wall to the next team to build; once they have done that the built code gets chucked at the next team to verify; and finally the finished product is released to live.

    It not that obvious but the requirements document, the built code and the release package are queues. They contain a batch of work for the next stage.

    Lets visualize this by creating an ideal delivery pipeline. Imagine we have 10 work items; all exactly the same size; so they all take exactly one day to complete at every stage. (I know this isn’t the case in reality but that would only makes things worse.) The delivery plan as work flows through the process is shown below:

    DayBacklogSpecifyBuildVerifyReleaseDone
    WaitingDoingDoneDoingDoneDoingDoneDoingDone
    110
    291
    3811
    4712
    5613
    6514
    7415
    8316
    9217
    10118
    1119
    1210
    1391
    14811
    15712
    16613
    17514
    18415
    19316
    20217
    21118
    2219
    2310
    2491
    25811
    26712
    27613
    28514
    29415
    30316
    31217
    32118
    3319
    3410
    3510
    3610
    Total101001010010551

    Each step in the above process has an active ‘Doing’ column and a waiting ‘Done’ queue. Since the output queue for one stage is the input queue for the next I leave the work items in the done queue until they can actively be worked on. This helps calculate the active time and waiting time metric for each process.

    Since the release stage doesn’t involve processing items at the individual level you can see the whole package is released in one go.

    If we add up the values in the columns and work out the active and waiting times and also calculate the average cycle time for this configuration we have a maximum work in progress of 10 and timings:

    Days
    Cycle Time29.5
    Active Time31
    Waiting Time255
    Total Time286
    Calendar Time36

    So what if we don’t batch the work into a document?

    Limiting WIP by Sequencing

    This time the only thing we will change is to pass work to the next queue as soon as we have completed it. Everything else stays the same.

    DayBacklogSpecifyBuildVerifyReleaseDone
    WaitingDoingDoneDoingDoneDoingDoneDoingDone
    110
    291
    3811
    47111
    561111
    6511111
    74111111
    83111112
    92111113
    101111114
    11111115
    1211116
    131117
    14118
    1519
    1610
    1710
    1810
    Total1010101010551

    Immediately we can see the whole thing is far shorter. Calculating the metrics for a WIP of 1 we have:

    Days
    Cycle Time11.5
    Active Time31
    Waiting Time75
    Total Time106
    Calendar Time18

    Note the active time is still 31 - its the same amount of effort as before but the whole thing is done in half the time because we removed 100 days of waiting time! Consequently the average cycle time has dropped by over half too. Remember nothing else changed apart from removing the batch.

    I could stop here but this is a good point to look at further optimization.

    Remove the Queues

    The next simplest optimization is to remove the queues between stages. This is harder in the real world due to uneven work size and arrival rate but we can look at the theoretical flow.

    DayBacklogSpecifyBuildVerifyReleaseReleaseDone
    WaitingDoingDoingDoingWaitingDoneDone
    110
    291
    3811
    47111
    561111
    651112
    741113
    831114
    921115
    1011116
    111117
    12118
    1319
    1410
    1510
    1610
    Total101010551

    The stats are better still - active time is still 31 days but there is only waiting at the end of the process because the release time still need to deliver a bunch of work into live in one go. Cycle time is only 10 days.

    Days
    Cycle Time10
    Active Time31
    Waiting Time55
    Total Time86
    Calendar Time16

    As this point the only optimization left is to ask if the release team can increase their deployment frequency. It could be possible since items are queuing at release.

    Increase Release frequency

    Whilst we could release every day like the very best DevOps practitioners lets assume there is a limit in the release process which means every other day is the best possible.

    DayBacklogSpecifyBuildVerifyReleaseReleaseDone
    WaitingDoingDoingDoingWaitingDoingDone
    110
    291
    3811
    47111
    561111
    651112
    7411112
    8311122
    9211112
    10111124
    1111112
    121126
    13112
    1428
    152
    1610
    Total101010155

    The stats for this configuration are interesting - for the first time the active time has gone up because we are asking the release team to do 4 more releases. Similarly, the calendar time remains the same because we are still limited by the time it takes to get the last work items released but there is far less waiting and the overall cycle time has dropped to just 5.5 days.

    Days
    Cycle Time5.5
    Active Time35
    Waiting Time15
    Total Time50
    Calendar Time16

    Summary

    This simple exercise demonstrates how hidden waiting time delays deliveries and smaller batch sizes can rectify that. In reality you will need some queuing between stages to balance out demand in this configuration. Look out for hidden queues:

    • Documents handed from one team to another - the entire document is a batch.
    • Pipelined iterations in scrum teams - where the requirements are written in the sprint before dev and the testing in the sprint after; the iteration backlog becomes the batch.
    • Done states between Doing states
    • Approval steps

    If you practice Scrum then aim to complete work in a sprint (specify, develop, and verify) or you are leaving waiting time on the table.

    Photo by David Clode on Unsplash

    This entry was posted in agile  and tagged #metrics #lean #devops  on .
    Discuss this on Twitter or LinkedIn