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
Working With Legacy Rails Apps
Search
Ahmed Omran
July 10, 2015
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Working With Legacy Rails Apps
Ahmed Omran
July 10, 2015
More Decks by Ahmed Omran
See All by Ahmed Omran
Compose Software Like Nature Would - RubyConf 2024
this_ahmed
0
100
Sane User Interfaces for Ruby on Rails
this_ahmed
2
180
Compose Software Like Nature Would
this_ahmed
1
240
Welcome to JavaScript
this_ahmed
0
56
Designing & Building RESTful JSON APIs
this_ahmed
4
5.4k
Other Decks in Programming
See All in Programming
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
550
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
660
ソフトウェアラスタライザ
fadis
1
760
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
570
Hono + Inertia + React で LP を構築した話
oukayuka
2
190
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
280
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
110
VibeCodingからAgenticWorkflowへ
starfish719
0
1.1k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
130
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
250
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
600
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
370
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
850
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
880
Balancing Empowerment & Direction
lara
6
1.3k
Transcript
Working With Legacy Rails Apps @this_ahmed
Working With Legacy Rails Apps @this_ahmed
legacy code • untested code (Michael C. Feathers) • code
someone else wrote (old gems, outsourcing, maintainers left) • difficult to work with • risky to change • but serves a useful function
googling legacy code …
every project has legacy code?
None
• learning & experimenting • ambitious applications • big project,
developer churn, hiring outside help • bad code … even with the best of intentions • “Technical debt”
None
–Robert C. Martin “Even the most disciplined development team, knowing
the best principles, using the best patterns, and following the best practices will create messes from time to time.”
in the face of legacy code you can …
None
or…
None
Useful techniques
Rebuild Refactor
–Robert C. Martin “…taking a tangled, opaque, convoluted system and
slowly, gradually, piece by piece, step by step, turning it into a simple, nicely structured, well-designed system.”
Boy Scout Rule Clean up around you work area. Small
fixes; small refractors.
cover and modify • add unit test • test passes
• modify code • test passes
use mock objects to break dependencies
None
mock dependencies
break complicated dependencies with seams
None
seam => put in method + stub
first step to later refactor
i don’t understand this code…
Ask someone
code archeology
code archeology git blame / Github
code archeology search code for context git blame / Github
code archeology project management ticket git blame / Github search
code for context
code archeology git blame / Github project management ticket commit
message search code for context
review • boy scout rule • cover and modify •
break dependencies with mocks and seams • understand code with archeology
some parting thoughts
unit test
None
None
• code review • small git branches • add lots
of context in pull request / commit message