$30 off During Our Annual Pro Sale. View Details »
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
23
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
49
state_of_functional_programming.pdf
leifg
0
43
Parsers in JavaScript
leifg
0
48
Building Event Sourced Apps
leifg
1
830
Unicode Spaß
leifg
0
42
Event Sourcing - The Story Telling of Processes
leifg
1
73
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
51
JRuby - The enterprise view
leifg
1
110
Other Decks in Technology
See All in Technology
著者と読み解くAIエージェント現場導入の勘所 Lancers TechBook#2
smiyawaki0820
11
4.8k
freeeにおけるファンクションを超えた一気通貫でのAI活用
jaxx2104
3
1.3k
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
0
130
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
350
AI活用によるPRレビュー改善の歩み ― 社内全体に広がる学びと実践
lycorptech_jp
PRO
1
130
M5UnifiedとPicoRubyで楽しむM5シリーズ
kishima
0
120
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
790
Multimodal AI Driving Solutions to Societal Challenges
keio_smilab
PRO
1
120
Eight Engineering Unit 紹介資料
sansan33
PRO
0
5.8k
Uncertainty in the LLM era - Science, more than scale
gaelvaroquaux
0
650
HIG学習用スライド
yuukiw00w
0
110
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
220
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Done Done
chrislema
186
16k
A better future with KSS
kneath
240
18k
Code Reviewing Like a Champion
maltzj
527
40k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
120
20k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
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