Showing posts with label ModernAgile. Show all posts
Showing posts with label ModernAgile. Show all posts

Thursday, June 16, 2022

Principles, motives, and metrics for software engineering

I was recently asked for a point of view on organizational metrics for a new group of Agile Teams at a big software engineering shop. The conversation led to this quick essay to collect my thoughts. Big topic, short essay, so please forgive omissions. 

Context

Business circumstances and organizational philosophy dramatically influence metric and measure choices. At one extreme frequent releases delivered when ready is the best business fit. On the other extreme infrequent, date-driven deliveries addressing external constraints are the appropriate, if uncomfortable fit. While they share the basics, the level of formality, depth, and areas of focus are different. Other considerations abound.

Another key dimension of metric selection is the type of work. When dealing with garden variety architectural and design questions, the work has a clear structure and common metrics will work well. However, when there are significant architectural and design unknowns, it is hard to predict how long the work will take; thus, common metrics and measures are not as helpful.

So for this essay, I am assuming:

  • Multiple Agile teams with autonomy matched to competency, or put another way, as much as they can handle.
  • Teams own their work end to end, from development through operations.
  • There are inter-team functional and technical dependencies.
  • Frequent releases are delivered when ready (I won’t go deep into forecast actuals, etc.).
  • A traditional sprint-based delivery process (I am not saying that’s best, but it’s popular and easy to speak to in a general-purpose article).

Motivations, What Questions are we asking?

  1. Are we building the features our customers need, want, and use?
  2. Are we building technical and functional quality into our features?
  3. Given the business and market circumstances, is the organization appropriately reliable, scalable, sustainable, and fair?
  4. Is our delivery process healthy and are our people improving over time?

Principles

Single metric focus breeds myopia - avoid it: asking people to improve one measure will often cause that measure to appear to improve but at the cost of the overall system. This leads to…

Balance brings order: when you measure something you want to go up, also measure what you don’t want to go down. You want more features faster - what’s happened to quality? Are we courting burnout? It is easy to create a perverse incentive with a manager’s “helpful metric.” 

Correlation is not causation: It is hard to “prove” things with data. Not because the data is scarce, though it often is, but because there are frequently many variables to consider. Understanding is a goal of measurement. Yet often the closer you look, the more variables you see and the less clear the relationships may become. So, be warned, if only “a” drives “b” it is likely you are missing “c” and “d,” etc. Be cautious.

Competence deserves autonomy: a competent team should choose how to manage and solve their own problems, including what to measure. Since a manager has problems too, it’s the same for them. As long as the leader can explain why they need it and how it should help, they’re good. Force it without the team’s buy-in, it likely won’t work, anyway.

Wisdom is hard won: Metric targets are seductive. Having no targets comes across as having no goals. Aimlessness. But bad targets are pathological and that’s worse. A competent, productive developer who’s not improving is better than one held to myopic targets they neither want nor value. Unless your aim is a dramatic change, set targets relative to current performance, not an ideal. 

If you demand dramatic change, you better know what you're doing. No pithy advice for that. Good luck.

Measures and Metrics

Based on the circumstances, the level of formality and utility will vary.

Customer Value Measures

  1. Feature use - does our customer use the feature we built?
  2. Net promoter score - do they love our features enough to recommend them to others?

Delivery (team level)

Sprint Metrics - simplistically said: Push work into a time box, set a sprint goal, commit to its completion, and use team velocity to estimate when they’ll be “done” with something. Most argue the commitment motivates the team. Some disagree. 

Cumulative flow for Sprint-based work

  • Velocity or points per sprint
    • Should be stable, all else being equal. Sometimes all else is not equal, which doesn’t mean something needs “fixed,” but it might mean that. Sorry.
    • Using Average Points Per Dev can reduce noise by normalizing for team size/capacity changes week to week. 
  • Story cycle time
    • Time required to complete a development story in a sprint. When average cycle time exceeds 2/3’s of sprint duration, throughput typically goes down as carry over goes up.
    • In general, analysis of cycle times through work steps across processes and teams can be very revealing (enables you to optimize the whole). But, that doesn’t just fall out of Cumulative Flow.
  • Backlog depth
    • Generally indicates functional or technical scope changes
    • Doesn’t capture generalized complexity or skill variances that impact estimates
  • Work in process per workflow step
    • Shows when one step in the workflow is blocking work

Work allocation

When one team does it all, end to end, keeping track of where the time goes helps understand what you can commit to in a sprint. Also, products need love beyond making them bigger, so you need to make choices for that.

  • % capacity for new features
  • % capacity for bugs/errors
  • % capacity for refactoring and developer creative/ learning time
  • % production support

Functional Quality

  • Bugs
    • Number escaped to production - defects
    • Number found in lower environment - errors

Technical Quality

  • Code quality
    • Unit test coverage %
    • Rule violations - security, complexity (cognitive load)... long list from static analysis tools
    • Readability - qualitative, but very important over time
  • Lower environments (Dev, Test, CI tooling, etc.)
    • Uptime/downtime
    • Performance SLAs

