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
21
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
31
state_of_functional_programming.pdf
leifg
0
39
Parsers in JavaScript
leifg
0
42
Building Event Sourced Apps
leifg
1
800
Unicode Spaß
leifg
0
36
Event Sourcing - The Story Telling of Processes
leifg
1
61
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
47
JRuby - The enterprise view
leifg
1
97
Other Decks in Technology
See All in Technology
木を見て森も見る-モジュールが織りなすプロダクトの森
kworkdev
PRO
0
220
Cursorをチョッパヤインタビューライターにチューニングする方法 / how to tuning cursor for interview write
shuzon
2
250
Google Cloud Next 2025 Recap アプリケーション開発を加速する機能アップデート / Application development-related features of Google Cloud
ryokotmng
0
250
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2025年版)
infiniteloop_inc
13
42k
newmo の創業を支える Software Architecture と Platform Engineering
110y
5
540
データベース04: SQL (1/3) 単純質問 & 集約演算
trycycle
PRO
0
730
Tailwind CSS の小話「コンテナークエリーって便利」
yamaday
0
120
Part1 GitHubってなんだろう?その1
tomokusaba
3
810
猫でもわかるS3 Tables【Apache Iceberg編】
kentapapa
2
210
Terraform にコントリビュートしていたら Azure のコストをやらかした話 / How I Messed Up Azure Costs While Contributing to Terraform
nnstt1
1
520
LangfuseではじめるAIアプリのLLMトレーシング
codenote
0
180
Previewでもここまで追える! Azure AI Foundryで始めるLLMトレース
tomodo_ysys
2
710
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Docker and Python
trallard
44
3.4k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Bash Introduction
62gerente
613
210k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
800
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
What's in a price? How to price your products and services
michaelherold
245
12k
A better future with KSS
kneath
239
17k
Facilitating Awesome Meetings
lara
54
6.4k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
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