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
28
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
59
state_of_functional_programming.pdf
leifg
0
54
Parsers in JavaScript
leifg
0
51
Building Event Sourced Apps
leifg
1
850
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
57
JRuby - The enterprise view
leifg
1
120
Other Decks in Technology
See All in Technology
"SQLは書けません"から始まる データドリブン
kubell_hr
2
470
AI時代のガードレールとしてのAPIガバナンス
nagix
0
220
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.2k
AI와 협업하는 조직으로의 여정
arawn
0
110
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
最新の脅威動向から考える、コンテナサプライチェーンのリスクと対策
kyohmizu
1
680
ネットワーク運用を楽にするAWS DevOps Agent活用法!! / 20260421 Masaki Okuda
shift_evolve
PRO
2
200
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
230
Choose your own adventure in agentic design patterns
glaforge
0
130
Azure PortalなどにみるWebアクセシビリティ
tomokusaba
0
390
Rebirth of Software Craftsmanship in the AI Era
lemiorhan
PRO
4
1.9k
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
440
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Being A Developer After 40
akosma
91
590k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
Mind Mapping
helmedeiros
PRO
1
150
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Are puppies a ranking factor?
jonoalderson
1
3.3k
We Are The Robots
honzajavorek
0
210
Deep Space Network (abreviated)
tonyrice
0
110
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