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
18
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
29
state_of_functional_programming.pdf
leifg
0
38
Parsers in JavaScript
leifg
0
41
Building Event Sourced Apps
leifg
1
790
Unicode Spaß
leifg
0
35
Event Sourcing - The Story Telling of Processes
leifg
1
60
Elixir Releases
leifg
0
130
Introduction to Rails
leifg
0
46
JRuby - The enterprise view
leifg
1
95
Other Decks in Technology
See All in Technology
PHPカンファレンス名古屋-テックリードの経験から学んだ設計の教訓
hayatokudou
2
270
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
390
クラウドサービス事業者におけるOSS
tagomoris
1
710
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
540
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
18
7.5k
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.6k
Goで作って学ぶWebSocket
ryuichi1208
0
190
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
2
240
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
2.1k
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
140
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
130
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.3k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
298
20k
A better future with KSS
kneath
238
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Code Reviewing Like a Champion
maltzj
521
39k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Done Done
chrislema
182
16k
Code Review Best Practice
trishagee
67
18k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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