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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
sharnik
June 17, 2015
Programming
480
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Debugging
Presentation about debugging for people just learning to program.
sharnik
June 17, 2015
More Decks by sharnik
See All by sharnik
Cross-platform Mobile Development with React Native
sharnik
0
230
Going Polyglot the Easy Way
sharnik
0
480
Why TDD is a dangerous sect
sharnik
4
310
Other Decks in Programming
See All in Programming
自分的「カンファレンスの楽しみ方」
syumai
0
190
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
660
バグを直したら useEffect が消えた
colorful12
3
830
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
830
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
140
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
0
410
Building an Out-of-Order CPU
latte72
0
670
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
200
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
業務時間外もAIに働いてもらう話
colorful12
3
9.9k
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.7k
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
Accessibility Awareness
sabderemane
1
200
We Are The Robots
honzajavorek
0
330
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Making the Leap to Tech Lead
cromwellryan
135
10k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Fireside Chat
paigeccino
42
4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
660
Un-Boring Meetings
codingconduct
0
410
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
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