Dependency awareness

Qualitative, exception-based. How well does the team collaborate with other teams and proactively identify and manage dependencies? 

Team morale

Qualitative, could be a conversation, a survey, observation, etc.

Mean time to onboard new members / pick up old code

Most engineers don’t like to write documentation. Sure, “well-written code is self-documenting” but they also know better. A good test is how long it takes to onboard new members / pick up old code. 

Estimating accuracy (forecast vs. actual variance)

  • Top-down planning - annual or multi-year. Typically based on high-level relative sizing.
  • Feature level - release or quarterly level. Typically, a mix of relative sizing at a medium level of detail.
  • Task/story level - varies by team style. May be relative or absolute (task-based).

Cross-team metrics

  • API Usability, qualitative - for teams offering APIs how much conversation is needed to consume the API
  • Mean time to pick up another team’s code - documentation and readability
  • Cross-team dependency violations

So, there you have it. Some thoughts on principles, motives, and metrics for software engineering. Comments welcome. Be well. 

Friday, March 11, 2022

Shape Up, Agile Method Summary and Commentary

 


ShapeUp! Shaping, Betting, and Building

The summary starts with the second step in the method, the story flows better this way,

Betting on a six-week release

Key concepts:

  • Product and engineering commit to share and mitigate delivery risk (Fix time/effort and vary scope.)

  • Cross-functional, autonomous teams align to independent technology components, e.g., services, and have end-to-end accountability for feature design, delivery, and production operations.

Phase Overview:

A 6-week release effort is a “bet” matching an “appetite”

An “appetite” is not an estimate. Estimates start with a design and end with a number. Appetites start with a number and end with a design. The appetite is a creative constraint on the design process - to keep it in check, balanced to value.

  1. Language connotes a business risk worth taking - clear customer value at a reasonable price

  2. Needs mutual commitment from tech and product to vary scope and approach to win the bet.

  3. Caps the downside: short enough time to limit the damage if it will cost more than its worth

  4. Provides pressure: long enough time to get something meaningful done and short enough to feel the date pressure

Product shapes the next idea as they support the build process of the current idea.

Shaping

Key concepts:

  • Shape an idea for a customer outcome to design and build in one release.

  • Set boundaries, identify risks, and layout a high-level model, not a design, to be elaborated during the build

  • Pitch the idea to place a bet, i.e., to be chosen to attempt delivery

Phase Overview:
  1. Start with a raw idea - What problem does it solve? And what outcome gives it customer value? How will we verify they get it?

  2. Shape the idea to fit an appetite, apply design thinking, i.e., it may need to be decomposed, list the constraints.

  3. Set boundaries - how much is enough?

  4. Rough out the elements of the idea at a high level, low-fi, but clear on the outcome. Breadth, not depth — explore options. Leave room for designers, e.g., not a UI spec.

  5. Address risks, and rabbit holes by looking for unintended consequences, unanswered questions, etc. Specify the tricky details.

  6. Get technical review and determine what is out of bounds.

  7. Write the pitch:

    1. The problem to solve, along with the expected customer outcome and verifier.

    2. Our Appetite - how much time is it worth and what constraints does that imply?

    3. The core elements of the solution - not the “answer.”

    4. The Rabbit holes to avoid and risks to deal with.

    5. No-gos - what should the team exclude, things we are choosing not to cover to fit the appetite or make the problem workable.

Building

Key concepts:

  • Apply design thinking to balance feature design, technical risk, and time to market.

  • Organize work in the team by application structures (“scopes”) not people. Scopes are independently buildable and testable and may depend on each other.

  • Do the hardest/riskiest thing early

Phase Overview:
  1. Product assigns projects, not tasks, and done = deployed

  2. Hand delivery over to the team to build a feature that gets the outcome given the technology and the time available.

  3. Discover and map the scopes, the independently testable and buildable, end-to-end slices that together make up the feature. Use these scopes, e.g., edit, save, send, to show progress.

  4. Get one piece done, a small end-to-end slice to gain momentum within a few days

  5. Start in the middle, with the most novel, risky element. If time runs short, simplify or remove nice to haves or should-haves.

  6. Substance before style - build and verify basic interactions work before focusing on UI styling

  7. Unexpected tasks and opportunities will appear as you go, so know when to stop.

    1. Compare completed work to a baseline, e.g. the customer experience now, not a future ideal.

    2. Use the mutual commitment of 6 weeks to an all-or-nothing release as a circuit breaker to limit the scope.

Commentary

Top takeaways:

  • Scopes with automated tests speed development and enable the long run product and organizational flexibility that is central to Amazon, Google, Spotify, etc.
  • The “circuit breaker” motivates frequent releases and shared accountability between engineering and product, but may trade-off completeness in the near term.
  • ShapeUp is lightweight and has obvious limits. Say you’ve got 48 people across 8 teams and two years of budget to scale up your software. How do you define and coordinate all of that work? Carefully, I assume.
  • Shape Up heroically assumes autonomous, cross-functional teams. Which I support wholeheartedly, but you may not have.
