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
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
47
state_of_functional_programming.pdf
leifg
0
43
Parsers in JavaScript
leifg
0
47
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
自然言語でAPI作業を片付ける!「Postman Agent Mode」
nagix
0
140
大規模プロダクトで実践するAI活用の仕組みづくり
k1tikurisu
5
1.8k
技術広報のOKRで生み出す 開発組織への価値 〜 カンファレンス協賛を通して育む学びの文化 〜 / Creating Value for Development Organisations Through Technical Communications OKRs — Nurturing a Culture of Learning Through Conference Sponsorship —
pauli
5
540
信頼性が求められる業務のAIAgentのアーキテクチャ設計の勘所と課題
miyatakoji
0
150
生成AIシステムとAIエージェントに関する性能や安全性の評価
shibuiwilliam
1
150
レガシーで硬直したテーブル設計から変更容易で柔軟なテーブル設計にする
red_frasco
4
580
単一Kubernetesクラスタで実現する AI/ML 向けクラウドサービス
pfn
PRO
1
360
スタートアップの事業成長を支えるアーキテクチャとエンジニアリング
doragt
1
7.4k
リアーキテクティングのその先へ 〜品質と開発生産性の壁を越えるプラットフォーム戦略〜 / architecture-con2025
visional_engineering_and_design
0
6.6k
PostgreSQL で列データ”ファイル”を利用する ~Arrow/Parquet を統合したデータベースの作成~
kaigai
0
160
TypeScript 6.0で非推奨化されるオプションたち
uhyo
15
5k
メッセージ駆動が可能にする結合の最適化
j5ik2o
9
1.5k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Code Review Best Practice
trishagee
72
19k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Side Projects
sachag
455
43k
Designing for humans not robots
tammielis
254
26k
Building Adaptive Systems
keathley
44
2.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.1k
Visualization
eitanlees
150
16k
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