$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HOW TO READ HUGE OPEN SOURCE CODE EASILY
Search
yhirano55
May 01, 2019
Technology
3
840
HOW TO READ HUGE OPEN SOURCE CODE EASILY
for RailsConf 2019 LT
yhirano55
May 01, 2019
Tweet
Share
More Decks by yhirano55
See All by yhirano55
カンファレンス型 技術イベントの作り方 〜Rails Developers Meetup の辿った道〜 / How to Organize a Tech Conference
yhirano55
27
6.6k
Other Decks in Technology
See All in Technology
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
120
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
380
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
190
"人"が頑張るAI駆動開発
yokomachi
1
620
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
310
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.3k
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
100
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
190
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
470
Claude Codeを使った情報整理術
knishioka
11
8.1k
普段使ってるClaude Skillsの紹介(by Notebooklm)
zerebom
8
2.3k
日本の AI 開発と世界の潮流 / GenAI Development in Japan
hariby
1
490
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
1
660
The Pragmatic Product Professional
lauravandoore
37
7.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
250
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
200
エンジニアに許された特別な時間の終わり
watany
106
220k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
51
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
310
Chasing Engaging Ingredients in Design
codingconduct
0
85
How to train your dragon (web standard)
notwaldorf
97
6.5k
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