Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Debugging
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sharnik
June 17, 2015
Programming
0
470
Debugging
Presentation about debugging for people just learning to program.
sharnik
June 17, 2015
Tweet
Share
More Decks by sharnik
See All by sharnik
Cross-platform Mobile Development with React Native
sharnik
0
210
Going Polyglot the Easy Way
sharnik
0
460
Why TDD is a dangerous sect
sharnik
4
310
Other Decks in Programming
See All in Programming
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
Ruby and LLM Ecosystem 2nd
koic
0
370
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
830
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
410
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
130
15年目のiOSアプリを1から作り直す技術
teakun
1
620
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
260
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
380
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
230
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
140
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
We Have a Design System, Now What?
morganepeng
55
8k
The Curse of the Amulet
leimatthew05
1
9.8k
Rails Girls Zürich Keynote
gr2m
96
14k
Amusing Abliteration
ianozsvald
0
130
Are puppies a ranking factor?
jonoalderson
1
3.1k
Navigating Weather and Climate Data
rabernat
0
130
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
190
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
97
Fireside Chat
paigeccino
42
3.8k
Transcript
Wojciech @sharnik haikuco.de
Programming is like riding a bike.
Except the bike is on fire and you're on fire
and everything is on fire and you're actually in hell.
None
Main programming tasks: » Adding bugs » Removing bugs
Debugging
Know what you're trying to do
Inputs -> Program -> Outputs Calculator.add(2, 3) # => 5
Workflow
Reproduce the error
Make a hypothesis
Fix
Profit
If that didn't help, rollback
Techniques
Puts debugging class Calculator def add(a, b) puts a puts
b a + b end end result = Calculator.new.add(2, 3) puts result
strings vs numbers ruby -e "x = 3; puts x"
# => 3 ruby -e "x = '3'; puts x" # => 3 ruby -e "x = 3; puts x.inspect" # => 3 ruby -e "x = '3'; puts x.inspect" # => "3"
p: shorter puts X.inspect class Calculator def add(a, b) p
a p b a + b end end result = Calculator.new.add(2, 3) p result
debugger: pry + byebug require 'pry-byebug' class Calculator def add(a,
b) binding.pry a + b end end Calculator.new.add(2, 3)
Strategies
"Wolf fence" algorithm
Rubber duck debugging
Practice
Exercise gist.github.com/sharnik/2aedd681e6bcf81a7697 Remember » understand expectations » pinpoint where the
bug is » find what the bug is » fix it