Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
HOW TO READ HUGE OPEN SOURCE CODE EASILY
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
yhirano55
May 01, 2019
Technology
910
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HOW TO READ HUGE OPEN SOURCE CODE EASILY
for RailsConf 2019 LT
yhirano55
May 01, 2019
More Decks by yhirano55
See All by yhirano55
カンファレンス型 技術イベントの作り方 〜Rails Developers Meetup の辿った道〜 / How to Organize a Tech Conference
yhirano55
27
6.8k
Other Decks in Technology
See All in Technology
企画からFlutter実装まで、1つの機能を一貫して開発したプロセスと成果物
khiroyuki1003
0
140
Flutter Widget Previewerで始めるUIプレビューとVRTの自動化
sakusaku3939
0
200
AI秘書と毎日働くのはもう当たり前。開発以外の業務に足りない機能をどう埋める?
minorun365
PRO
4
2.2k
Systems Manager AgentがインストールされたPCを紛失した時の対策を考えてみた
amarelo_n24
1
110
Consistency for mere mortals - A gentle guide to consistency
ufried
0
120
re:Inventで、人生は変わったのか? / growth-builders-hub-1-reinvent-2026
mhrtech
2
230
詳解 never 型 - ボトム型の性質を深掘り
nealle
0
140
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
220
なぜAI時代に技術記事を書くのか?どう書くのか? 〜bunの場合〜
kworkdev
PRO
0
4.6k
1週間、Opus封印でお願いします
kintotechdev
1
440
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
750
自律的なチームを作るためにTechPMがやらないこと
ny7760
0
500
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Being A Developer After 40
akosma
PRO
92
590k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
Making Projects Easy
brettharned
120
6.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Navigating Weather and Climate Data
rabernat
0
580
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.6k
Transcript
HOW TO READ HUGE OPEN SOURCE CODE EASILY @yhirano55 at
RailsConf 2019
self.inspect ➤Yoshiyuki Hirano from JAPAN ➤GitHub: @yhirano55 ➤Twitter: @yoshi_hirano ➤Rails
Contributors #62 ➤I’m chief organizer of “Railsdm” ➤I love Rails community
Have you ever read Ruby on Rails source code?
MORE QUESTIONS ➤Do you know the request/response Lifecycle of Rails
application? ➤Do you know the steps of Active Record's create, update, validate, and destroy? ➤Do you know the processing of initialization of Rails application?
I do not think many of them actually do
To tell the truth,
I have not, too
I guess we don't have much time and patience
Yesterday, I was impressed by Skylight’s sponsor talk. The design
of the rack application is really elegant
AND.. ➤I want to read the code of its lifecycle
of Rails application ➤But I don't want to spend much time to trace the code ➤I want to read source code easily. What would you do?
Finally, I've shipped a new RubyGem this morning
yhirano55/trace_location
DEMO
At first, boot rails console, and set request env
And execute `Rails.application.call(env)` inside `TraceLocation.trace` block
Then it generates a log file
It’s traced locations about `Rails.application.call(env)`
It’s traced locations about `Rails.application.call(env)` CALL on rails/engine.rb:522 #call
It’s traced locations about `Rails.application.call(env)` CALL on rails/application.rb:607 #build_request
It helps you can get tracing the processing of the
Lifecycle of Rails application easily!!
HOW IT WORK? ➤Use TracePoint that is a Ruby standard
API ➤TracePoint API is one of the BLACK MAGIC in Ruby
IMPLEMENTATION This is TracePoint
IMPLEMENTATION Collect logs
IMPLEMENTATION Trace events while block call And disable when it
finished
In making this gem, I used TracePoint for the first
time. It makes me really feel so good!!
It helps you get deeply understanding Ruby on Rails
It's my pleasure to help you enjoy Ruby on Rails
self.inspect ➤Yoshiyuki Hirano from JAPAN ➤GitHub: @yhirano55 ➤Twitter: @yoshi_hirano ➤Rails
Contributors #62 ➤I’m chief organizer of “Railsdm” ➤I love Rails community
We’re going to have a new Ruby on Rails conference
The name is…
RailsKaigi 2020
We hope you join RailsKaigi 2020 in Japan
yhirano55/trace_location Thank you so much