Illusions of Certainty
What the brain can teach us about software engineering
Julie Pitt
Co-founder, Order of Magnitude Labs
@yakticus
Illusions of Certainty What the brain can teach us about software - - PowerPoint PPT Presentation
Illusions of Certainty What the brain can teach us about software engineering Julie Pitt Co-founder, Order of Magnitude Labs @yakticus relevant links found here: github.com/yakticus/IllusionsOfCertainty For the things we have to learn
Illusions of Certainty
What the brain can teach us about software engineering
Julie Pitt
Co-founder, Order of Magnitude Labs
@yakticus
github.com/yakticus/IllusionsOfCertainty relevant links found here:
“For the things we have to learn before we can do them, we learn by doing them.” ― Aristotle, The Nicomachean Ethics
today we will discuss
➔ a BIG reason why software projects are unpredictable ➔ how to help computers better understand what we mean ➔ how to make our software systems more resilient ➔ how to better understand what our software systems are doing
life
life: a generative model with an interface to the world the world
senses action
generative model
survival
working working not working
software as a generative model
the world
input
the code
software as a generative model
the world
input
the code infinite precision
misjudging uncertainty in software
reality perception
human precision
don’t kill humans be nice to people don’t hurt people keep humans alive respect human life
don’t kill humans
machine precision
don’t kill humans be nice to people don’t hurt people keep humans alive respect human life
machine precision
don’t kill humans be nice to people don’t hurt people keep humans alive respect human life
the cliffs of infinite precision
the happy path utterly broken
how do we get to this?
degraded resilience
ways we can cheat
➔ property tests ➔ remedy-first design ➔ build intuitive insight
test suite as a generative model
system under test
y x test suite
individual test cases are often too precise
software system state space
desired behavior tests (“training examples”)
testing an addition function: F# example
state space
credit: http://fsharpforfunandprofit.com/posts/property-based-testing/
✅ test passes
state space
bug
credit: http://fsharpforfunandprofit.com/posts/property-based-testing/
property tests combat overfitting
state space
bug
credit: http://fsharpforfunandprofit.com/posts/property-based-testing/
property tests: let’s review
GET /api/metadata/12345 { “status”: “failure” “error”: { “errorCode”: 234 “description”: “database timeout” }
input
RESTful service
client falls
each error has a precise cause
read timeout connect timeout connection pool exhausted token expired credentials revoked key rotation endpoint moved endpoints expired failover user error insufficient permissions account problem
remedies are imprecise
read timeout connect timeout connection pool exhausted token expired credentials revoked key rotation endpoint moved endpoints expired failover user error insufficient permissions account problem
RETRY REDIRECT DISPLAY ERROR RE-AUTHENT ICATE
remedy tells the client how to ease pain
{“status”: “failure” “failure”: { “action”: “RETRY” “error”: { “errorCode”: 234 “description”: “database timeout” } } remedy
(actionable)
What about failures that weren’t predicted?
AWS outage - 2012/10/22
failure comes in many forms
AWS scheduled maintenance - 2014/09/25
failure comes in many forms
AWS DynamoDB outage - 2015/09/20
for hours
failure comes in many forms
Netflix was prepared
meet simian army
manner
nodes, datacenter, or region
failure
simian army -> cultural change
not the cause
failure
remedy-first design: let’s review
logs: easy to produce
logs: hard to consume
charts
charts: easier to consume, but still hard
we want the whole picture
solution: leverage our intuition
thought experiment
What if your software system’s interactions sounded like cars on the road?
intuitive feedback: let’s review
curiosity-driven tests
system under test
senses action
test agent
(neural network)
mapping the state space through exploration
state space begin testing random states without expectations
mapping the state space through exploration
state space gradually build a model containing expectations
mapping the state space through exploration
state space
model capable of recognizing anomalies
self-healing systems
telemetry
senses action
(neural network) deployment, scaling, failover, etc.
working working not working
let’s review
goal: change the landscape
links github.com/yakticus/IllusionsOfCertainty