Category: agile

Small ‘a’ agile

It’s not the rituals, but the reason you do them that matters

Sailing ship in a storm
Image by Andy from Pixabay

Some history

The term agile as it’s used these days in software development came out of the publication of the Agile Manifesto in 2001. A group of experienced software developers came together and wrote some principles on a whiteboard. Most of these folks are now regarded as luminaries in the software business.

Why did they write the manifesto?

Before this most people worked on the assumption that software was an engineering discipline. If you think how most engineers work they have tightly controlled processes and books that say what the best approach is to building a bridge or a bend in the road. If you think about how complex projects like building ships are done then the emphasis was first to do all of the analysis (requirements), validate it somehow (check the designs), and then write the software (build the ship). The process of discovery was done in the analysis phase, then it was designed, and the software was almost supposed to write itself. Think create architect’s plans and then build the building, along with strict processes to make it happen. Even then it never goes smoothly.

The problem is that software is only 60 or so years old as a discipline, and has only been practiced by large numbers of people for maybe 45. We don’t have all of the knowledge that several hundred years of proper engineering gives us. Most of the time we’re still trying to work things out. We’re still inventing new programming languages and frameworks to find the best way to solve certain kinds of problem, there is no right way to do things in software. There is no best practice, just knowing what worked last time and building up experience to tackle common problems. As far as platforms go the internet itself isn’t actually that old, modern JavaScript frameworks are very new, in fact, and also constantly changing as people fix mistakes and bad thinking. We often discover better ways of doing things by writing the software itself. Sometimes faults in the specifications come up when we try to build things and we realise they’re full of contradictions.

Writing software isn’t the same as traditional engineering, despite people often being called engineers. It’s much more like a craft that you learn from experience, it may seem like something programmers do each on their own but getting good at it requires feedback. There are no recipes, if there were then programmers wouldn’t be needed. You could automate it. A recipe is an algorithm and can be automated if you have the right kind of tools. This is what the AI pushers claim can happen, but who then validates the code is correct and isn’t going to kill anyone, a different AI?

Additionally the engineering-style methods were often extremely bureaucratic as a function of the big companies that developed them. You often find that people criticise what is called the waterfall method that rigidly went from analysis to design to build to implementation, but in fact that characterisation is unfair to the person who first commented on it. He did put feedback loops in between the various stages, it’s just that the people who picked up the idea didn’t see them as being necessary, hence all of the bureaucracy around managing change. Highly controlled processes are necessary when you’re building military or medical software, there needs to be a high level of accountability and traceability if lives are at risk, but the other 99% of us can be a little more laissez faire.

All of the separation between the stages in the process that came from the bureaucratic approach also meant that the people who understood the problem from a business perspective were often very far away from the people who were trying to write the software to deal with it. This meant that we hit the big problem we always hit with software, or any complex endeavour:

All the problems you encounter are, at the base, communication problems.

  • A bug is a product of misunderstanding
  • Incorrect functionality is a misunderstanding
  • Going over budget is usually due to a lack of knowledge, assuming the budget was set correctly by people who knew what they were doing.

So the quest for agility, which is where we should be paying attention, is ultimately a quest to remove barriers to understanding and communication. With all of the things in that list, you should always be trying to identify how the problem arose and how to stop it happening next time. You don’t need to inspect quality after you’ve shipped it, you need to know it works for the people you wrote it for before it even leaves the gate.

The core of the agile manifesto

On the website it says

We have come to value:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

That is, while there is value in the items on the right, we value the items on the left more.

Some thoughts on the core

The first is actually quite against what passes for an agile approach these days. We have more tools and processes than we can shake a stick at. This is because they’re something that experts can sell to the rest of us. There are a few core concepts I like, and the rest is window dressing to make money for gurus.

The second working software point has been consistently misunderstood – it doesn’t mean no documentation, it means enough documentation to get you started, explain any gotchas, and the approach to any complex processing you’ve identified. I’ve become extremely tired of arriving on a project to find the only documentation is the code and the code was written by blind squirrels on acid who stopped doing tests because it’s faster. Save me from this lazy bullshit.

