This document discusses heuristics and how they can be applied to agile software development processes. It defines heuristics as mental shortcuts or rules of thumb that allow for reasonable decisions to be made quickly with limited time and knowledge. The document presents an "adaptive toolbox of heuristics" including both process heuristics like discovering work iteratively and building multidisciplinary teams, as well as technical practice heuristics like automating deployments and integrating continuously. The heuristics are presented as ways to support agile and lean thinking and processes for software delivery.
7. 8
Visions of rationality
Introduction to heuristics
Adaptive toolbox of heuristics
The agile
adaptive toolbox of heuristics
• Process heuristics
• Technical practices heuristics
Departing thoughts
9. Unbounded
rationality
10
• Decision-making strategies that
have little or no regard for the
constraints of time, knowledge, and
computational capacities that real
humans face.
• Traditionally modeled by probability
theory.
10. Optimization
under
constraints
11
• Mind should calculate the benefits
and costs of searching for each
further piece of information and
stop search as soon as the costs
outweigh the benefits [1].
• But a closer look reveals that
optimization under constraints can
require even more knowledge and
computation than unbounded
reality [2].
[1] Anderson & Milson, 1989; Sargent, 1993; Stigler, 1961 | [2] Vriend, 1996; Winter, 1975
11. 12
Bounded
Rationality
Models of human judgment and decision
making should be built on what we
actually know about the mind's capacities
rather than on fictitious competencies.
Because of the mind's limitations,
humans "must use approximate methods
to handle most tasks" – Simon Herbert
Herbert Simon
Nobel Prize laureate in econom ics,
“father” of Bounded Rationality
1
13. Bounded
Rationality:
Satisficing
14
• Satisficing is a method for making a
choice from a set of alternatives
encountered sequentially when
one does not know much about the
possibilities ahead of time. [1]
• Satisficing takes the shortcut of
setting an adjustable aspiration
level and ending the search for
alternatives as soon as one is
encountered that exceeds the
aspiration level.
[1] – Sim on Herbert – reproduced from Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
14. Bounded
Rationality:
Fast and
Frugal
Heuristics
15
• Fast and frugal heuristics limit
their search of objects or
information using easily
computable stopping rules, and
they make their choices with easily
computable decision rules. [1]
[1] - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
15. 16
Up to 19 cues are measured when
a patient is admitted with a risk of
risk of heart attack.
• blood pressure
• age
• pulse
• ECG
• …
16. 17
A simplified decision tree for
classifying heart attack victims as
high-risk or low risk victims.
Asking at most three yes/no
questions is a fast and frugal
strategy for making decision.
Is the minimum systolic
blood pressure over the
initial 24hr period > 91
High%
Risk
Is age > 62.5?
Is sinus tachycardia
present?
High%
Risk
Low%
Risk
Low%
Risk
No
No
No
Yes
Yes
Yes
17. 18
A more accurate method than
some complex statistical
classification methods.
(Breiman et al., 1993).
Is the minimum systolic
blood pressure over the
initial 24hr period > 91
High%
Risk
Is age > 62.5?
Is sinus tachycardia
present?
High%
Risk
Low%
Risk
Low%
Risk
No
No
No
Yes
Yes
Yes
18. In many real-world situations, optimal
strategies are unknown or unknowable
(Herbert Simon).
Even in a game such as chess, where an
optimal (best) move does in fact exist at
every point, no strategy can calculate that
move in a reasonable amount of time,
despite the well-defined nature of the
possibilities to be searched. [1]
19
[1] - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
19. Move from omniscient mind
computing intricate
probabilities and utilities to a
bounded mind reaching into a
toolbox filled with fast and
frugal heuristics.
20
Humans and animals make inferences
about their world with limited time,
knowledge, and computational power.
20. 21
Heuristic
"serving to find out or discover."
• 1905 – Albert Einstein used the
term "heuristic" to indicate that
he considered the view he
presented [1] therein as
incomplete, false even, but
still useful.
• 1800 – 1970 "heuristic" referred
to useful, even indispensable
cognitive processes for solving
problems that cannot be
handled by logic and probability
theory
Source - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
[1] "On a heuristic point of view concerning the generation and
transformation of light.” Albert Einstein's Nobel prizewinning paper
21. 22
Heuristic
"serving to find out or discover."
A heuristic is an approach to a problem that is
necessarily incomplete given the knowledge
available, and hence unavoidably false, but
which is useful nonetheless for guiding thinking
in appropriate directions.
Source - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
22. • ~1920 - Max Wertheimer, Karl Duncker (cognitive
psychologists) defined heuristic as a useful
shortcut, an approximation, or a rule of thumb
for guiding search.
23
Heuristic
"serving to find out or discover."
Source - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
23. Heuristics are an ideal control mechanism
under conditions of uncertainty and their
general form is easy to understand.
24
Heuristic
"serving to find out or discover."
Dave Snowden,
creator of
Cynefin framework
24. Photo By: Gunnery Sgt. T. T. Parish
When the battlefield plan breaks
down capture the high ground,
stay in touch, keep moving.
Usmarinesheuristic
28. AdrianNewey’sheuristic
onhowtodesignaformula1car
29
Continue to evolve the design for
an F1 car instead of always starting
from scratch, unless it’s clearly that
you are on a wrong track, or the
regulations are changing.
Adrian Newey, OBE, British Formula 1 designerEvolve to better understand
29. JoelSpolsky’sheuristic
Rewritingcodefromscratch
30
Don’t rewrite the code since you’re
throwing away real-world usage,
you are throwing away knowledge.
Knowledge collected in bug fixes.
Years of programming code.
Solve coding issues instead by
carefully moving code around, by
refactoring.
Joel Spolsky, CEO Stack Overflow
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
Evolve to better understand
32. 33
Adaptive toolbox of heuristics
Different domains of thought require
different specialized tools.
33. 34
Adaptive toolbox of heuristics
The collection of specialized cognitive
mechanisms that evolution has built into
the human mind for specific domains of
inference and reasoning, including fast
and frugal heuristics [1].
[1] Bettman, 1979; Cosmides & Tooby, 1992; Payne et al., 1993.
34. Agile Adaptive toolbox of heuristics
Agile as a domain requires its own
adaptive toolbox of heuristics.
A toolbox full of heuristics for making
reasonable decisions in software delivery.
35
37. 38
Discover iteratively
Accept that not all the work can or even should be defined
upfront. Use an approach that allows for discovery of the work
and solutions iteratively.
Create conditions for novel solutions to emerge.
Have a mindset for options, never commit early unless you
know why.
”It’s not iterating if you do it only once” - Jeff Patton.
Coherentideas prototyping Realoptions
38. 39
Build multi-disciplinary teams
Create teams around clearly defined work slices. Provide them
with all the means necessary to complete their work.
Build teams in close proximity of Service Manager* for complex
problems.
Create an environment based on psychological safety and a
strong foundation of trust between the Service Manager and
delivery team.
*ServiceManager isaGDSdefinedrole, definedassomeonewiththeknowledgeandpower tomakeday-
to-day decisionstoimprovetheservice
Crossfunctionalteams Clearownershipofwork
Psychologicalsafety
40. 41
Make sense of your world
Use sense-making frameworks such as Cynefin to make sense
of the world around you.
Work under the assumption that you will encounter problems
with different levels of complexity. Constantly adapt your
practices according to the complexity domain you are
operating under.
Sense-making
Complex
complicated
obvious
chaotic
41. 42
Understand your landscape
Execution alone is not enough, you will also need a good
strategy. Help visualizing your context with techniques such as
Wardley maps to make better strategic decisions for the future.
Use mapping to understand where to attack and why.
mapping
42. 43
Design work systems
Define a system to track and manage your work.
Give a strong considerations to queue based systems, such as
Kanban.
Adapt the system for various types of work. Managing highly
uncertain work might require a different approach to the one
used for managing more certain one.
visualize Limitwip Managequeues
Make the invisible visible
43. 44
Use an approach based on
observation and measurement
Build using an observation and measurement approach.
Measure Flow metrics such as Work In progress, CycleTime and
Throughput.
Analyse and adapt the system using these metrics.
Measureflow Preserveflow
44. 45
Use a forecasting approach to
planning
Adopt a probabilistic outlook to planning instead of a
deterministic one. Forecast using date ranges backed by
confidence levels.
Perform short and long term forecasts, accepting that short
term forecast will be more accurate.
Reforecast on new information.
MonteCarlosimulations
45. 46
Set short feedback loops
Set feedback loops in the system than enable learning.
Break the releases into multiple chunks, setting each chunk as
small as possible. Remove dependencies between chunks
where possible.
Perform early user testing, run retrospectives, use pair
programming.
Use the feedback to evolve the service.
Alpha&betareleases retrospect pair
Create rhythm
46. 47
Coherentideas prototyping Realoptions
Crossfunctionalteams Clearownershipofwork Psychologicalsafety
Sense-making
mapping
visualize Limitwip Managequeues
Measureflow Preserveflow
MonteCarlosimulations
Alpha&betareleases retrospect pair
Discover iteratively
Build multi-disciplinary teams
Make sense of your world
Understand your landscape
Design work systems
Observation and measurement
Forecasting approach to planning
Set short feedback loops
48. 49
Version control everything
Use version control for all production artifacts:
• application code
• application configurations
• system configurations
• scripts for automating build and configuration of the
environment
Infrastructureascode
Version(
control
Source - Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
49. 50
Automate deployments
Fully automate deployments so that they do not require
manual intervention.
Computers perform repetitive tasks; people solve problems. [1]
“Automate when tasks become boring” - Dan North.
Zerodowntimedeployments
[1] - Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
Environmentsondemand
50. 51
Integrate early and continuously
Use Continuous Integration (CI) as a first step towards
continuous delivery:
• code is regularly checked in, and each check-in triggers a set
of quick tests to discover serious regressions
• the CI process creates canonical builds and packages that
are potentially shippable to production
Test early at higher states of integration.
CI mocking Componenttesting
51. 52
Avoid branches, use trunk-based
development
Use trunk-based development since it has shown to be a
predictor of high performance in software development and
delivery [1], characterized by:
• fewer than three active branches in a code repository
• branches and forks having very short lifetimes (e.g., less than
a day) before being merged into master
• rare “code lock” periods when no one can check in code or
do pull requests
[1] Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
52. 53
Automate tests
Use test automation where software tests are run
automatically and continuously throughout the development
process.
To sustain high pace of delivery maintain rigour around test
automation, and:
• test early
• test often
• test well
automation
53. 54
Maintain test data
Maintain carefully test data. Test data management is
becoming an increasingly important part of automated testing.
• necessary data is acquired on demand
• data can be conditioned in the pipelines
• data is not the limiting factor for the amount of testing data
can be run
Testdatamanagement
Source - Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
54. 55
Shift left on security
Integrate security into design, implementation and testing
phases.
• infosec as team members
• use of preapproved security libraries
• security testing as part of automated suite
Securitypartofthedevelopmentprocess
Source - Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
55. 56
Implement Continuous Delivery
Implement Continuous Delivery (CD) a practice where software
is in a deployable state throughout its lifecycle.
• prioritize keeping the software in a deployable state over
working on new features
• fast feedback on the quality and deployability of the system
is available to all team members
deployablestateovernewfeatures
Source - Forsgren PhD, Nicole; Hum ble, Jez; Kim , Gene. Accelerate: The Science of Lean Softw are and DevO ps: Building and Scaling High Perform ing Technology O rganizations
59. 60
Discover iteratively
Build multi-disciplinary teams
Make sense of your world
Understand your landscape
Design work systems
Observation and measurement
Forecasting approach to planning
Set short feedback loops
Version control everything
Automate deployments
Integrate early and continuously
Use trunk-based development
Automate tests
Maintain test data
Shift left on security
Implement Continuous Delivery
64. 65
We know that sometimes it will work and
sometimes it won’t.
But, should it fail, we should not be punished.
AHeuristic…
http://cognitive-edge.com/blog/rules-is-rules/
65. 66
“Cognition is the art of focusing on the relevant and
deliberately ignoring the rest.”
Source - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art
66. 67
Useful?
A heuristic is an approach to a problem that is
necessarily incomplete given the knowledge
available, and hence unavoidably false, but
which is useful nonetheless for guiding thinking
in appropriate directions.
Source - Gerd Gigerenzer;Peter M . Todd;ABC Research Group. Sim ple Heuristics that M ake Us Sm art