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
object-oriented social coding scripting languag...
Search
Akira Matsuda
December 04, 2011
Programming
23
5.1k
object-oriented social coding scripting language Ruby
とちぎRuby会議04招待講演のスライド, 2011/12/3
http://regional.rubykaigi.org/tochigi04
Akira Matsuda
December 04, 2011
Tweet
Share
More Decks by Akira Matsuda
See All by Akira Matsuda
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
13
4.8k
Hanamiを支える技術 2023 / Asakusa.rb Hanami 2023
a_matsuda
2
550
Rails 7.1をn倍速くした話
a_matsuda
11
12k
RubyKaigi 2022 After Talk
a_matsuda
0
410
Coming Soon…💎 / coming soon
a_matsuda
12
7.8k
Rails Performance Issues and Solutions
a_matsuda
9
35k
Extending Rails for Real World App Development
a_matsuda
9
7.4k
A RubyKaigi Talk
a_matsuda
8
2.4k
Ginza Rails 1
a_matsuda
6
1.2k
Other Decks in Programming
See All in Programming
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
140
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
940
Zoneless Testing
rainerhahnekamp
0
120
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
快速入門可觀測性
blueswen
0
370
Go の GC の不得意な部分を克服したい
taiyow
3
790
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
Exploring: Partial and Independent Composables
blackbracken
0
100
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
280
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
1.2k
Featured
See All Featured
Building an army of robots
kneath
302
44k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Visualization
eitanlees
146
15k
Code Review Best Practice
trishagee
65
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
KATA
mclloyd
29
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Transcript
ΦϒδΣΫτࢦ ιʔγϟϧίʔσΟϯά εΫϦϓτݴޠRuby a_matsuda
None
͍͖ͳΓࢲࣄͰڪॖ Ͱ͕͢ɺ
ઌ݄ࢠͲ͕ ࢈·Ε·ͨ͠ɻ
✴twitter: a_matsuda ✴github: amatsuda
ID
GitHub࠷ॳIDʹ Ξϯεί͕ ͑ͳ͔ͬͨ
real name: Akira Matsuda
໊લබࣈ;ͭ͏͢ ͗ͯIDͷ֬อ͕͍͠
kakutani ͱ͔͏Β·͍͠
ࢠڙͨͪ ;ͭ͏ͷ໊લʹͨ͠ ͷͰۤ࿑ͦ͠͏
ୈ1෦ ΦϒδΣΫτࢦ ιʔγϟϧίʔσΟϯά εΫϦϓτݴޠRuby
✴twitter: a_matsuda ✴github: amatsuda
✴twitter: a_matsuda ✴github: amatsuda
࣭1 GitHubͬͯԿʁ
࣭2 GitHubͷΞΧϯτΛ ·ͩ࣋ͬͯͳ͍ਓʁ
https://github.com/
࣭3 GitHubͰຖ͓ࣄͷ ίʔυॻ͍ͯΔਓʁ
ྺ࢙ͷ͓͞Β͍
Ruby
ʮΦϒδΣΫτࢦ εΫϦϓτݴޠʯ
http://www.ruby-lang.org/ja/about/ “RubyɺखܰͳΦϒδΣΫ τࢦϓϩάϥϛϯάΛ࣮ݱ ͢ΔͨΊͷछʑͷػೳΛ࣋ͭ ΦϒδΣΫτࢦεΫϦϓτ ݴޠͰ͢ɻ“
made in Japan
grew up in US
ຊRubyޙਐࠃɻ
ຊͷRubyͷྺ࢙ٯ༌ೖͷྺ࢙ ✴ΧϯϑΝϨϯε ✴WEBΞϓϦ ✴ιʔγϟϧίʔσΟϯά
ΧϯϑΝϨϯε ✴ RubyConf ✴ RubyKaigi
http://blade.nagaokaut.ac.jp/cgi- bin/scat.rb/ruby/ruby-talk/11883 RubyConf.new(2001)
2006 ʮຊRubyΧϯϑΝϨ ϯε2006ʯ
http://rubyonrails.org/ “Rails was created in 2003 by David Heinemeier Hansson”
Rails in Japan RailsͰϝγ৯ͬͯΔ ਓʁ
Ruby on Railsݱ ✴Ruby͕ࣄʹͳΔ ✴ຊͰఆண͖ͯͨ͠ײ ✴͜͜Rails͚ͩͰ ϝγ͕৯͑ͯ·͢
ୈ3ͷจԽతٯ༌ೖ “Social Coding”
https://github.com/about Company Founded: 2008
Rails premieres on GitHub “GitHub has now officially launched and
Rails is right there at the premiere. The Rails repository now lives at rails/rails and you can check it out with: git clone git://github.com/rails/ rails.git”
WEB+DB Press Vol. 48 (2008/12) ಛू1 [ݴޠผ] Ϟμϯϓϩάϥϛϯά ೖ
None
ຊॳͷGitHubྱࢍهࣄ (ͨͿΜ)
͍͍͜ͱॻ͍ͯΔ “GitHub ͷ࠷େͷಛɺʮਓʯʹϑΥʔ ΧεΛͯɺΦʔϓϯιʔειϑτΣΞ (OSS)ͷੈքʹιʔγϟϧͳࢹΛ࣋ͪࠐ Ή͜ͱʹޭͨ͠Ͱ͢ɻGitHub Ͱɺ ʮϓϩδΣΫτʯʹʮਓʯ͕ΞαΠϯ͞Ε ΔͷͰͳ͘ɺʮਓʯ͕ʮϓϩδΣΫτʯ Λ࣋ͭΑ͏ͳΠϝʔδʹͳ͍ͬͯ·͢ɻ“
ຊॳͷGitHubྱࢍهࣄ (ͨͿΜ) ॻ͍ͨͷΦϨΦϨ
ະདྷΛ༧ݴ “GitHub ·͞ʹίʔυͰޠΓ߹͏ SNS(Social Networking Service)ͳͷ Ͱ͢ɻ͜ͷߏOSSίϛϡχςΟ ͷຊ࣭ΛΈʹද͓ͯ͠ΓɺOSS։ ൃͷύϥμΠϜΛେ͖͘ม͑Δ͖ͬ ͔͚ʹͳΔՄೳੑΛൿΊ͍ͯ·͢ɻ”
͓ങ͍ٻΊͪ͜Β
2008ͷRubyಛूͰGitͷ ✴RubyΛޠΔ্ͰGitط ʹ͔ܽͤͳ͍ଘࡏͩͬͨ ✴RubyίϛϡχςΟ͕Git Λൃݟͨ͠
Why Ruby? ͳͥRuby—GitHub ͳͷ͔ʁ
2ͭͷཧ༝ ✴σβΠϯ ✴ޮ༻
RubyͷσβΠϯ “Ruby is designed to be human-oriented” (Matz)
ιʔείʔυΛ͛߹ͬͯ ίϛϡχέʔγϣϯΛߦ͏SNS ಡΊΘ͔ΔcommitΛ ࡞Δඞཁ͕͋ΔɻՄಡ ੑ͕ͱͯॏཁɻ
·͞ʹ૬ࢥ૬Ѫ— ✴GitHub: ίʔυΛͬͯޠ Γ߹͏SNSɻՄಡੑॏཁɻ ✴Ruby: ίϯϐϡʔλʔͰ ͳͯ͘ਓؒʹϑΥʔΧε͠ ͨݴޠɻՄಡੑߴ͍ɻ
Rubyͷޮ༻ “RubyΩϝΔͱ ؾ͍͍࣋ͪ” (Matz)
”Rubyਓ༷͕ؒؾ Α͘ϓϩάϥϛϯά͢ ΔͨΊͷݴޠ” (Matz)
For whom we write code? RubyΛͬͯͬͯΔ ૬खύιίϯ͡Όͳ ͍ɻਓؒͩɻ
We’re talking to humans using Ruby ͜ΕRubyistͳΒ ΈΜͳΫϦΞ͍ͯ͠Δ ͱ͜ΖͰ͢ΑͶɻ
RubyΛͬͯ୭Λؾ࣋ͪྑͤ͘͞Δͷ͔ ✴not only ࣗ ✴Πϯλʔωοτͷ ͜͏Ͱܨ͕Δਓʑ ✴ͭ·Γੈք
૬ޮՌͰϠό͍͜ͱʹ ҰਓͰΩϝͯؾ͍࣋ͪ ͍ͷɺΈΜͳͰ ϠοͨΒͬͱͬͱ ؾ͍͍࣋ͪʂ
ੈքதͷΈΜͳ͕ूͬͯRubyΛͬ ͯίϛϡχέʔγϣϯ͕ߦΘΕΔ That’s called “the Ruby community”
“The Ruby Community”ʹ͓͚ ΔຊਓͷϓϨθϯεෆ GitHubͰຊਓͷ໊લ Λ໓ଟʹݟͳ͍
Ruby Hero Award(স) զΒ͕ʮRuby Heroʯ m_sekiͰ͢Β ϊϛωʔτ͞Εͳ͍ ͱ͍͏ݱ࣮
ຊਓͷϓϨθϯεෆͷཁҼ ✴ཧత݅ʁ ✴ݴ༿ͷนʁ
ཧత݅ ؔͳ͍Αɻ Πϯλʔωοτ ͩΜɻ
ݴ༿ͷน ҰॹͩΑɻ RubyͩΜɻ
ͨͿΜຊਓͷࠃຽੑͷ ʮԶͷcoolͳίʔυΛ ݟͯ͘Εʂʯతͳͭ ͕ۤख
ʮຊਓʯ͕ډͳ͍ ํ֨ࠩͱ͔ Ҏલͷ
ຊRubyޙਐࠃ ౦ژͱ͔ͱͪ͗ͱ͔ ؔͳ͍
Social Coding࣌ ํͰRubyΛؤுͬͯ ͍Δօ͞Μʹେ͖ͳ νϟϯεɺ͔Ͷɻ
ୈ2෦ Social Coding Practices
GitΛΔ Practice 0
Materials ✴WEB+DB Vol. 50 ಛू2 ✴Git Immersion http://gitimmersion.com ✴Junioຊ ✴GitHub
Bootcamp http://help.github.com/ ✴Git Internals http://peepcode.com/products/ git-internals-pdf
WEB+DB Vol. 50 ಛू2
FAQ Windows?
Windows? Θͳ͍Ͱ͍ͩ͘͞ɻ
Practice 1 ଞਓʹಡ·Εͯஏ͔ͣ ͘͠ͳ͍ίϛοτΦϒ δΣΫτΛ࡞Ε
ଞਓʹಡ·Εͯஏ͔ͣ͘͠ͳ͍ ίϛοτΦϒδΣΫτΛ࡞Ε ✴ৗʹΞτϛοΫͳίϛοτΛ ৺͕͚Δ ✴ಡऀͷؾ࣋ͪΛߟ͑ͨɺ ਖ਼͍͠ίϛοτίϝϯτΛॻ͘
΄Μͱ͏ʹ͋ͬͨ μϝͳίϛοτྫ ✴“various changes” ✴“ xed a bug” ✴“ xes
#1326” ✴TL;DR
ίϛοτίϝϯτͷॻ͖͔ͨ ✴1ߦ: what is this commit? ✴2ߦ: ۭߦ ✴3ߦʙ: details,
why, etc.
ྑ͍͔͠Εͳ͍ίϛοτ “rails g scaffold user name age:integer ...”
ྑ͍͔͠Εͳ͍ίϛοτ ✴“OMG” ✴“oops!”
ιʔγϟϧίʔσΟϯάͷجຊ ϓϩάϥϛϯάͱ ʑͷίϛοτΛ͙ ࡞ۀ
product = [commit, commit, commit, ...] ϓϩμΫτͳΜ͍ͯ͏ ͷʑͷίϛοτ ͕ੵΈॏͳͬͨ݁Ռͷ දͰ͔͠ͳ͍
“Commit” matters ͔ͩΒGHͰcommit ʹίϝϯτͰ͖Δ͚ ͲtreeʹίϝϯτͰ ͖ͳ͍
ࢀߟ https://github.com/ rails/rails/commits
ιʔγϟϧίʔσΟϯάͷਅ ͲΕ͚࣮ͩͳɺ༗ҙ ٛͳίϛοτΦϒδΣ ΫτΛੈͷதʹૹΓग़ ͤΔ͔
Practice 2 ਓͷόάΛ͢
࠷ݶͷϚφʔ ✴ਓͷϓϩμΫτΛͬ ͯͯόάΛ౿ΜͩΒ͢ ✴ͨ͠Βupstreamʹ pull request͢Δ
ຖࣄͰRubyॻ͍ͯ Ε࠷Ͱि1ճ୭ ͔ͷόά౿ΜͰΔͣ
Railsͷ߹ http:// contributors.rubyonrail s.org/
ਖੵΕ جຊతʹϋοΫ͢ΔͨΊ ͷϋοΫͯ͠ͳ͍ɻ ࣄͰ౿Μͩόάʹύον ͯͯΔ͚ͩɻ
͍ͭݴͬͯ·͕͢ɺ RailsόάͷๅݿͳͷͰ ͠ͳ͕Βͬͯͩ͘͞ ͍
Practice 3 Sending “pull request”
΄Μͱ͏ʹ͋ͬͨ μϝͳpull request https://github.com/ amatsuda/kaminari/ pull/181
https://github.com/amatsuda/ kaminari/pull/181 ૬ख͕ຊਓͰӳޠ Ͱॻ͍͍ͯͩ͘͞
ӳޠ͕ۤखʁ
ӳޠ͕ۤखʁ ษڧ͠Ζ
ӳޠ͕ۤखʁ ίʔυͰઆ໌͢Δͱ͍ ͏ςΫχοΫ
μϝͳྫ https://github.com/ amatsuda/everywhere/ pull/2
https://github.com/amatsuda/ everywhere/pull/2 “If you like this, please merge in.”
“If you like this, please merge in.” ͜ΕɺGitHubͱ͍͏ ΞϓϦͷػೳͷઆ໌ Ͱ͢ΑͶɻ
ڭ܇ ʮΑΖ͓͘͠ئ͍͠· ͢ʯཁΓ·ͤΜ Αʔɻ
Practice 4 ࣗͷϓϩμΫτΛ࡞ Δ
http://git.io/kaminari Kaminariͷ߹
Thank you for your +1 <3 <3 <3 1900+ watchers!!
Why I made it ✴Rails 3Ͱwill_paginate͕ಈ͔ͳ ͔ͬͨ ✴ࠔͬͨ ✴ιʔεಡΜͰΧΦεա࣏͗ͯͤ Δؾ͕͠ͳ͍
✴͠ΐ͏͕ͳ͍͔Β৽͍͠ͷ࡞ͬͨ
ެ։ͯ͠Έͨ ΈΜͳࠔͬͯͨΒ͠ ͘ɺΈΜͳ͕ඈͼ͍ͭ ͨ
ܦ࿏ ʮ࡞ͬͨΑʯͬͯtweet ͨ͠ RT @kakutani => ࠃ RT @jmettraux =>
ւ֎
Thank you @jmettraux ͜ͷΛआΓ͓ͯྱΛ ݴ͍͍ͨ
࠷৽࡞ http://git.io/ active_decorator
ڭ܇ ͕ࣗඞཁʹ͔ΒΕͯ ࡞ͬͨͷΈΜͳ ඞཁͳ͜ͱ͕͋Δɻ
μϝͳ(੯͍͠)ྫ ThinReports https:// github.com/thinreports
ThinReports @a_matsuda: @thinreports_org ͔ͯ͠͠GitHubͰ ιʔε͕ެ։͞Ε͍ͯͳ͔ͬͨΓ͠·͔͢ʁ ↓ ͍ɺGitHubͰͳ͘(ͳΜ͔ࣗલSVN)Ͱެ։ͯ͠· ͢ɻͰ͕͢ɺݱࡏGitHubʹϛϥʔ͠Α͏ͱըࡦதͰ͢ɻ ↓ ThinReports
ɺͦͷશͯͷιʔείʔυΛެ։͍ͯ͠ ·͢ɻιʔείʔυϝΠϯͷ Subversion ϦϙδτϦ ʹՃ͑ͯ GitHub ʹϛϥʔͱͯ͠ެ։͍ͯ͠·͢ɻ
ࠓ͔ΒΦʔϓϯιʔεΔͷʹ ࣗલSVNཁΒͳ͘ͳ͍ʁ ruby-lang͡Ό ͋Δ·͍͠
μϝͳ(੯͍͠)ྫ CastOff https://github.com/ soba1104/CastOff
Practice 5 ؒΛݟ͚ͭΖ
hocus_pocusͷ߹ http://git.io/hp
͋ΔGHʹDM͕ “colaborating with hocus_pocus” by @kurko
“colaborating with hocus_pocus” ✴ٿͷཪଆ͔Β ✴໘ࣝͳ͍ ✴ख͍͍ͨʂ ✴ςετॻ͘Αʂ ✴υΩϡϝϯτॻ͘Αʂ
So, I gave him a commit right Stay tuned, and
see how we work together!
ڭ܇ Πϯλʔωοτ͍͢͝
Practice 6 meet the people
RubyKaigi “RubyձٞͰ֎ࠃͷrubyistsͱຊͷ rubyistsྑ͍ਓؒؔΛੜΈग़ͤΔ ͱࢥ͏ɻͦΕͰɺདྷͷRubyձٞ ͳ͍͔Β൵͍͠ɻ” https://twitter.com/#!/ takoyakikamen/status/ 142439088052649985
RubyConf ຊਓ͍ͬͺ͍Ͱ ҆৺
RailsConf ✴RubyHero͕͏͡Ό͏ ͡Ό ✴RailsϓϩάϥϚʔͳΒ RubyConfΑΓָ͍ͣ͠
Conclusion
Why Ruby? ✴designed for Humans ✴ΈΜͳͰΩϝΔͱ ؾ࣋ͪྑ͍
Practices Hack Ruby and spread your commits!!