The concepts are excellent and apply outside this lightweight method. I added the italicized content as it felt implied. I’m guessing most who use it would also sprinkle in some scrum. This approach begs for XP practices. Scopes are natural outcomes of TDD and BDD.

The summary leaves a lot out, e.g., large project how-to guidance. Some of it seemed silly, e.g., visualizing status as scopes rolling up and down hills. But, the content is free; you find it here, and I’m not complaining. The scopes concept is central to software development. In fact, outside of the hill thing, there is little to dislike.

ShapeUp is lightweight and has obvious limits. Say you’ve got 48 people across 8 teams and two years of budget to scale up your software. How do you define and coordinate all of that work? Carefully, I assume. It heroically assumes autonomous, cross-functional teams. Which I support wholeheartedly, but you may not have.

A small consultancy doing web development projects for clients created the method, and it fits that like a glove. It can be a great fit for small tech startups until they scale past two or three teams. After that, keep the concepts and solve the next set of problems. Lots of good toolsets out there, LeSS, Scrum, etc.


Friday, March 4, 2022

My most popular content...

 

Prior to 2022, google analytics shows my most popular content is the book summaries. So, here's a list with direct links. 

  1. The DevOps Handbook - a four-part book summary
  2. Lean Start-Up - a three-part book summary
  3. Kanban - a seven-part book summary
If you like this type of content then you are sure to enjoy these as well:
  1. The Nature of Software - Mary Poppendieck (30-minute read)
  2. Agile Fluency - The Agile Fluency Project
  3. Large Scale Scrum - the LeSS framework by Craig Larman & Bas Vodde
If you are looking for an afternoon read, Doc Norton's book Escape Velocity is excellent. A short book but packed with good software delivery practice wisdom. 

Have fun!

Friday, January 13, 2017

Finally Finished the Kanban Book Summary!

Yes! Finally finished the seven-part summary of "Kanban: Successful Evolutionary Change for Your Technology Business by David Andersen. Part one starts here.



Of all the summaries so far, this is one of my favorites. The summaries are written as study guides or review materials.

The Kanban book fills in the blanks regarding why Scrum and XP work the way they do and how to improve their processes in a way that minimizes resistance to change and maximizes value delivered.

Kanban is not a methodology for software delivery. It is a change management system for improving the implementation of any delivery framework or process. It is reasonable to say that using the system to improve a waterfall process would lead to Scrum/XP/Lean Start Up like processes. This may explain why some think Kanban is a delivery methodology - applying its principles will suggest process improvements that likely converge towards the processes that are taken to define today's "Agile."

But that too is perhaps misleading. Agile is a mindset growing from of a set of principles and values we apply to improving our ability to deliver value through software delivery. Is is not a process or a framework - despite industry marketing machine claims to the contrary. It uses processes and frameworks and it is our job to improve them. If you agree then you'll enjoy getting involved with Modern Agile.

David Andersen's application of Lean principles to software delivery and their synthesis with the Agile mindset makes Kanban a valuable tool. Here are the summaries:



Friday, November 25, 2016

Kanban: Successful Evolutionary Change for Your Technology Business

Kanban: Successful Evolutionary Change for Your Technology Business by David Andersen.

If you are an Agilist then this is a must read book. This is another case of my experiencing key concepts from a book prior to reading it. The importance of slack, focussing on cycle time, empowering teams...

I wish I would have read this the day it came out. I'm working on a summary now. It starts here.

Friday, November 18, 2016

The DevOps Handbook

While we didn't call it DevOps back in 2012, when I joined Gap Inc.,we working towards achieving some of its goals then. Over the ensuing years we got reasonably good at it. I read Gene Kim's book, The Phoenix Project, a couple years back and so was excited to learn he was working on a new book entitled The DevOps Handbook.

I pre-ordered the book on Amazon and wrote a four part summary as I read it. This is as must read book if your in IT today. The book is long so if you are in a hurry and want to read my take on the most important concepts the summary is for you. It also serves as a good review if you've read it and just want to keep it in your head.

Friday, September 16, 2016

The Lean Start Up

The Lean Start Up: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses by Eric Ries.

While working at Gap Inc. concepts from this book were frequently leveraged. I learned by doing. After leaving Gap I read the book and see we implemented some of the concepts well and others, less so.

This is a great book worthy of study. I created a book summary using my kindle highlights. The summary is almost entirely excerpts from the book. My goal was to create a reference or study guide for myself and to share with others. If you haven't read the book and don't have the time to read the whole book (takes maybe a few days) then this summary is worth your time to read. If you only want to review the key concepts - it is probably not for you.

If I had it to do over again I would have synthesized more and excerpted less.  Live and learn.