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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Leif Gensert
December 05, 2019
Technology
27
0
Share
Bugs - What are they good for
Leif Gensert
December 05, 2019
More Decks by Leif Gensert
See All by Leif Gensert
Sorbet - Is it really that tasty?
leifg
0
58
state_of_functional_programming.pdf
leifg
0
53
Parsers in JavaScript
leifg
0
50
Building Event Sourced Apps
leifg
1
840
Unicode Spaß
leifg
0
46
Event Sourcing - The Story Telling of Processes
leifg
1
76
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
55
JRuby - The enterprise view
leifg
1
120
Other Decks in Technology
See All in Technology
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
160
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
2
800
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
OpenClawでPM業務を自動化
knishioka
2
350
FastMCP OAuth Proxy with Cognito
hironobuiga
3
230
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
170
The essence of decision-making lies in primary data
kaminashi
0
190
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
120
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
180
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
1
190
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
200
Featured
See All Featured
Designing for Performance
lara
611
70k
Context Engineering - Making Every Token Count
addyosmani
9
780
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Facilitating Awesome Meetings
lara
57
6.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Mobile First: as difficult as doing things right
swwweet
225
10k
So, you think you're a good person
axbom
PRO
2
2k
We Are The Robots
honzajavorek
0
210
Music & Morning Musume
bryan
47
7.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
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