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
Bugs - What are they good for
Search
Leif Gensert
December 05, 2019
Technology
0
22
Bugs - What are they good for
Leif Gensert
December 05, 2019
Tweet
Share
More Decks by Leif Gensert
See All by Leif Gensert
Sorbet - Is it really that tasty?
leifg
0
44
state_of_functional_programming.pdf
leifg
0
41
Parsers in JavaScript
leifg
0
45
Building Event Sourced Apps
leifg
1
820
Unicode Spaß
leifg
0
40
Event Sourcing - The Story Telling of Processes
leifg
1
71
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
50
JRuby - The enterprise view
leifg
1
100
Other Decks in Technology
See All in Technology
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
340
東京大学「Agile-X」のFPGA AIデザインハッカソンを制したソニーのAI最適化
sony
0
180
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
170
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
24
16k
RemoteFunctionを使ったコロケーション
mkazutaka
1
170
re:Inventに行くまでにやっておきたいこと
nagisa53
0
900
OpenCensusと歩んだ7年間
bgpat
0
300
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
210
【SORACOM UG Explorer 2025】さらなる10年へ ~ SORACOM MVC 発表
soracom
PRO
0
200
20251029_Cursor Meetup Tokyo #02_MK_「あなたのAI、私のシェル」 - プロンプトインジェクションによるエージェントのハイジャック
mk0721
PRO
6
2.2k
251029 JAWS-UG AI/ML 退屈なことはQDevにやらせよう
otakensh
0
120
オブザーバビリティと育てた ID管理・認証認可基盤の歩み / The Journey of an ID Management, Authentication, and Authorization Platform Nurtured with Observability
kaminashi
2
1.6k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Gamification - CAS2011
davidbonilla
81
5.5k
Context Engineering - Making Every Token Count
addyosmani
8
330
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Cult of Friendly URLs
andyhume
79
6.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
RailsConf 2023
tenderlove
30
1.3k
Done Done
chrislema
186
16k
Rails Girls Zürich Keynote
gr2m
95
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
940
Transcript
1 Bugs What are they good for?
None
What is a bug?
“First actual case of bug being found” Grace Hopper -
1947
“I did find a bug in my apparatus” Thomas Edison
- 1878
The Crash <> Request Scale Crash Change Request ⚠
Let’s ship some products
Numbers only?
Nope
“You didn’t say you wanted to ship stuff to the
Queen”
“Well you should know how addresses work”
The Crash <> Request Scale Crash Change Request ⚠
Record Investigate Fix
None
Reproduce It Fix It Ship It
Find a reproducible scenario
Speeds up fixing process
accepted Closed Won
paid Closed Lost
context 'accepted order' do let(:order) { build(:order, status: 'accepted') }
it 'returns "closed won"' do expect(deal_stage(order)).to eq('closed won') end end context 'paid order' do let(:order) { build(:order, status: 'paid') } it 'returns "closed won"' do expect(deal_stage(order)).to eq('closed won') end end
def deal_stage(order) return 'enquired' if order.nil? return 'quoted' if order.open?
return 'closed won' if order.accepted? 'closed lost' end
Lets you try out different solutions
Makes it clear what to fix
NoMethodError: undefined method `date’ for nil:NilClass
def render(order) { id: order.id, delivery_date: order.delivery.date } end
def render(order) { id: order.id, delivery_date: order.delivery&.date } end
GET /api/v1/orders?status=delivered • Order 01 • Order 02 • Order
03
Confidence that bug has been fixed
Continuous Integration Heroku Review Apps Create App Precompile Assets Create/Migrate
Database Launch App Code
But what about actually fixing the bugs?
def deal_stage(order) puts "What's happening?: #{order.inspect}" return 'enquired' if order.nil?
puts "What's happening?: #{order.inspect}" return 'quoted' if order.open? puts "What's happening?: #{order.inspect}" return 'closed won' if order.accepted? puts "What's happening?: #{order.inspect}" 'closed lost' end Puts Debugging
github.com/pry/pry def deal_stage(order) binding.pry return 'enquired' if order.nil? return 'quoted'
if order.open? return 'closed won' if order.accepted? 'closed lost' end
Is it really the culprit? Caching Third Party Libraries Recent
Changes User
Push Continuous Integration Deploy Revert Continuous Integration
Record Investigate Fix Now Depends on Urgency/Impact
My Latest Bug
None
None
None
None
Reproduce It Don’t jump to conclusions