SlideShare a Scribd company logo
Debugging
John Graham-Cumming
September 2013
Ada Lovelace (1840s)
Maurice Wilkes (1950s)
 As soon as we started programming,
we found to our surprise that it wasn't
as easy to get programs right as we
had thought. Debugging had to be
discovered. I can remember the
exact instant when I realized that a
large part of my life from then on
was going to be spent in finding
mistakes in my own programs.
Writing code is hard
 But writing bugs is easy!
 Everyone does it all the time without
even thinking about it.
 Estimates in GOOD code there are 2
to 4 defects per 1,000 lines
 You’re not that good
 You will spend many hours debugging
Programmer
 If a person who debugs code is a
debugger than a person who writes
the bugs must be a... bugger?
Always have a fighter pilot in
your presentation
Colonel John Boyd
OODA Loop
THE GREATEST
DEBUGGER YOU WILL
EVER USE IS IN YOUR
HEAD
Ignore your tools!
ESSENTIAL SKILL: RUN
CODE IN YOUR HEAD
RISE
 Reproduce
 Isolate
 Target
 Excise
Reproduce
Isolate
 Tighten the OODA loop
◦ The smallest
◦ Fastest
◦ Most easily repeated
 And automate it
 Then turn it into a test case
Target
ESSENTIAL SKILL:
ALWAYS BE ASKING
WHY
Debugging Christmas Lights
ESSENTIAL SKILL:
DOUBTING
Excise
 Fix the bug
 Don’t introduce new bugs!
 You can check this with the test case
that you made earlier
Talk to the teddy
Look Around Debugging
 Where there’s smoke...
 ... research shows that bugs tend to
cluster
 When you fix a bug look for more in
the same spot.
5 bugs in a single line
dir.permissions = 666; // Make the file writable
 Bug 1: updates permissions without
asking
 Bug 2: doesn’t make the file writable
 Bug 3: creates security hole
 Bug 4: used decimal not octal
 Bug 5: comment is incorrect
Remember This One Thing!
 The most effective debugging tools
are: your brain, a unit test, and the
print statement.

More Related Content

PPTX
Principles in software debugging
ODP
The Art Of Debugging
PPSX
Debugging by induction
PPTX
Notes on Debugging
PPTX
PPT
Debugging
PDF
Effective debugging
PPT
.Net Debugging Techniques
Principles in software debugging
The Art Of Debugging
Debugging by induction
Notes on Debugging
Debugging
Effective debugging
.Net Debugging Techniques

What's hot (20)

PPT
PPTX
Testing & should i do it
PPTX
Debugging
PPT
Are Agile Projects Doomed to Half-Baked Design?
PPT
Lessons learned on software testing automation
PPT
Introduction to test programming
PPTX
Software Quality via Unit Testing
PPTX
TDD Best Practices
PPTX
The problem with tdd
PPTX
Exploratory testing
PDF
Unit Testing
PPTX
Are Automated Debugging Techniques Actually Helping Programmers
PPTX
Fundamentals of testing (what is testing)
PDF
Testing strategies for legacy code
PPTX
Qa mockup interview for automation testing
PDF
TDD — Are you sure you properly test code?
PPTX
Pertanyaan dan jawaban (graham et.al 2011) part 1
PDF
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
PPTX
Unit test
PDF
Automation testing interview pdf org
Testing & should i do it
Debugging
Are Agile Projects Doomed to Half-Baked Design?
Lessons learned on software testing automation
Introduction to test programming
Software Quality via Unit Testing
TDD Best Practices
The problem with tdd
Exploratory testing
Unit Testing
Are Automated Debugging Techniques Actually Helping Programmers
Fundamentals of testing (what is testing)
Testing strategies for legacy code
Qa mockup interview for automation testing
TDD — Are you sure you properly test code?
Pertanyaan dan jawaban (graham et.al 2011) part 1
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Unit test
Automation testing interview pdf org
Ad

Viewers also liked (6)

PDF
Go memory
PPTX
That'll never work!
PPTX
HAB Software Woes
PPTX
Software Testing Basics
PPT
Software Testing Fundamentals
PPTX
Software testing ppt
Go memory
That'll never work!
HAB Software Woes
Software Testing Basics
Software Testing Fundamentals
Software testing ppt
Ad

Similar to Software Debugging for High-altitude Balloons (20)

PDF
Culture And Aesthetic Revisited
PDF
How To Win At Software - Advice for New Engineers - by Gabe Johnson
PPTX
How have we developed product without bugs
PDF
Scottish Ruby Conference 2014
PDF
EduSparkz Thunder Thursday Debugging Code
PDF
Bug Hunting Safari
PPTX
This presentation was generated by GPT-3
PDF
Good programming
PDF
Webapp security-tut-2017
PPT
Software development
PPTX
Software Development Essential Skills
PDF
Code Forensics
PPTX
2016 - Daniel Lebrero - REPL driven development
PPTX
Code Hygiene: Lessons from Scala
PDF
Win#23 it
PDF
ORUG - Sept 2014 - Lesson When Learning Ruby/Rails
PDF
Inheriting iOS code
PPT
PHP - Introduction to PHP Bugs - Debugging
PDF
Building an Ecosystem for Hackers
PDF
10 tips to save you time and frustration while programming
Culture And Aesthetic Revisited
How To Win At Software - Advice for New Engineers - by Gabe Johnson
How have we developed product without bugs
Scottish Ruby Conference 2014
EduSparkz Thunder Thursday Debugging Code
Bug Hunting Safari
This presentation was generated by GPT-3
Good programming
Webapp security-tut-2017
Software development
Software Development Essential Skills
Code Forensics
2016 - Daniel Lebrero - REPL driven development
Code Hygiene: Lessons from Scala
Win#23 it
ORUG - Sept 2014 - Lesson When Learning Ruby/Rails
Inheriting iOS code
PHP - Introduction to PHP Bugs - Debugging
Building an Ecosystem for Hackers
10 tips to save you time and frustration while programming

More from jgrahamc (8)

PPTX
Better living through microcontrollers
PDF
Big O London Meetup April 2015
PDF
Go Containers
PDF
How to launch and defend against a DDoS
PPTX
Lua: the world's most infuriating language
PDF
Highlights of Go 1.1
PDF
Go Concurrency
PPTX
Javascript Security
Better living through microcontrollers
Big O London Meetup April 2015
Go Containers
How to launch and defend against a DDoS
Lua: the world's most infuriating language
Highlights of Go 1.1
Go Concurrency
Javascript Security

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Cloud computing and distributed systems.
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
sap open course for s4hana steps from ECC to s4
Advanced methodologies resolving dimensionality complications for autism neur...
MIND Revenue Release Quarter 2 2025 Press Release
Cloud computing and distributed systems.
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”

Software Debugging for High-altitude Balloons