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
27
state_of_functional_programming.pdf
leifg
0
38
Parsers in JavaScript
leifg
0
41
Building Event Sourced Apps
leifg
1
780
Unicode Spaß
leifg
0
35
Event Sourcing - The Story Telling of Processes
leifg
1
59
Elixir Releases
leifg
0
130
Introduction to Rails
leifg
0
44
JRuby - The enterprise view
leifg
1
95
Other Decks in Technology
See All in Technology
RubyでKubernetesプログラミング
sat
PRO
4
160
GeometryReaderやスクロールを用いた表現と紐解き方
fumiyasac0921
0
100
コロプラのオンボーディングを採用から語りたい
colopl
5
1.2k
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
200
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
850
JAWS-UG20250116_iOSアプリエンジニアがAWSreInventに行ってきた(真面目編)
totokit4
0
140
2024AWSで個人的にアツかったアップデート
nagisa53
1
110
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
220
2025年のARグラスの潮流
kotauchisunsun
0
790
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
GoogleのAIエージェント論 Authors: Julia Wiesinger, Patrick Marlow and Vladimir Vuskovic
customercloud
PRO
0
150
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
350
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Cult of Friendly URLs
andyhume
78
6.1k
Designing for Performance
lara
604
68k
Into the Great Unknown - MozCon
thekraken
34
1.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
GraphQLとの向き合い方2022年版
quramy
44
13k
Done Done
chrislema
182
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
GitHub's CSS Performance
jonrohan
1030
460k
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