from nil to guru: intro to ruby on rails
TRANSCRIPT
![Page 1: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/1.jpg)
Rubyon Rails
from nil to :guruthe epic journey
that’s how we like to call NULL
![Page 2: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/2.jpg)
![Page 3: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/3.jpg)
RUBY = LANGUAGERAILS = FRAMEWORK
or “Ruby on Rails” for web apps
![Page 4: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/4.jpg)
tryruby.org
![Page 5: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/5.jpg)
Our Evil Plan
1. Ruby, Rails2. Best Practices
3. Let’s make Twitter
![Page 6: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/6.jpg)
RUBY(that language)
![Page 7: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/7.jpg)
RUBY is a dynamic, scripting, object-oriented language…
![Page 8: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/8.jpg)
RUBY is a dynamic, scripting, object-oriented language…
BLA BLA BLA
![Page 9: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/9.jpg)
![Page 10: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/10.jpg)
R ead E val P rint L oop
how Ruby
thinks?oh, gosh
![Page 11: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/11.jpg)
METAprogramming
![Page 12: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/12.jpg)
this is HELLO WORLD:
![Page 13: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/13.jpg)
and this is HELLO WORLD too:
![Page 14: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/14.jpg)
OMG, even this is HELLO WORLD:
![Page 15: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/15.jpg)
DON’TMISSTHE POINT!
metaprogramming is awesome
![Page 16: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/16.jpg)
PRIVATElike a
TRUE STAR
Ruby is
pros and cons
![Page 17: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/17.jpg)
![Page 18: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/18.jpg)
EVERYTHING’sanOBJECT
![Page 19: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/19.jpg)
Q: how many objects you see?
![Page 20: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/20.jpg)
WAYMORECOOL
STUFFTO LEARN
![Page 21: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/21.jpg)
bloc.io/ruby-warrior
![Page 22: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/22.jpg)
RUBY is BORING(and Rails too)
![Page 23: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/23.jpg)
RUBY is BORINGSTABLE
(and Rails too)
![Page 24: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/24.jpg)
rvm.io
![Page 25: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/25.jpg)
RUBY is BORINGSECURE
(and Rails too)
![Page 26: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/26.jpg)
RUBY is BORINGOPEN SOURCE
(and Rails too)
![Page 27: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/27.jpg)
72%of Ruby devs
is on GitHub#java #39percent #sad#wow
![Page 28: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/28.jpg)
RUBY is BORINGCOMMUNITY
(and Rails too) -DRIVEN
![Page 29: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/29.jpg)
rubygems.org
![Page 30: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/30.jpg)
GEMS for everything
![Page 31: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/31.jpg)
GEMS for everything
![Page 32: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/32.jpg)
GEMS for everything
![Page 33: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/33.jpg)
ruby-toolbox.com
![Page 34: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/34.jpg)
BTW KEEP YOUR GEMSIN THE GEMFILEINSTALL
UPDATE
> bundle installINSTALL WITH CMD:
![Page 35: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/35.jpg)
bundler.io
![Page 36: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/36.jpg)
Most Popular
Gem ? of all times
![Page 37: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/37.jpg)
RAILSRuby on
(that web framework)
![Page 38: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/38.jpg)
Model View Controller
app/models
app/views
app/controllers
![Page 39: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/39.jpg)
railscasts.com
deprecation
notice!!!
![Page 40: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/40.jpg)
Test-Driven Developmentor TDD
![Page 41: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/41.jpg)
Test-Driven Developmentor TDD
1. write spec
![Page 42: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/42.jpg)
Test-Driven Developmentor TDD
1. write spec run specs fail
there’s no code yet, douh
![Page 43: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/43.jpg)
Test-Driven Developmentor TDD
1. write spec run specs fail2. write code
WRITE ONLY WHAT IS TESTED!
![Page 44: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/44.jpg)
Test-Driven Developmentor TDD
1. write spec run specs fail2. write code run specs fail again?
BAD IMPLEMENTATION!!!11oneor bad specs
![Page 45: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/45.jpg)
Test-Driven Developmentor TDD
1. write spec run specs fail2. write code run specs fail again?3. fix code run specs success!
so called RED/GREEN
![Page 46: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/46.jpg)
betterspecs.org
![Page 47: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/47.jpg)
![Page 48: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/48.jpg)
and many more…
jQuery of course too!
![Page 49: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/49.jpg)
BEST PRACTICES
or hints stolen from netguru’s wiki
![Page 50: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/50.jpg)
!META TIPS
BUT FIRST
for editors
![Page 51: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/51.jpg)
2 SPACES EVERYWHERE_ _
![Page 52: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/52.jpg)
SOFT TABScode hard, use soft tabs, go pro_ _
![Page 53: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/53.jpg)
OK REAL TIPS NOW
![Page 54: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/54.jpg)
bbatsov/ruby-style-guide
![Page 55: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/55.jpg)
bbatsov/rails-style-guide
![Page 56: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/56.jpg)
EDITOR WARSA long time ago in a galaxy far, far away....
![Page 57: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/57.jpg)
EDITOR WARSA long time ago in a galaxy far, far away....
beginners who
think they need an IDE
![Page 58: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/58.jpg)
EDITOR WARSA long time ago in a galaxy far, far away....
beginners who
think they need an IDEseniors who
need an IDE for 2 hours
![Page 59: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/59.jpg)
EDITOR WARSA long time ago in a galaxy far, far away....
beginners who
think they need an IDEseniors who
need an IDE for 2 hours
![Page 60: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/60.jpg)
SMALLcommits
small like this
![Page 61: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/61.jpg)
CODEREVIEWyou are NOT your code
accepted passed rejected
…and not checked/passed after 48hrs: auto—
deploy block!
![Page 62: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/62.jpg)
Continuous
how to fail and raiseapprox. 1000 times a day
IntegrationST
AGIN
G
PROD
UCTIO
N
![Page 63: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/63.jpg)
“Real CI is when, after tests, every commit immediately goes
to production.”our CTO 8) @madsheep
![Page 64: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/64.jpg)
heroku.com
$0 dev
accounts
![Page 65: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/65.jpg)
JUNIORStake the stage(codename “I have no idea for more slides”)
![Page 66: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/66.jpg)
TWITTER WASN’T BUILT IN A DAY
![Page 67: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/67.jpg)
IT WAS 2 DAYS(ok, this might be a lie)
![Page 68: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/68.jpg)
railstutorial.org
![Page 69: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/69.jpg)
rubyrogues.com
the podcast
![Page 70: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/70.jpg)
trug.pl
3city Ruby Users Group+ board games after party <3
![Page 71: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/71.jpg)
RoR WORKSHOPS
by netguru.co
18-19of October
2014
![Page 72: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/72.jpg)
HINTS for youpsst, keep it secret
use *nix#1
![Page 73: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/73.jpg)
HINTS for youno, seriously
ask & google#2
![Page 74: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/74.jpg)
HINTS for youyes, we can
you can do it#3
really, ask jnr devs later if you don’t believe me
![Page 75: From nil to guru: intro to Ruby on Rails](https://reader031.vdocument.in/reader031/viewer/2022032421/55a6848f1a28ab37498b481d/html5/thumbnails/75.jpg)
netguru.co