Customer collaboration is contained in the idea of having a business owner, but also someone to bounce ideas off. Far too often I’ve had to deal with the vague needs expressed in a Jira ticket that contains a couple of sentences and the person you need to clarify things with is too busy. Don’t let this happen to you. It also helps you work out what’s important to the people you’re writing the software for.

Responding to change means being willing to stop doing what you thought was important and instead work on what is important. It’s very hard to do if you’ve got embroiled in the sunk cost fallacy. It also means you need to regularly review what you’re doing and be really honest about what needs to happen. It’s also why you need to concentrate on being effective rather than efficient. Heading in the right direction is way more important than heading in any old direction as fast as you can because it feels good. Sometimes you have to slow down and do a lot of thinking to speed up.

The birth of methods and people selling consultancy

The drive to bring what’s needed in the software to the front and boost understanding of the needs of your customers is why we have the rituals we do in things like Scrum. The rituals alone are irrelevant. The understanding they generate, and the documentation that should be part of the process, are what’s important. Mechanically doing things because it’s in the calendar is not a recipe for success. Knowing why things are done and making sure everyone has the cognitive space to engage properly with them is more important than the rituals themselves.

The most complete version of an agile approach is Extreme Programming (XP). The best book I’ve ever read on XP is The Art of Agile Development. It contains all of the practices and explains the pros and cons of using them.

XP was seen as expensive and difficult to implement because it needs heavy commitment to get it working properly, plus a real understanding of how to do work with other people. It’s still the gold standard, in my opinion. It’s also very developer and development focussed so harder for non-technical management to understand.

Several other ways of trying to encapsulate this need to communicate often and well were thought up, but the one that eventually won out was Scrum. Scrum is relatively cheap to implement and only has a few core ideas:

  • Sprints
  • Daily standup
  • Sprint planning
  • Retrospectives
  • Demo
  • The business owner

There’s a few ancillary things like burn down charts, but that’s the core. XP came from the developers trying to make things work better and it has TDD and pairing as part of the approach, where they’re usually add ons for Scrum. XP’s roles are also much more flexible, which makes it harder to sell the recipe to a willing audience because there isn’t one.

The project management iron triangle turned into a square

Historically there were three parts to managing a project:

  • Cost
  • Time
  • Quality

It used to be said you can pay attention to any two of these but not all three. One of the things that is an accidental product of the adoption of agile ideas was that people realised there is another leg to this, scope. If you manage the scope well you can deliver on all three of the other legs, as long as you’re willing not to deliver everything all at once. It’s also why the methods use short iterations, it means that you can discover what scope matters without having to redo all of the mountain of analysis doing the entire thing upfront would require.

There’s also some other things to do with scope, for example doing the most risky things first, because if they can’t be done the rest of the project is impossible. Sometimes you need to do the least risky to help you get all of your testing and deployment infrastructure working. The point is all decisions about the approach should be deliberate and not because a book, or course, or coach, said so.

Capital A

In the early days people used to say they were doing Agile. A lot of us used to find this a bit worrying. It seemed that it was something you could turn on and off. It also fitted into the whole thing about doing the rituals and following the rules, without understanding why they were there.

Small a

Instead the push is about being agile. Making it the way you are, and having organisational behaviours that improve what you have. You may choose not to do certain things that are canon because of your circumstances. The book on XP mentioned above says that you should do all of the things it recommends for several months before dropping any of them or you will never understand their value properly. Despite my saying you shouldn’t take things just from a book I think it’s good advice.

I used to call myself a recovering agile practitioner and be very anti things like regular stand up meetings if they weren’t needed. Doing things deliberately is the way. Doing things because everyone else is doing them is not.

Steady cadence

One of the goals is to have a steady rhythm to the work, so it gets done but without lots of stress. Again, short iterations support this, you can see things being built. Not having to deliver something for six months is a recipe for disaster because humans are bad at thinking that far ahead and it’s very hard to track things over a long period.

Stress from poor planning engages the fight or flight mechanisms of the body. The energy is moved away from your brain so you can deal with trouble. You’re instantly stupider than you were. Taking time to think things through and not rushing and forgetting things ends up with a far better outcomes. The silly mantra you see in job specs, where it’s said be able to cope in a high stress, high pressure environment when that means you’re going to be acting stupid and going along with bad ideas because you’re exhausted is silly.

