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
15
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
14
state_of_functional_programming.pdf
leifg
0
27
Parsers in JavaScript
leifg
0
36
Building Event Sourced Apps
leifg
1
730
Unicode Spaß
leifg
0
32
Event Sourcing - The Story Telling of Processes
leifg
1
49
Elixir Releases
leifg
0
130
Introduction to Rails
leifg
0
39
JRuby - The enterprise view
leifg
1
85
Other Decks in Technology
See All in Technology
web-application-security
matsuihidetoshi
1
190
Azureの基本的な権限管理の勉強会
yhana
1
2k
2024春 注目のWeb系 OSS & SaaS 3選
makies
0
170
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
450
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
340
EM完全に理解した と思ったけど、 やっぱり何も分からなかった話 / EM Night Fukuoka #1
hirutas
0
280
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
790
LLM開発・活用の舞台裏@2024.04.25
yushin_n
3
1.1k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
4
37k
Cracking the KubeCon CfP
inductor
2
270
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
1
610
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
280
Featured
See All Featured
Fireside Chat
paigeccino
22
2.6k
Product Roadmaps are Hard
iamctodd
45
9.7k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
What's in a price? How to price your products and services
michaelherold
238
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
33
6k
Unsuck your backbone
ammeep
663
57k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
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