SlideShare una empresa de Scribd logo
1 de 150
Descargar para leer sin conexión
The Epistemology of Software
Engineering
Nathan Marz
@nathanmarz

1
My personal philosophies on software development
Agenda
1. Limits of human knowledge
2. Effect of the limits of knowledge on software development
3. Embracing those limits enables you to build better software
How do I know my software is correct?
How do I know a proposition is true?
Epistemology
How do I know my software is correct?

PREVIEW
You don’t
Your code is wrong
How do I know a proposition is true?

PREVIEW
You don’t
True knowledge is
unattainable
But wait... philosophy?
Strawman

Moral highground

Appeal to authority

Ad hominem attack

Appeal to emotion

Shotgun argumentation

Circular reasoning

Correlation vs causation

False dilemma

Equivocation

Argument to moderation

Burden of proof

Fallacies
Your code is wrong
Your code is literally wrong
Your code is wrong
Why do you believe your
code is correct?
Dependency 1

Dependency 2
Your code
Dependency 3
Dependency 4

Dependency 1

Dependency 5
Dependency 6
Dependency 7
Dependency 4
Dependency 8
Dependency 9
Dependency 3,000,000
Hardware
Electronics
Chemistry
Atomic physics
Quantum mechanics
I think I can safely say
that nobody understands
quantum mechanics.

Richard Feynman
Your code is wrong
...
Your code
Infinite regress
Epistemological “solutions”
1. Infinitism
2. Foundationalism
3. Coherentism
Coherentism
Foundationalism

Axioms
René Descartes
Cogito ergo sum
I think,
therefore I am
Codito ergo sum
I code,
therefore I am
Cartesian foundationalism
1. Limited axioms
2. Knowledge through deduction
Cartesian programming
1. Axioms = rules of programming language
2. Programs = deductions from those axioms
-> OutOfMemoryException
-> Hallo welt!
All the software you’ve
used has had bugs in it
Including the software
you’ve written
Induction
f(0) and (f(n) → f(n+1))
∀n≥0, f(n)
Induction
<sidenote>
David Hume
“Why is inductive reasoning valid?”
</sidenote>
Skepticism
perfect code
value to users
“My software is correct”
“My software is
sometimes correct”
How do you minimize imperfection?
Storm’s “reportError” method
(Storm is a realtime computation
system, like Hadoop but for realtime)
Storm architecture
Storm architecture

Master node (similar to Hadoop JobTracker)
Storm architecture

Used for cluster coordination
Storm architecture

Run worker processes
Storm’s “reportError” method
Used to show errors in the Storm UI
Error info is stored in Zookeeper
What happens when a user deploys code like this?
Denial-of-service on Zookeeper
and cluster goes down
Irrelevant!

Designed input space

Robust!

Failures!
Bad performance!
Security holes!

Actual input space
Implement self-throttling to
avoid overloading Zookeeper
Robust!

Designed input space

Actual input space
Robust!

Designed input space

Actual input space
Epistemology
Trth

Trut
Truh

Tuth

Tru
Foundation of modern science
Newton’s laws of motion
1. When viewed in an inertial reference frame,
an object either is at rest or moves at a constant
velocity, unless acted upon by an external force.
2. The acceleration of a body is directly proportional to,
and in the same direction as, the net force acting on the
body, and inversely proportional to its mass. Thus, F = ma,
where F is the net force acting on the object, m is the mass
of the object and a is the acceleration of the object.
3. When one body exerts a force on a second body, the
second body simultaneously exerts a force equal in
magnitude and opposite in direction to that of the
first body.
Orbit of Mercury problem
Cambridge, we have a problem...
Einstein’s theory of relativity
Sorry, Newton, you’ve
been PWNED:
limit approximation (truth) = truth
n

n→∞
Science algorithm
1. Make observations
2. Find theories consistent with those observations
3. Falsify theories by making more observations
Foundationalism
+
Coherentism
Empiricism
John Locke
Occam’s Razor
Software

Use cases
Software gets messy
Refactoring
Robust!

Designed input space

Actual input space
Robust!

Designed input space

Actual input space
TESTING
Unit testing
Load testing
Stress testing
Fuzz testing
TDD?
Review
1. Cannot perfectly reason about software
•

Infinite regress problem

•

Deduction is fundamentally flawed

•

Evidence shows programmers are not good at deductive reasoning

2. Best you can do is minimize wrongness
•

Truth can only be approximate

•

Observe/theorize/falsify cycle minimizes wrongness over time

•

Testing = empiricism applied to software development

•

Make programs less wrong by testing more
Does any of this matter?
YES
Embrace “your code is wrong”
to design better software
Redundancy
Fault-tolerance