Estimation and expectations

There is a great tension in software development that often goes unacknowledged. You may remember the quote

There are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns – the ones we don’t know we don’t know.

Traditional businesses invest and expect a return on that investment. A well functioning business in a stable market is like turning a handle. You put an amount of money in, turn the handle, and out comes more money than went in if the business is built correctly. Of course this can stop working if the environment the business works in changes dramatically. Just look at what Covid did to people-facing businesses.

Software development is inherently risky. You’re answering a question when you write it, and the answer may be much more complex than you thought it was. For example, a business may want to invest in getting to a new market. If you’re used to thinking in the first mode you may assume that building software is turning the handle and giving you the new market automatically. Nothing could be further from the truth. The process of developing the software uncovers how you might connect with customers in your new market. Most of the work is discovering how to create a turnable handle, and the software is actually a minor part of this. Unless you are replacing or copying something well understood it will take a lot of effort to make things work for the business. Then the people using the software need to know how to use it to make the handle turn, this is not trivial.

In the early days of NASA they realised that flying to the Moon was something that had never been done before, so you can’t estimate how long things will take. This is where the concept of milestones came from. You say at a high level when you’d like something to exist, and then you can see how far along you are compared to what you expected. When you’re working with unknown unknowns it’s always a guess, and great care is needed to manage expectations. I always add about 30% to every budget and it always gets used on things you didn’t anticipate when the project began. This seems to be a rule that I’ve never managed to break, unknown unknowns will always bite you so be ready. Also put the contingency on the whole project instead of padding each task you’ve identified because it will confuse everything and you won’t have any idea how much contingency is left.

You have a tension between the people who do the budgets and want things to happen by certain dates etc. and the reality of exploring the unknown and drawing a map, which may prove to be only a partial one, as you go along. Again this is why short iterations are needed so it’s easy to spot if things are going awry so we can negotiate with each other to see what can be achieved by flexing the scope or doing something else that’s more profitable.

Retrospectives – get ahead of the crowd

The word quality has been mentioned a few times here. One of the things people often drop in the rush to get things done is retrospectives. Without them, you are never going to improve except accidentally. If you want to create software with no bugs you need to look at your processes, and listen to the whole team. I was trained in a quality management system called zero defects in my first job after graduating in 1986. The concept is simple, instead of allowing things to be released that you know aren’t right make the time and effort to make sure they are. Then you need to hold retrospectives so that the learning that went into fixing it the first time stays learned. This is also related to double loop learning.

Conclusions – set yourself free

The main idea behind this article was to give an outline of the history of the agile movement and where it came from. As someone doing a difficult thing, such as writing software, you are not obliged to “do” any of the behaviours and prescriptions from the agile movement. Instead, think about how to get the best results for you. If you can’t get these ideas working in a small team, creating the steady cadence, and being consistent you will need to work out why. Adding new processes or documents or rules will not help. You need critical thinking and an understanding of why things are done to make it work. You also need to work with the whole team, there is no ivory tower way of imposing true agility from on high, or by manipulation of spreadsheets. It’s a communication and people problem, so you need to communicate with people.

Organisational muddiness

Big ball of mud

Way back in the dark mists of the early 2000s design patterns were a new-ish idea. People went crazy for them, no project planning meeting was completed without several links to various design pattern architectures and blah blah. Eventually people realised that the best way to write software was to write software, in an unconscious appeal to the original principles in the Agile Manifesto.

The tools we used that created bazillions of class diagrams that were then translated into incomprehensible Java were quietly put to one side by most people.

Some patterns persist and are useful, things like Factory, and sometimes refactoring to a known pattern can actively simplify how things work. There are also architectural patterns, Martin Fowler wrote an excellent book explaining them and DHH used a lot of them when designing Rails. I think this is why Rails worked so well, it was opinionated software and the opinions were the result of a lot of careful thought and deep experience.

The big ball of mud pattern is what you get when you don’t take steps to design your architecture and instead end up with something that works but is internally incoherent. You see this a lot with successful start up companies. They ran really fast, didn’t try to follow the long-term survival practices such as behaviour driven development. If they are successful, after about 18 months everything comes to an abrupt halt because it’s extremely hard to maintain and full of decisions which hindsight indicates are now poor and inflexible.

