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

What's hot (20)

PPT
Debugging
Indu Sharma Bhardwaj
 
PPTX
Testing & should i do it
Martin Sykora
 
PPTX
Debugging
nicky_walters
 
PPT
Are Agile Projects Doomed to Half-Baked Design?
theinfonaut
 
PPT
Lessons learned on software testing automation
gaoliang641
 
PPT
Introduction to test programming
openfinanceDev
 
PPTX
Software Quality via Unit Testing
Shaun Abram
 
PPTX
TDD Best Practices
Attila Bertók
 
PPTX
The problem with tdd
Dror Helper
 
PPTX
Exploratory testing
ISsoft
 
PDF
Unit Testing
David Rogers
 
PPTX
Are Automated Debugging Techniques Actually Helping Programmers
Chris Parnin
 
PPTX
Fundamentals of testing (what is testing)
Dhy Ardiansyah
 
PDF
Testing strategies for legacy code
Alex Soto
 
PPTX
Qa mockup interview for automation testing
KadharBashaJ
 
PDF
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
PPTX
Pertanyaan dan jawaban (graham et.al 2011) part 1
ikhwana luthfi
 
PDF
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
TechTalks
 
PPTX
Unit test
Tran Duc
 
PDF
Automation testing interview pdf org
Testbytes
 
Testing & should i do it
Martin Sykora
 
Debugging
nicky_walters
 
Are Agile Projects Doomed to Half-Baked Design?
theinfonaut
 
Lessons learned on software testing automation
gaoliang641
 
Introduction to test programming
openfinanceDev
 
Software Quality via Unit Testing
Shaun Abram
 
TDD Best Practices
Attila Bertók
 
The problem with tdd
Dror Helper
 
Exploratory testing
ISsoft
 
Unit Testing
David Rogers
 
Are Automated Debugging Techniques Actually Helping Programmers
Chris Parnin
 
Fundamentals of testing (what is testing)
Dhy Ardiansyah
 
Testing strategies for legacy code
Alex Soto
 
Qa mockup interview for automation testing
KadharBashaJ
 
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
Pertanyaan dan jawaban (graham et.al 2011) part 1
ikhwana luthfi
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
TechTalks
 
Unit test
Tran Duc
 
Automation testing interview pdf org
Testbytes
 

Viewers also liked (6)

PDF
Go memory
jgrahamc
 
PPTX
That'll never work!
jgrahamc
 
PPTX
HAB Software Woes
jgrahamc
 
PPTX
Software Testing Basics
Belal Raslan
 
PPT
Software Testing Fundamentals
Chankey Pathak
 
PPTX
Software testing ppt
Heritage Institute Of Tech,India
 
Go memory
jgrahamc
 
That'll never work!
jgrahamc
 
HAB Software Woes
jgrahamc
 
Software Testing Basics
Belal Raslan
 
Software Testing Fundamentals
Chankey Pathak
 
Software testing ppt
Heritage Institute Of Tech,India
 
Ad

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

PPT
debugging (1).ppt
jerlinS1
 
PPT
An important characteristic of a test suite that is computed by a dynamic ana...
jeyasrig
 
PPTX
The Art of Debugging.pptx
KarthigaiSelviS3
 
PPTX
Debugging
Ajeng Savitri
 
PPT
Pragmatic programmer 2
Uday Pratap Singh
 
PPTX
Debugging Effectively - SymfonyLive San Francisco 2015
Colin O'Dell
 
PPT
PHP - Introduction to PHP Bugs - Debugging
Vibrant Technologies & Computers
 
PPTX
Debugging Effectively - SunshinePHP 2017
Colin O'Dell
 
DOC
Software Bugs A Software Architect Point Of View
Shahzad
 
PDF
Code Forensics
Diego Pacheco
 
PPT
CPP10 - Debugging
Michael Heron
 
PPTX
Debugging Effectively - DrupalCon Nashville 2018
Colin O'Dell
 
PPTX
How to fix bug or defects in software
Rajasekar Subramanian
 
PPT
gdb-debug analysis and commnds on gcc.ppt
MaheshBabuD1
 
PPTX
Debugging Effectively - DrupalCon Europe 2016
Colin O'Dell
 
PDF
Debugging in Software Engineering SE Unit-4 Part-6.pdf
iron57441
 
PDF
Beyond Tricky Puzzles: A New Approach to Tech Interviews
D L
 
PPTX
Debugging Effectively
Colin O'Dell
 
PPTX
Debugging Effectively - php[world] 2015
Colin O'Dell
 
PPT
Debugging
Natasha Murashev
 
debugging (1).ppt
jerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
jeyasrig
 
The Art of Debugging.pptx
KarthigaiSelviS3
 
Debugging
Ajeng Savitri
 
Pragmatic programmer 2
Uday Pratap Singh
 
Debugging Effectively - SymfonyLive San Francisco 2015
Colin O'Dell
 
PHP - Introduction to PHP Bugs - Debugging
Vibrant Technologies & Computers
 
Debugging Effectively - SunshinePHP 2017
Colin O'Dell
 
Software Bugs A Software Architect Point Of View
Shahzad
 
Code Forensics
Diego Pacheco
 
CPP10 - Debugging
Michael Heron
 
Debugging Effectively - DrupalCon Nashville 2018
Colin O'Dell
 
How to fix bug or defects in software
Rajasekar Subramanian
 
gdb-debug analysis and commnds on gcc.ppt
MaheshBabuD1
 
Debugging Effectively - DrupalCon Europe 2016
Colin O'Dell
 
Debugging in Software Engineering SE Unit-4 Part-6.pdf
iron57441
 
Beyond Tricky Puzzles: A New Approach to Tech Interviews
D L
 
Debugging Effectively
Colin O'Dell
 
Debugging Effectively - php[world] 2015
Colin O'Dell
 
Debugging
Natasha Murashev
 
Ad

More from jgrahamc (8)

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

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
July Patch Tuesday
Ivanti
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
July Patch Tuesday
Ivanti
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 

Software Debugging for High-altitude Balloons