rails development that doesn't hurt
DESCRIPTION
Slides for @a_matsuda's talk "たのしいRails" at RubyKaigi2011 http://rubykaigi.org/2011/ja/schedule/details/17M03TRANSCRIPT
![Page 1: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/1.jpg)
たのしいRails
@a_matsuda
![Page 2: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/2.jpg)
✴Intro
✴Rails Development
✴Social Coding
✴10 Pro Tips
![Page 3: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/3.jpg)
✴name: Akira Matsuda✴Twitter: @a_matsuda✴GitHub: amatsuda
self.inspect
![Page 4: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/4.jpg)
![Page 5: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/5.jpg)
![Page 6: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/6.jpg)
A Rails programmer
![Page 7: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/7.jpg)
![Page 8: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/8.jpg)
Rails3 Recipe Book
![Page 9: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/9.jpg)
OMG Timetable
![Page 10: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/10.jpg)
脳博士
![Page 11: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/11.jpg)
Seattle.rb
![Page 12: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/12.jpg)
RubyGems
![Page 13: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/13.jpg)
“Writing Friendly Libraries” !!!
![Page 14: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/14.jpg)
RubyKaigiでEric Hodel
のトークを聞きに行かない人とかなんなの?
![Page 15: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/15.jpg)
今日は、そんな皆さんにこそきいてほしい話をします。
![Page 16: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/16.jpg)
✴ Intro
✴Rails Development✴Social Coding
✴10 Pro Tips
![Page 17: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/17.jpg)
Who does Rails Development?
ノシ
![Page 18: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/18.jpg)
Rails development
![Page 19: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/19.jpg)
Rails app development
✴Ride on someone else’s “rails”
![Page 20: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/20.jpg)
Rails app development
I’m not gonna talk about that Rails
development today
![Page 21: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/21.jpg)
Rails app development
![Page 22: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/22.jpg)
Developing “rails”
✴“rails” for yourself✴“rails” for everyone
![Page 23: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/23.jpg)
Developing “rails”
✴Developing Rails plugins✴Developing Rails
![Page 24: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/24.jpg)
✴There are 3 types of Rails development
✴One (that you do everyday) is not so fun
✴Other two are fun
Rails Development
![Page 25: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/25.jpg)
✴ Intro
✴Rails Development
✴Social Coding✴10 Pro Tips
![Page 26: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/26.jpg)
To develop “rails”
Is to write a software not just for you
![Page 27: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/27.jpg)
To write a softwarenot just for you
✴You need to Communicate✴That’s called “Social Coding”
![Page 28: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/28.jpg)
Social Coding
To code is not just to speak to your computer, but to
communicate with the people behind it
![Page 29: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/29.jpg)
Social Coding
![Page 30: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/30.jpg)
Get yourself involved in Social Coding
The way to be a member of
“The Community”
![Page 31: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/31.jpg)
“The Community”
![Page 32: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/32.jpg)
“The Community”is not in this Island
![Page 33: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/33.jpg)
Each of these are “a community”
✴日本Rubyの会✴Asakusa.rb✴Seattle.rb✴...
![Page 34: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/34.jpg)
“The Community”==
“The World”
![Page 35: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/35.jpg)
“The community”
✴A community that people communicate in Ruby code
![Page 36: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/36.jpg)
Let’s get out of here
Code Ruby, and be a member of
“The community”
![Page 37: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/37.jpg)
✴ Intro
✴Rails Development
✴Social Coding
✴10 Pro Tips
![Page 38: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/38.jpg)
Pro tip: to become a great Social Coder
![Page 39: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/39.jpg)
Pro Tip #1
Read Rails
![Page 40: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/40.jpg)
Read`git log`
every morning
![Page 41: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/41.jpg)
Firstly
✴% brew install hub✴% function git(){hub "$@"}✴% alias g='git'
![Page 42: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/42.jpg)
Firstly
% g clone rails/rails
![Page 43: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/43.jpg)
Every morning
✴% g pull✴% g log (diff)
![Page 44: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/44.jpg)
This will tell you:
✴What Rails 3.2 / 4.0 will be like✴Who’s actually creating Rails
![Page 45: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/45.jpg)
Who’s actually creating Rails
You see, so many people are committing
![Page 46: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/46.jpg)
You will notice:
Not only the core team but WE are creating
Rails!
![Page 47: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/47.jpg)
This will teach you:
✴How to improve a product✴How to test a software✴How to write a good comment
![Page 48: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/48.jpg)
Pro Tip #2
Know the people
![Page 49: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/49.jpg)
Reading git log will tell you
✴Who’s remarkable
![Page 50: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/50.jpg)
Remarkable people
✴Stalk them online✴GitHub✴Twitter✴Blog
![Page 51: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/51.jpg)
BTW
You can actually meet and talk to the 3 topmost remarkable
people here today
![Page 52: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/52.jpg)
@tenderlove
![Page 53: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/53.jpg)
@wycats
![Page 54: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/54.jpg)
@carllerche
![Page 55: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/55.jpg)
Pro Tip #3
Imitate good commits
![Page 56: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/56.jpg)
A good commit✴Atomic✴With tests✴With a short commit comment
telling• What• Why
![Page 57: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/57.jpg)
Do it in *your* project
✴in English, of course
![Page 58: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/58.jpg)
Pro Tip #4
English
![Page 59: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/59.jpg)
Why are you scared?
✴We had been learning English for 6~ years
✴We’re speaking Ruby everyday✴There are only 26 letters
![Page 60: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/60.jpg)
✴Know these 26 letters✴Aware of the accents
![Page 61: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/61.jpg)
Watch Railscasts
![Page 62: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/62.jpg)
Pro Tip #5
Live on the edge
![Page 63: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/63.jpg)
edge is fun
✴As you’re reading edge every day,
✴Can’t wait to try these great new features until stable release
![Page 64: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/64.jpg)
Just bundle it
✴gem 'rails', :path => '~/src/rails'
![Page 65: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/65.jpg)
Yes, Bundler! <3 <3 <3
![Page 66: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/66.jpg)
Pro Tip #6
Contribute to the documentation
![Page 67: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/67.jpg)
docrails
% git clone lifo/docrails
![Page 68: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/68.jpg)
docrails
A special Rails fork just for contributing
documentations via GH
![Page 69: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/69.jpg)
Rules
✴Anyone can commit✴No code. Documentations only
(guides / code comments)✴Commit to master branch
directly
![Page 70: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/70.jpg)
Let’s start with a minimal contribution
![Page 71: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/71.jpg)
For example,
“s/a/an/g”https://github.com/rails/rails/commit/90887cb
![Page 72: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/72.jpg)
Anyone can do this if he/she knows how to
use grep & sed
![Page 73: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/73.jpg)
Pro Tip #7
Share your monkey patches
![Page 74: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/74.jpg)
Push it to the upstream
![Page 75: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/75.jpg)
That’s the absolute way to make the world
happier.
![Page 76: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/76.jpg)
✴local monkey patch => makes only your app better
✴push your patch => makes the whole world better
![Page 77: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/77.jpg)
Lonely Monkey Patches
Rails
![Page 78: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/78.jpg)
Social Monkeys
Rails
![Page 79: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/79.jpg)
Stop writing “how to workaround”
on your rubbishy H◯tena blog
![Page 80: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/80.jpg)
Push the patch instead
![Page 81: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/81.jpg)
Please.
![Page 82: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/82.jpg)
fork Rails, push, and send a pull request
![Page 83: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/83.jpg)
Pro Tip #8
Start from a gem
![Page 84: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/84.jpg)
not only using edge Rails,
use edge Gem
![Page 85: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/85.jpg)
% gem up% bundle update
for your health
![Page 86: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/86.jpg)
% gem i [any gem] --pre
is also a good challenge
![Page 87: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/87.jpg)
add a feature!x a bug
request for a feature
![Page 88: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/88.jpg)
Gems I wrote patches for
https://github.com/amatsuda
![Page 89: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/89.jpg)
Pro Tip #9
Write a good README
![Page 90: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/90.jpg)
Kaminari
![Page 91: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/91.jpg)
Pro Tip #10
Attend RailsConf
![Page 92: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/92.jpg)
RailsConf✴Everyone you see in the `git log`
is there✴Meet your Rails heroes✴For a Rails otaku, RailsConf
would be far more exciting than RubyConf
![Page 93: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/93.jpg)
One more thing
![Page 94: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/94.jpg)
Pro Tip #11
Write a book
![Page 95: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/95.jpg)
You will !nd tons of bugs, typos and
incompatibilities
![Page 96: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/96.jpg)
So you can !x them
that’s called
![Page 97: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/97.jpg)
BDD
Book Driven
Development
![Page 98: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/98.jpg)
B-D-D!
No, I’m not talking about “VDD”...
![Page 99: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/99.jpg)
Summary
Code Ruby socially and get yourself involved in
“the community”
![Page 100: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/100.jpg)
Conclusion
“The community” awaits YOU!
![Page 101: Rails Development That Doesn't Hurt](https://reader033.vdocuments.pub/reader033/viewer/2022051312/54640198af795988338b4746/html5/thumbnails/101.jpg)
Thank you!