I contend that there is also an organisational equivalent, you end up with the structure that’s obvious when confronted with the next problem, and suddenly we have dev teams that work on the same thing but different, and devops because everyone else has one, and the sales teams are using squads because it’s hip and everyone’s in too much of a hurry to read Deming or Goldratt and properly think about what works, for them, now.

Conway’s law

This was originally meant as a joke but it’s been seen in the wild so many times that it isn’t one any longer. Put simply, the architecture of the software you build and the way your organisation is structured will mirror each other. in essence, if you have a pragmatic ball of mud with muddy communications then so will the software you produce.

Whirlpool of mud

So you end up with a self-reinforcing pragmatic organisation that will continue to create muddy solutions with muddy architectures for muddy conceptions of what your customers want. You need to be as deliberate about your organisation’s structure as you are about the software you need to run it.

Successful systems

A system that works is built from multiple smaller systems that also work. This sounds obvious but people often ignore broken or poorly performing sub systems and throw things together.

Poor process produces poor outcomes

It’s there in the section title, mud breeds mud, haste breeds waste, rushing breeds redoing, inconsistency breeds incoherence.

Wishing

Not addressing the mud means you are just wishing that it will go away. This doesn’t generally work that well, but you often find it if you’re working with people who have read too many self-help books that tell you how to build more confidence by affirmations confusing their desires with what causality makes possible.

Sales driven organisations can suffer really badly from this.

Solutions – a starter

Constancy of purpose

When I used to run the Lean Teams consultancy the very first thing I used to do when I ran a workshop for my clients was a session about constancy of purpose. In a nutshell, can you write down what your organisation does in a sentence or two? When you make decisions do they align with it or not? If not, don’t!

The other thing this helps to do is identify people’s needs. Customers and organisation.

Note it all down

  • Identify teams
  • Define responsibilities
  • Define info flows and transformations
  • Use the documentation to create consensus

Be mindful of Conway’s law, is the shape of the organisation correct for what you’re trying to do? Also, noting down means using pictures, long screeds of text are hard to write accurately and follow precisely. Interaction diagrams with notes where it works are by far the best way of doing this.

Double Looped learning

  • Single looped learning is being able to turn a handle and get a result.
  • Double looped is knowing what the objective is behind the turning of the handle and maybe changing it.

You need to get to single loop first. You will have a rough idea of what needs to be done and need to work out how to do it. Again, use pictures. Only attending to the single loop can make you very myopic and changes outside the loop can remove the need for it, causing you to waste your time.

Have a look here.

Good processes

Good processes have these qualities

  • Repeatability
  • Lightweight
  • Well defined interfaces with other processes
  • Learning
  • Less than ten steps

Lightweight means that a decent level of automation is also required – being able to repeat something that involves twenty manual steps which could be forgotten is not scaleable or useful.

Putting it together

After writing it all down draw your processes end to end.

  • Do they match the constancy of purpose?
  • Can they be done within one team?
  • Do they pass through many teams?
  • Have you documented any data transformations needed when passing between teams or roles?

Once you have this you need to start building the second loop. Constancy of purpose should be giving you an idea of the value each process and step adds, lots of data transforms means you’re involving lots of different teams or functional areas – is that a good idea?

The next thing you need to do is work on a consensus about how things are done.

Then it’s time to start thinking about the second loop. If you do some googling you will find that there are even more.

Comparing velocity of agile teams is futile

Background

This relates back to the somewhat thorny issue of estimating how long things will take so people can plan how to allocate resources.

As creators of value giving stuff we need to be able to make promises to our friends and paymasters that they will get the things they need to be able to do their business. Enterprises of all stripes want to know that they can invest a specific amount of cash and have something that will make more cash. Preferably more than they invested, and in a timescale that isn’t too far in the future.

The problem is they can’t. When you are creating something new it is by nature an unpredictable beast. Instead what you have to do is take steps to minimise the cost of mistakes and maximise the results you get.

