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
sharnik
June 17, 2015
Programming
470
0
Share
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
220
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
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
330
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
220
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
220
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
320
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.1k
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
継続的な負荷検証を目指して
pyama86
1
770
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
180
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
490
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.6k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
Featured
See All Featured
A Soul's Torment
seathinner
6
2.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
780
Paper Plane
katiecoart
PRO
1
50k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Writing Fast Ruby
sferik
630
63k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
230
Test your architecture with Archunit
thirion
1
2.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
630
How to Talk to Developers About Accessibility
jct
2
190
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