Agile in Practice
Within the software engineering discipline, we're just as susceptible to fashion and trends as elsewhere - and this is apparent even at the so-called "soft topics" such as process methodologies and practices. In the following I will dive into what is Agile and what is not and call out organizations naive belief that they are Agile just because they make use of the Scrum framework and User-Stories. Last but not least, I will include some practical advice that I have come to make use of myself over the years picked up from industry leaders and my own experiences.
Definition of Agile
Agile is starting to get a bad reputation, but that's mostly because of its misuse and abuse. First and foremost, we must remember that agile is not really a software methodology per se, but is actually just a set of core values and principles as defined by the Agile Manifesto which was formulated in 2002 by 17 reflecting pragmatic software engineers over a weekend in a cabin in Utah. It simple states that we should favor:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
Diving a bit deeper into these principles, the Agile mindset recognizes that the construction of software is complex and unpredictable, and attempts to make the best use of our time/money while continuously providing the most value through actual working software. The careful reader will soon start to ask "...but value to whom, the stakeholder or the end-user?". While not mentioned directly, it's implicit that customer value = business value based on the premise that happy customers translates to opportunities and value for your business.
The whole Agile movement is of course a reaction to the waterfall mindset, where we would try to make fixed deadlines through defined phases based on non-negotiable requirements. In Agile there are no phases per se, but rather lots of small iterations where we learn and adapt.
Intelligence is the ability to adapt to change – Stephen Hawking
Last but not least, is the desire to keep things as simple as possible, and take away anything non-essential that doesn’t actually add value. There is a cost to every feature added and the cost rises more than linearly with each feature. If you are a developer, I need just to mention cyclomatic complexity and you know exactly what I am referring to.
It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away - Antoine de Saint-Exupery
This is not a black or white topic of course, over time much development has generally moved from phased through evolutionary to Agile. The key issue to ask your organization is probably, have we adopted enough of the Agile mindset and are we capable of adopting more to further maximize our return of investment? It's the principles that are important, not the process - indeed many of the same principles of Agile can also be seen within Lean Thinking (from manufactoring) and Design Thinking (from UX).
Unfortunately, I believe many companies are a bit too fast in their claim to be Agile. You aren't necessarily particular Agile just because you write your requirements in a JIRA backlog and have adopted the Scrum framework or perhaps even invested in large SAFe setup. To be truly Agile, you must take a holistic rather than dogmatic approach to software engineering where you are true to the values and principles of the Agile manifesto! In essence, your business needs to be value-driven (users in the drivers seat) rather than plan-driven (cost/schedule in the drivers seat) and empower the implementing team with the necessary game of ping-pong! In a typical Scrum setup, this can be condensed into a single statement:
Deliver an improved working product every Sprint and go from there
Whether you can do that in practice, and to which degree, greatly depends on the organizational setup and project type.
Organisational setup
It's fairly common to see IT or R&D departments struggle with Agile. They may be doing everything right but without backup from the rest of the business - and so the Agile only lasts until another order or command is received from above. Even organizations adopting SAFe can struggle in this regard, perhaps having most of the business owners in line with Agile values and principles, only to have their mandate overthrown by some C-level individual who feels strongly about a particular matter. This is unfortunate and happens primarily because customer value isn't seen as business value and focus is on feature quantity rather than feature quality.
So your whole organization really needs to support being Agile or you will never truly reap all the benefits. This is because planning and decomposition are really two sides of the same coin and one inherently impacts the other. An Agile organization may still live under a classic hierachical structure, but it understands that the top operates on high uncertainty/risk; and is ready to respond to challenges when they bubble up from below and tweak their strategy accordingly.
SAFe and Scrum@Scale are gaining growth. And while they definitely try to address a real problem in that being agile only in the IT department is a fallacy, they too are misusing the core values and principles of Agile - probably for commercial/capitalistic reasons first and foremost.
While Scrum is a framework for collaboration and i.e. has no mentioning of either features, epics nor user-stories - SAFe is trying to turn Agile into a process or methodology by mandating composition and steps.
At the end of the day however, unless you iterate, fail, learn, slice, experiment, simplify, evaluate, adapt etc. you are not really following the Agile principles and values - regardless of what that fancy certificate says in your inbox!
My advice is to stop emphasizing the Agile Transformation process frameworks and start focusing on the company culture and mindsets - Selena Delesie
Project types
While developers do write software out of their own pleasure, there's usually some professional relationship in place where software is traded in for salary; be it a customer, client or boss. Let us briefly sketch out a few different project types, because this aspect is fairly significant in the context of Agile.
When it comes to constructing software, the project type has a lot to say about the decision making process which leads on directly into the topic of planning!
When preparing for battle, I find that plans are useless, but planning is indispensable - Dweight D. Eisenhower
Planning
In the old days, using waterfall methodologies and phased development plotted into Gantt charts, it followed naturally that before we could test, we had to write the code, and before we could write the code we would need to design it, and to be able to come up with a design, we would need to analyse the requirements which we had previously elicited.
While it looks great up-front on a Powerpoint presentation and gives a nice illusion about predicting the future, few real-world projects fare well under this naive and stringent setup.
Indeed, history has taught us, as pointed out by the Agile manifesto, that you can't do long term planning with any degree of certainty or risk control. Steve McConnell refers to this as the Cone of Uncertainty but I tend to think of it as an S-shaped chart.
So you may look at your "must-win-battles" and do high-level estimation up-front, but don't try to map it to calendar time. If you do so, chances are you are going to need a 4-5 Sprints just doing the analysis - and guess what, then you have just reinvented phased development!
Some do take Agile a bit too far though and assume that within the Agile mindset, no planing is possible nor needed. Indeed, in the early 10's we even saw an No-Estimates movement. It follows fairly naturally, that if we don't estimate, we can't really plan either! In order to secure budgets and human resources, often we still do need some high-level planning.
The key thing to notice about Agile though, is that planning should not be done just once, nor just be done at one level, and that there are inherent differences to the operating precision of the associated estimates. If an estimate is just a guess, we want to be able to turn bad guesses into good guesses and in Agile we do that by updating our guesses all the time.
Your organization probably has an overall strategy and roadmap to back it up. Below the C-level, a SAFe setup would then introduce the planing level known as a Program Increment (PI). A PI itself consist of some no. typically of Sprint iterations. Even a daily standup meeting is in some way a planning meeting, where you will often coordinate with your colleagues regarding an activity. The difference here is first and foremost the degree of certainty and precision.
An Agile organiztion will know not to let high-level estimates somehow become a locked plan turned into hours and dates, and operate on suitable abstractions. This means planning is strategic and with a prioritized vision based on go/no-go cost-benefit analysis. Further down at the product planning level, decomposed into epics of a Program Increment (PI), dates may start to appear on the radar. However, only when the team is allowed to refine user-stories (the what?) and ultimately break down into tasks (the how?) can we realistically look at fixed calendar dates and do release planning.
Of course, the most mature Agile organizations (Spotify, NetFlix, Google etc.) don't even do release planning but instead operate on top of a automated feedback-loop, where they release to production constantly (Continuous Deployment) and monitor/react (DevOps) feedback, often utilizing A/B-testing for validating which experiments brings the most value and then promote these to 100% deployment.
Most organizations can't really do this for political (coordination) and practical (legacy systems) reasons but can still achieve a potential release (Continuous Integration) where deployment is just the click of a button.
Fixed time
If faced with a hard deadline, Agile becomes all about focusing on delivering the best thing possible in a set time period. We do this by looking hard at the requirements, simplifying where possible and prioritize. On paper, planning just becomes as simple as:
So if you have a deadline by some date, you can convert calendar time into an iteration count (say 8), use yours teams story-points per Sprint average (say 25) and multiply those to infer that feature work for about 200 story-points can be delivered by that deadline.
Fixed scope
If faced with locked down feature set, say an MVP or MMP, we modify the equation a bit and thus arrive at:
This really isn't much different than fixed time, except this time around we put the uncertainty range on the time axis. So if you have a fixed scope of say 250 story-points, and your team has proven to be able to deliver about 25 story-points per Sprint, then you're looking into 10 sprints which can be mapped to calendar time.
Fixed time & scope
One of the hardest problems to deal with, is that of fixed time and scope, since this is directly at odds with many of the Agile principles and values. If faced with fixed time and scope, you are screwed and you should be very careful at applying Agile to it anyway.
Recommended by LinkedIn
You will have very little legroom for adapting and you'll be stuck at the nasty corner of the project management triangle - thinking about ways and costs of scaling up resources.
However, if you think you can just scale by adding resources naively, you ignore factors such as communication overhead, team dynamics, solution coherence, code quality etc. and it's usually a recipe for trouble.
It follows, that you must have a stable team with a known velocity. It may be used to estimate staffing for an entire project if you have the guts to do so (hint: not really Agile), but where it truly excels is in filling the Sprint backlog and avoid pulling in too little or too much. Nobody likes never making the Scrum goal because it's always too full and nobody likes spending 5-6 hours over-planning for multiple Sprints.
In a bidding situation, your best bet is probably to try to nail down the most important features to the fixed part of the contract and model the remaining as options on top. The commitment risk is still there, but at least you've added some handles to utilize later on while not being dismissed on the grounds of incomplete capture of requirements.
In a delivery situation, your best bet is to look for the largest composites of the system, letting different teams have a go at these and hoping that the final integration efforts won't be too demanding.
Requirements
Regardless of the process methodology and working framework in use, to various degrees, we still need to elicit, analyze, prioritize, track, version and verify the underlying requirements for our software. This activity has never been easy, but it's so fundamentally important in order to get a successful outcome where software has been delivered to the satisfaction of stakeholders.
If we consult the Agile Manifesto, it ignores the subject matter entirely and one might almost infer something like "There shall be no requirements document, only working software and happy people". It sort of makes sense, in this day and age, even writing comments is considered bad practice (refactor the code for clarity instead says i.e. Uncle Bob) and the ultimate documentation for a piece of software is of course the actual source code itself which is guaranteed to never fall out of date.
A comment is a failure to express yourself in code. If you fail, then write a comment; but try not to fail - Uncle Bob
However, although the Agile Manifesto remains mute about it, in practice we do of course need requirements. While it can definitely work well on small projects to just handle requirements ad-hoc over email, phone and other meetings, this approach seize to work the moment there's a difference in expectations or functionality, and we all know the human brain is far from flawless. Most corporations thus make use of JIRA or a similar issue system to track requirements in a project backlog.
If you analyze the source code for any substantial software project, you are likely to see cyclomatic complexity numbers shoot through the roof. Even the most skilled developer utilizing all his knowledge about language constructs, patterns and practices, will introduce branching and side-effects as a result of complex, messy and interrelated requirements within the software. That is the nature of our business and the best we can do is to lay down the appropriate abstractions so that we may bury the various messy bits and pieces in a designated black box with a big fat lock on it. Actually, that's not entirely true - the BEST we can do, is to just say no and make the business understand (and react to by simplifying) how complex software means more buggy applications which are harder for a user to figure out - but that's an entirely different story. ;)
Do the simplest thing that could possibly work - Ron Jeffries
In the old days, we would try to document requirements using extensive prose buried in vast nested hierarchies of bulletpoints. This is still seen today and it makes sense to some degree to start out like this, but it's sure to break down over time as the software develops, the world changes and the requirements mutate accordingly. There's even an IEEE standard for this (830-1998) which states that requirements should be Correct, Complete, Unambiguous, Consistant, Prioritized, Verifiable, Tracable etc. The main problem is of course how it requires an enormous analytical effort, discipline and skill to nail down such a document for readily use by a development team - and in no way does that guarantee a successful end-result. For more on this, you may read what I have to say about fixed-price development.
User-stories
So even if we in the Agile mindset don't write a 200 page requirement specification, we still do need to hold a firm conversation about features so that we know what the software should do. All hail the lightweight concept of a user-story! I see it as a practical successor to the more theoretical use-cases on the late 90's, and the idea is simple enough of course; express some functionality as seen from a defined user, associate criteria for when the feature can be considered complete and let it be tracked as a conversation piece in a project backlog which can be further refined, prioritized, estimated etc.
INVEST
User-stories should be approached using the INVEST mnemonic, that is a good user-story should be:
To me the beauty of user-stories revolves around their headline characteristics and how they can and should be molded for simplicity. If there is one universal thing I have seen over the years in the industry, is that small and simple is king - if and when you can get away with it. For this reason I am especially fond of user-stories and user-story mapping since it forces you to think about delivery milestones and priorities.
How do you solve big problems? Start with a smaller one.
SPIDR
What often happens in practice, is that user-stories turns out to be quite tricky to break down accordingly - especially the independent part can be troublesome. Mike Cohn has some valuable insight in this matter and introduced us to the SPIDR mnemonic:
Simplicity - the art of maximizing the amount of work not done!
Connecting the pieces
So breaking down stories is great, but you are then likely to get to the challenge of managing inter-relationships. Although INVEST states that a user-story should be Independent, that's not the same as saying a user-story can't build upon another. How to go about this depends a lot of your issue tracking software and your own preferences on the matter. I'm colored by having worked with several methodologies over the years and JIRA, so I like to think of a hierarchy of Epic > Feature > Story > Task and crosscutting Themes.
Out-of-the box JIRA only support 3 layers of the hierarchy (Epic > Story > Sub-task) so you have to use the Portfolio plugin or Structure plugin to represent more levels such as Feature > Epic > Story > Sub-task.
Agile Do's
As <who?>, I can <what?> [so that <why?>]
Agile Don'ts
Stop starting, start finishing
Environmental setup
An often overlooked aspect that often hits organisations trying to embrace agile concepts, is having the appropriate flexibility from operations and being able to access and manage environment and supporting infrastructure (databases, services). What's often seen, is a fairly static environmental setup on a form like this following:
Development ► Test ► UAT ► Pre-production ► Production
Any seasoned developer will immediately recognize problems associated with such a naive pipeline. In reality, the coordination needed for this to work in larger organizations creates such overhead and frustration that it can paralyze progress. What's actually needed to be able to move fast following the agile mindset, is a fan-out at the lower layers - ideally containerized (Docker/Kubernetes) or virtualized at an epic level.
Development ► Test ► UAT ► Pre-production ► Production
Development ► Test ► UAT
Development ► Test ► UAT
Development ► Test ►
Development ►
At the lower levels, new environments should be possible to spin up in a matter of minutes - in the mid levels integration and coordination needs to take place moving up the QA pipeline on the way to production. This notion is also captured by Release Trains of SAFe, although what tends to happen in practice is that there are still a fixed (read: not enough) no. of static development and test environments to support agile development.
Conclusion
So there you have it. I am not an Agile leader, nor am I even an Agile coach - but I have seen my share of projects over the last 20 years to have formed a strong opinion on the subject.
Far too many organizations claim to be Agile, when in reality they are not. I hope more organizations in our industry will eventually go all-in as they realize that only catering to the user and providing value and RoI, will your business be as successful as it could be.
Last but not least; just say no to fixed-scope on a fixed-price - it barely works for building a house (which I just had done) where unknowns are small but it definitely doesn't work for constructing software where unknowns are huge!
References
I've been inspired by a lot of people over the years, but these 3 gentlemen stand out to me as particular valuable when it comes to process and practices.
The usual disclaimer applies here, the above does not necessarily reflect the views of my employers but by me as an individual.