The cost of mistakes is also why we also work in short iterations because we know we are human and will make them. This isn’t a bad thing, it just lets us experiment and learn without having to bet the farm. Because of this there is a disconnect right at the heart of what’s laughably called software engineering. Businesses invest to make money, any software you create is an investment. However, you can’t guarantee the results or even how long it will take to get somewhere useful and people don’t like that.

The quest for agility

Agile was a response to this, it came from the makers of software who said that they couldn’t reasonably commit to very large projects with any degree of certainty. It’s all about mitigating the risks by trusting people to think small and act small in well bounded contexts. So you eat an elephant one bite at a time – you develop large systems one small iteration at a time, and the small iterations allow the business to change its mind relatively easily and cheaply as well.

Development is a process and you discover things and questions you didn’t know you needed to answer as you follow it through. Small iterations let you answer these questions before they derail you.

Typically a large system is broken down deliverable chunks, and the chunks into projects. The projects become a list of tasks that are small enough for one or two people to understand and deliver. These are then sorted into priority order and a series of iterations are planned roughly.

Then we plan an iteration in detail. Iterations are time boxed. No task should take more than a couple of days at most, and we try and work out how many we can get done in each iteration.

This is where velocity comes in.

Velocity explained

The team get together and give each piece (or story as it’s called in some schemes) an arbitrary amount of effort they think it will take and allocate it a number of points depending in the difficulty. It’s important to emphasise here that the key word is think. They don’t actually know, because if they did they’d be playing the lottery and living the high life. It takes little time to do this and they work out what will fit into the next iteration, plus a couple of extra things that they could fit in if things go well. It’s also not effort, as such, but a yardstick that lets you work with the relative sizes of tasks.

Over time they get a feel for how many of these magical points they can get done in an iteration, and how many certain types of task may take.

Very strong concept to emphasise here is that there is no science in this, the points are what that team think for that specific iteration. The points measure nothing and are only to give a yardstick of what can probably be fitted into a given iteration by that specific team.

So …

  • If you try and use velocity to compare teams you aren’t going to be able to say anything meaningful, and just piss people off.
  • If you say things like you only got 23 points done this iteration and 25 last one, you need to work harder to a specific team they can easily fix it by adding some nonsense to the plan for the next iteration. You’re also demonstrating you just don’t get it.

To complete the process when each iteration finishes the team traditionally check back with the business representative (often called the business owner) and make sure that what they’ve built fits with the business needs. This is known as the demo. If they’ve been doing technical stuff to support future iterations there may be nothing to show.

Good teams then review what they got done in the last iteration and look for ways to improve.

Velocity is how many points a given team gets done in an iteration. It’s worth measuring because you can start finding out whether or not:

  • The project is possible with the people and resources you have
  • The team find certain kinds of task difficult and maybe need some mentoring for them
  • The communication with the business is being properly managed
  • Some tasks in particular areas are taking a lot longer than first thought – you can go find out why before it kills everything

and you can find this all out very early so you can fix it before you’ve wasted huge sums of money invisibly choking on the proverbial elephant.

So velocity is a simple rule of thumb that lets you make sure you can keep your promises and head off any problems early. It’s not a management tool to get more productivity. In fact it has little to do with it. For example a team of very experienced people who’ve been working together a long time might well be able to deliver a lot more  in an iteration, but could easily allocate the same number of points as a less effective team because that’s what they’re comfortable with.  If you were some clueless spreadsheet jockey working far away from the delivery you would have no way of knowing this.

The number is meaningless, except as a rule of thumb for a specific team at a specific time. It’s a very blunt instrument and changes anyway as the teams get better or change their practices.

Consequences

You can’t create a pretty gantt chart and say this will be ready by the 12th of November because you don’t know for sure when things will finish. You can get a range of dates once you have some data. If it must be ready by a specific time you can either use the knowledge you gain to manage scope or make sure that the parts of the project that must ship to make it workable by that date are done first.

You can also get creative. For example Basecamp wrote their billing module after they delivered their first fully featured version because it gave them short term time to put more into the product and left them 30 days to create the billing module.

In software there are no hard and fast rules and you need to take the time to work out how to get the business what it needs, which is capability, not functionality. That’s a topic for a different post.