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
21
state_of_functional_programming.pdf
leifg
0
38
Parsers in JavaScript
leifg
0
41
Building Event Sourced Apps
leifg
1
770
Unicode Spaß
leifg
0
35
Event Sourcing - The Story Telling of Processes
leifg
1
58
Elixir Releases
leifg
0
130
Introduction to Rails
leifg
0
44
JRuby - The enterprise view
leifg
1
94
Other Decks in Technology
See All in Technology
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
290
Engineer Career Talk
lycorp_recruit_jp
0
140
Application Development WG Intro at AppDeveloperCon
salaboy
0
180
Terraform Stacks入門 #HashiTalks
msato
0
350
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
Platform Engineering for Software Developers and Architects
syntasso
1
510
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
290
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Side Projects
sachag
452
42k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
For a Future-Friendly Web
brad_frost
175
9.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
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