Date post: | 15-Jul-2015 |
Category: |
Technology |
Upload: | netguru |
View: | 281 times |
Download: | 1 times |
Rubyon Rails
from nil to :guruthe epic journey
that’s how we like to call NULL
RUBY = LANGUAGERAILS = FRAMEWORK
or “Ruby on Rails” for web apps
tryruby.org
Our Evil Plan
1. Ruby, Rails2. Best Practices
3. Let’s make Twitter
RUBY(that language)
RUBY is a dynamic, scripting, object-oriented language…
RUBY is a dynamic, scripting, object-oriented language…
BLA BLA BLA
R ead E val P rint L oop
how Ruby
thinks?oh, gosh
METAprogramming
this is HELLO WORLD:
and this is HELLO WORLD too:
OMG, even this is HELLO WORLD:
DON’TMISSTHE POINT!
metaprogramming is awesome
PRIVATElike a
TRUE STAR
Ruby is
pros and cons
EVERYTHING’sanOBJECT
Q: how many objects you see?
WAYMORECOOL
STUFFTO LEARN
bloc.io/ruby-warrior
RUBY is BORING(and Rails too)
RUBY is BORINGSTABLE
(and Rails too)
rvm.io
RUBY is BORINGSECURE
(and Rails too)
RUBY is BORINGOPEN SOURCE
(and Rails too)
72%of Ruby devs
is on GitHub#java #39percent #sad#wow
RUBY is BORINGCOMMUNITY
(and Rails too) -DRIVEN
rubygems.org
GEMS for everything
GEMS for everything
GEMS for everything
ruby-toolbox.com
BTW KEEP YOUR GEMSIN THE GEMFILEINSTALL
UPDATE
> bundle installINSTALL WITH CMD:
bundler.io
Most Popular
Gem ? of all times
RAILSRuby on
(that web framework)
Model View Controller
app/models
app/views
app/controllers
railscasts.com
deprecation
notice!!!
Test-Driven Developmentor TDD
Test-Driven Developmentor TDD
1. write spec
Test-Driven Developmentor TDD
1. write spec run specs fail
there’s no code yet, douh
Test-Driven Developmentor TDD
1. write spec run specs fail2. write code
WRITE ONLY WHAT IS TESTED!
Test-Driven Developmentor TDD
1. write spec run specs fail2. write code run specs fail again?
BAD IMPLEMENTATION!!!11oneor bad specs
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
betterspecs.org
and many more…
jQuery of course too!
BEST PRACTICES
or hints stolen from netguru’s wiki
!META TIPS
BUT FIRST
for editors
2 SPACES EVERYWHERE_ _
SOFT TABScode hard, use soft tabs, go pro_ _
OK REAL TIPS NOW
bbatsov/ruby-style-guide
bbatsov/rails-style-guide
EDITOR WARSA long time ago in a galaxy far, far away....
EDITOR WARSA long time ago in a galaxy far, far away....
beginners who
think they need an IDE
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
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
SMALLcommits
small like this
CODEREVIEWyou are NOT your code
accepted passed rejected
…and not checked/passed after 48hrs: auto—
deploy block!
Continuous
how to fail and raiseapprox. 1000 times a day
IntegrationST
AGIN
G
PROD
UCTIO
N
“Real CI is when, after tests, every commit immediately goes
to production.”our CTO 8) @madsheep
heroku.com
$0 dev
accounts
JUNIORStake the stage(codename “I have no idea for more slides”)
TWITTER WASN’T BUILT IN A DAY
IT WAS 2 DAYS(ok, this might be a lie)
railstutorial.org
rubyrogues.com
the podcast
trug.pl
3city Ruby Users Group+ board games after party <3
RoR WORKSHOPS
by netguru.co
18-19of October
2014
HINTS for youpsst, keep it secret
use *nix#1
HINTS for youno, seriously
ask & google#2
HINTS for youyes, we can
you can do it#3
really, ask jnr devs later if you don’t believe me
netguru.co