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
Code Reading
Search
高見龍
May 31, 2013
Programming
1.6k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Code Reading
Learning More about Ruby by Reading Ruby Source Code'
高見龍
May 31, 2013
Transcript
86 slides
None
高見 龍 です
高 見龍 です @eddiekao
Code Reading Chimpr Learning more about Ruby by Reading Ruby
Source Code
I come from Taiwan photo by Fishtail@Taipei
photo by J o n a G r a p
h Y
photo by HeyNix
photo by randomwire
None
None
I’m a Python guy (≈ 2 years) I’m a iOS
app guy (≈ 2 years) I’m a Flash guy (≈ 8 years) I’m a Ruby guy (≈ 4 years)
But not a C guy, yet!
Ruby > Rails
“I’m a SHOW OFF person”
“Experience Sharing is fun”
Current Status 80% iOS app, 20% Ruby/Rails
100% Ruby Lover!
None
Web Development Conference in Taiwan
None
2 days, 3 tracks session
750+ attendees
all tickets sold out in 4 mins
WebConf Taiwan 2014
Will be held on Jan 2014
850+ attendees in 2014, hopefully.
All about web development
楽しい
http://webconf.tw
Code Reading
Why read source code? How to start? What I learned?
Anything interesting?
Why read source code ?
Ian Ruotsala
http://blog.rubybestpractices.com/posts/gregory/005-code-reading-stdlib.html “once you start digging around in someone else’s code
base, you’ll learn a lot about your own strengths and weaknesses” - Ruby Best Practice
See how the Core Team write Ruby
photo by chaines106 Read the source, Luke!
source http://kyaraben.seesaa.net/article/168967765.html source code は友達
Contribution!
Committer in my dream!
FUN! :)
Requirement ?
C language
“What if I don’t have any skill of C?”
“Just Learn It!”
Curiosity and Passion
Where to Start ?
get source files!
download from Ruby website, or clone from github
Ruby 1.9.2 p290
None
Quick browsing.. :)
* .c + * .h * .rb (stdlib)
Let’s have some fun!
Object Class String Array Hash
“ruby.h”
Object => RObject Class => RClass String => RString Array
=> RArray Hash => RHash
“object.c”
Init_XXXX( )
“all Class’s class is a Class”
“new”
class A def initialize puts "hello" end end a =
A.new
Proc
How to execute a Proc?
proc.call proc[ ] proc.yield proc === 123
attributes
push v.s. <<
Object ID
What else?
Haskell-like syntax :)
head (x:_) = x tail (_:xs) = xs
people = { "Eddie" => ["green", "
[email protected]
"], "Joanne" => ["yellow",
"
[email protected]
"] } people.map { |name, (color, email)| puts [name, email] }
parse.y#8277-8299 shadowing_lvar_gen( ) people = { "Eddie" => ["green", "
[email protected]
"],
"Joanne" => ["yellow", "
[email protected]
"] } people.map { |name, (_, email)| puts [name, email] }
Method missing
Anything interesting ?
Interesting naming.. XD
Conclusion
“from basic structure”
“don’t be afraid of source code”
source http://kyaraben.seesaa.net/article/168967765.html source code は友達
References
http://i.loveruby.net/ja/rhg/book/ “Rubyソースコード完全解説” (RHG) by 青木峰郎
http://patshaughnessy.net/ruby-under-a-microscope “Ruby Under a Microscope” by Pat Shaughnessy
Chimpr Hope we all can become Jedi Master someday :)
高見 龍 です
以上です。 ご清聴ありがとうございました thanks for your listening :)
高見龍 Contacts photo by Eddie Website Blog Plurk Facebook Google
Plus Twitter Email Mobile http://www.eddie.com.tw http://blog.eddie.com.tw http://www.plurk.com/aquarianboy http://www.facebook.com/eddiekao http://www.eddie.com.tw/+ https://twitter.com/#!/eddiekao
[email protected]
+886-928-617-687
More Decks by 高見龍
See All by 高見龍
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
740
自己的售票系統自己做!
eddie
0
790
AI Agent 時代的開發者生存指南
eddie
4
3k
print("Hello, World")
eddie
2
770
為你自己學 Python - 冷知識篇
eddie
1
570
為你自己學 Python
eddie
0
880
Generative AI 年會小聚 - AI 教我寫程式
eddie
0
340
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
840
AI 時代的程式語言學習法
eddie
0
380
Other Decks in Programming
See All in Programming
ActionController meets Protocol Buffers
sorah
1
800
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
130
GraphQL の onError と Nullability のこれから
quramy
0
210
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
SODA - FACT BOOK(EN)
sodainc
1
230
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
140
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.1k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
310
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
420
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
210
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
240
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Code Reviewing Like a Champion
maltzj
529
40k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
Marketing to machines
jonoalderson
1
6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880