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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Leif Gensert
December 05, 2019
Technology
0
25
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
57
state_of_functional_programming.pdf
leifg
0
52
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
75
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
53
JRuby - The enterprise view
leifg
1
110
Other Decks in Technology
See All in Technology
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
0
850
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
5
940
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
8
7.1k
管理者向けGitHub Enterpriseの運用Tips紹介: 人にもAIにも優しいプラットフォームづくり
yuriemori
0
180
クラウド × シリコンの Mashup - AWS チップ開発で広がる AI 基盤の選択肢
htokoyo
2
130
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
0
1.8k
楽しく学ぼう!ネットワーク入門
shotashiratori
0
360
AIエージェント時代に備える AWS Organizations とアカウント設計
kossykinto
2
560
PMBOK第8版は第7版から何が変わったのか(PMBOK第8版概要解説) / 20260304 Takeshi Watarai
shift_evolve
PRO
0
100
AWS SES VDMで 将来の配信事故を防げた話
moyashi
0
240
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
3
490
組織全体で実現する標準監視設計
yuobayashi
2
380
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
140
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Making Projects Easy
brettharned
120
6.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
440
Test your architecture with Archunit
thirion
1
2.2k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
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