> Perfection
An example
Learning from Hadoop
Job

Jobtracker
Job

Job
Learning from Hadoop
Job

Jobtracker
Job

Job
Learning from Hadoop
Job

Jobtracker
Job

Job
Your code is wrong
So your processes will crash
Storm’s daemons are
process fault-tolerant
Storm
Topology

Nimbus
Topology

Topology
Storm
Topology

Nimbus
Topology

Topology
Storm
Topology

Nimbus
Topology

Topology
Storm
Topology

Nimbus
Topology

Topology
Storm
Topology

Nimbus
Topology

Topology
Robust!

Designed input space

Actual input space
Robust!

Designed input space

Actual input space
Reasoning is fundamentally hard
So program in ways that require
less of it
Pure function
Mutability is hard to reason about
Minimize state mutation
Functional programming
Clojure
skepticism(skepticism)
?

?
?

?

?

?

?

?

?

?

?

?

?

?
?

?
?

?
?

?
?

?

?

perfect software

?
?

?

?

?
?
Thank you

Más contenido relacionado

La actualidad más candente

J_McConnell_Reconnaissance_Challenge
J_McConnell_Reconnaissance_ChallengeJ_McConnell_Reconnaissance_Challenge
J_McConnell_Reconnaissance_Challenge
Juanita McConnell
 

La actualidad más candente (20)

Staleness and Isolation in Prometheus 2.0 (PromCon 2017)
Staleness and Isolation in Prometheus 2.0 (PromCon 2017)Staleness and Isolation in Prometheus 2.0 (PromCon 2017)
Staleness and Isolation in Prometheus 2.0 (PromCon 2017)
 
Storm
StormStorm
Storm
 
Getting Started with Numenta Technology
Getting Started with Numenta Technology Getting Started with Numenta Technology
Getting Started with Numenta Technology
 
Provisioning and Capacity Planning (Travel Meets Big Data)
Provisioning and Capacity Planning (Travel Meets Big Data)Provisioning and Capacity Planning (Travel Meets Big Data)
Provisioning and Capacity Planning (Travel Meets Big Data)
 
Distributed Tracing in Practice
Distributed Tracing in PracticeDistributed Tracing in Practice
Distributed Tracing in Practice
 
An Infectious Disease Surveillance Simulation (IDSS) in the Cloud
An Infectious Disease Surveillance Simulation (IDSS) in the CloudAn Infectious Disease Surveillance Simulation (IDSS) in the Cloud
An Infectious Disease Surveillance Simulation (IDSS) in the Cloud
 
Streaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same GameStreaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same Game
 
Detecting Anomalies in Streaming Data
Detecting Anomalies in Streaming DataDetecting Anomalies in Streaming Data
Detecting Anomalies in Streaming Data
 
2014 nicta-reproducibility
2014 nicta-reproducibility2014 nicta-reproducibility
2014 nicta-reproducibility
 
Apache Storm based Real Time Analytics for Recommending Trending Topics and S...
Apache Storm based Real Time Analytics for Recommending Trending Topics and S...Apache Storm based Real Time Analytics for Recommending Trending Topics and S...
Apache Storm based Real Time Analytics for Recommending Trending Topics and S...
 
HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)
 
J_McConnell_Reconnaissance_Challenge
J_McConnell_Reconnaissance_ChallengeJ_McConnell_Reconnaissance_Challenge
J_McConnell_Reconnaissance_Challenge
 
Streaming join & lesson 4.
Streaming join & lesson 4.Streaming join & lesson 4.
Streaming join & lesson 4.
 
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
 
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
 
The inherent complexity of stream processing
The inherent complexity of stream processingThe inherent complexity of stream processing
The inherent complexity of stream processing
 
The present and future of serverless observability
The present and future of serverless observabilityThe present and future of serverless observability
The present and future of serverless observability
 
Real-Time Analytics with Apache Storm
Real-Time Analytics with Apache StormReal-Time Analytics with Apache Storm
Real-Time Analytics with Apache Storm
 
Storm
StormStorm
Storm
 
Apache Storm
Apache StormApache Storm
Apache Storm
 

Similar a The Epistemology of Software Engineering

Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
Noah Sussman
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDL
DIlawar Singh
 

Similar a The Epistemology of Software Engineering (20)

Black ops 2012
Black ops 2012Black ops 2012
Black ops 2012
 
Software Entomology or Where Do Bugs Come From?
Software Entomology or Where Do Bugs Come From?Software Entomology or Where Do Bugs Come From?
Software Entomology or Where Do Bugs Come From?
 
Applying principles of chaos engineering to Serverless (SRECon)
Applying principles of chaos engineering to Serverless (SRECon)Applying principles of chaos engineering to Serverless (SRECon)
Applying principles of chaos engineering to Serverless (SRECon)
 
Applying principles of chaos engineering to serverless (CodeMesh)
Applying principles of chaos engineering to serverless (CodeMesh)Applying principles of chaos engineering to serverless (CodeMesh)
Applying principles of chaos engineering to serverless (CodeMesh)
 
Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
 
Applying principles of chaos engineering to serverless (ServerlessCPH)
Applying principles of chaos engineering to serverless (ServerlessCPH)Applying principles of chaos engineering to serverless (ServerlessCPH)
Applying principles of chaos engineering to serverless (ServerlessCPH)
 
Testing for the deeplearning folks
Testing for the deeplearning folksTesting for the deeplearning folks
Testing for the deeplearning folks
 
Applying principles of chaos engineering to Serverless
Applying principles of chaos engineering to ServerlessApplying principles of chaos engineering to Serverless
Applying principles of chaos engineering to Serverless
 
Applying principles of chaos engineering to serverless
Applying principles of chaos engineering to serverlessApplying principles of chaos engineering to serverless
Applying principles of chaos engineering to serverless
 
Applying principles of chaos engineering to Serverless
Applying principles of chaos engineering to ServerlessApplying principles of chaos engineering to Serverless
Applying principles of chaos engineering to Serverless
 
Applying principles of chaos engineering to serverless
Applying principles of chaos engineering to serverlessApplying principles of chaos engineering to serverless
Applying principles of chaos engineering to serverless
 
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of ComplexityModels vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
 
The limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzThe limits of unit testing by Craig Stuntz
The limits of unit testing by Craig Stuntz
 
The Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig StuntzThe Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig Stuntz
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDL
 
2014 abic-talk
2014 abic-talk2014 abic-talk
2014 abic-talk
 
The math behind big systems analysis.
The math behind big systems analysis.The math behind big systems analysis.
The math behind big systems analysis.
 
Tutorial 3 - Research methods - Part 1
Tutorial 3 - Research methods - Part 1Tutorial 3 - Research methods - Part 1
Tutorial 3 - Research methods - Part 1
 
A Grand Unified Theory of Software
A Grand Unified Theory of SoftwareA Grand Unified Theory of Software
A Grand Unified Theory of Software
 
Codebits 2010
Codebits 2010Codebits 2010
Codebits 2010
 

Más de nathanmarz

Runaway complexity in Big Data... and a plan to stop it
Runaway complexity in Big Data... and a plan to stop itRunaway complexity in Big Data... and a plan to stop it
Runaway complexity in Big Data... and a plan to stop it
nathanmarz
 
Storm: distributed and fault-tolerant realtime computation
Storm: distributed and fault-tolerant realtime computationStorm: distributed and fault-tolerant realtime computation
Storm: distributed and fault-tolerant realtime computation
nathanmarz
 

Más de nathanmarz (13)

Demystifying Data Engineering
Demystifying Data EngineeringDemystifying Data Engineering
Demystifying Data Engineering
 
Runaway complexity in Big Data... and a plan to stop it
Runaway complexity in Big Data... and a plan to stop itRunaway complexity in Big Data... and a plan to stop it
Runaway complexity in Big Data... and a plan to stop it
 
Storm: distributed and fault-tolerant realtime computation
Storm: distributed and fault-tolerant realtime computationStorm: distributed and fault-tolerant realtime computation
Storm: distributed and fault-tolerant realtime computation
 
ElephantDB
ElephantDBElephantDB
ElephantDB
 
Become Efficient or Die: The Story of BackType
Become Efficient or Die: The Story of BackTypeBecome Efficient or Die: The Story of BackType
Become Efficient or Die: The Story of BackType
 
The Secrets of Building Realtime Big Data Systems
The Secrets of Building Realtime Big Data SystemsThe Secrets of Building Realtime Big Data Systems
The Secrets of Building Realtime Big Data Systems
 
Clojure at BackType
Clojure at BackTypeClojure at BackType
Clojure at BackType
 
Cascalog workshop
Cascalog workshopCascalog workshop
Cascalog workshop
 
Cascalog at Strange Loop
Cascalog at Strange LoopCascalog at Strange Loop
Cascalog at Strange Loop
 
Cascalog at Hadoop Day
Cascalog at Hadoop DayCascalog at Hadoop Day
Cascalog at Hadoop Day
 
Cascalog at May Bay Area Hadoop User Group
Cascalog at May Bay Area Hadoop User GroupCascalog at May Bay Area Hadoop User Group
Cascalog at May Bay Area Hadoop User Group
 
Cascalog
CascalogCascalog
Cascalog
 
Cascading
CascadingCascading
Cascading
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

The Epistemology of Software Engineering