

Roadmap for Learning Rails - desigooner
http://techiferous.com/2010/07/roadmap-for-learning-rails/

======
rio517
I learned Ruby on Rails as my first programming language/framework. Looking
back on my own reservations, hang-ups and attempts to teach other non-
programmers rails, I don't think this learning approach will be successful for
most non-programmers.

The first question I think is: Who wants to master Ruby/Rails and related
technologies? Very few who aren't already developers - at least not at first.
We're all cognitive misers. Most people want to learn the minimum to get the
job done. Also, for a complete newbie, learning is usually optional. People
need to be encouraged to learn a little and then keep building.

For example, when I've taught others CSS/HTML, I used to start with big
overviews and then moved forward. Now, I found it's much more successful to
give people the tiniest bits of information they need to do something and then
building from there. People learn better when they are eager to learn.

Once they start investing some time learning or trying to build their own
application, they'll do what they need to do to keep up. Figuring out how to
deploy to Heroku is a minor step once you're already on the path, but as yet
another whole additional thing to learn, it's intimidating to non-programmers.
In my case, it wasn't until I was knee deep that I started pushing myself
toward any level of mastery. When I got going, I learned Rails as I needed it
when I needed it.

Ruby/Rails can be learned concurrently. While I knew CSS/HTML and basic JS, I
started with the framework not understanding the difference between ruby and
rails. At first, I struggled with some ruby syntax, but after I spent a day
focused on Ruby basics, I stopped having that problem. I built my knowledge
incrementally. This approach may not be for everyone, but I believe it is more
likely to encourage continued learning.

It wasn't until after I learned Ruby/Rails, that I needed and started using
GIT, picked up JS and over the past three-four years grew to be a decent all
around rails developer. My best learning has come from working with other
developers on larger projects. As I've learned these things, it's made picking
up related technologies nearly trivial. Sinatra and mongoDB were a sneeze to
pick up.

If you really want to encourage total newbies to learn Ruby on Rails or any
language, you need to provide them with as many tangible benefits along the
way. If they take baby steps and can see their success, they will constantly
be motivated to continue and (hopefully) to improve.

~~~
grasshoper
Rails is not a programming language ...

~~~
jacquesm
He gets that, which is why he says 'programming language / framework'.

~~~
techiferous
He went back and changed it. It originally just said "my first programming
language."

~~~
rio517
Sorry, thought I acknowledged your point in a follow up comments to you. Just
looking back on this now.

------
elbenshira
I don't know how anyone can learn Rails without knowing how to program. I know
designers that call themselves web "developers." But I wouldn't call someone a
developer if their development involves installing thirty gems and copy and
pasting snippets.

~~~
rio517
You can learn rails and learn to program at the same time. I knew how to hack
PHP, but I learned Ruby on Rails as my first programming language/framework. I
admit I copied and pasted snippets of code probably a dozen or so times, but
you learn from that. I learned from those examples, until I didn't need them.

Just because you learn Rails first doesn't make you not a developer, though I
would agree that if you're still dependent on copy and pasting then you're
really not a developer.

~~~
techiferous
I agree that you _can_ dive into Rails and end up learning it well. And I also
realize that people learn in different ways: some really like the methodical
step-by-step approach and some prefer the dive-in-and-refine-later approach.
You have to do what works for you.

That said, the point of my post is to _accelerate_ the learning process. If
you have a handle on Ruby first then when you are learning Rails you'll spend
more time creating and less time debugging.

But your point is well-taken and no one should look at this roadmap as the
best or only way to learn Rails.

------
samratjp
The map is overrated. Instead spend time reading chapter one of
<http://railstutorial.org/> and you'll have already covered many of the
concepts noted {Heroku, git+github, basic Rails stuff} and just keep going at
it. Hartl's (Insoshi YC approach is very much suitable for even beginners but
doesn't disappoint for more advanced developers as well.

Of course, do tryruby.org first.

------
jblochjohnson
It's funny to read this, 'cause in many ways I started programming
(flailingly) with Ruby/Rails, and then worked backwards from there. I read
Peter Cooper's Ruby for Beginners book, which ended with a little Rails, and
then I read some HTML. I didn't know a lick about JavaScript for a while, and
so there were all these Rails helpers and shortcuts, and they were a complete
mystery! Rails has so much "magic" to it that I often found myself confronted
by problems that I could not understand, because I was at a level too
abstracted to really know what was happening. In an odd way, though, it was
really helpful – it was like walking around in a giant robot suit, being able
to make greater strides than I really should have been able to on my own
strength, and then having it break down from time to time and forced to
understand pieces of the nitty gritty. Eventually it broke down so much that I
had to do a lot of the background reading I should have done from the start;
but what's nice is that I could never imagine coding a project of any sort
without some sort of strict organizational system like Rails'.

~~~
IgorPartola
If I was to start over again I would go like this: C, Python, HTML/CSS,
JavaScript, jQuery, SQL, Django. For me it's imporant to understand how
something is put together on at least some basic level. E.g. I more or less
know how Django's ORM translates into SQL, or how a Python inerpreter
translates Python code into bytecode (at least very theoretically). I hate the
idea of using something as a magical black box.

~~~
jblochjohnson
I would be tempted to agree; I've wanted at times to go and learn C, so I can
know what my Ruby is really written in; but there's always more complexity
underneath; I could and should learn how computers themselves work, but there
will come a time when I will need to, and for now there's only so much time.
Put quickly, I'm using a magical black box to type to you right now, and if I
started from the beginning, I'd never have the time to use it.

~~~
IgorPartola
And then we would not have this conversation :(. My advice is to at least
learn about pointers and virtual memory. It will make a lot of sense out of a
lot of things and it can serve as a nice foundation to actually jump into C
one day.

~~~
jblochjohnson
This seems like a good first step, and I've been looking for a way to get into
C. I'll check it out...

------
grandalf
I actually recommend that people spend only about an hour or two on Ruby
before getting into Rails. Ruby is very intuitive and the few things that
aren't can be temporarily memorized until they make sense.

My roadmap would be:

1) sinatra hello world

2) sinatra hello world w/ erb template

3) deploy it to heroku

4) do something with a form (without form helpers)

5) do something with sessions

6) do something with datamapper

7) who needs rails?

~~~
techiferous
"This seems too complicated."

It will to a developer. This is aimed at newbies. When you've been a developer
for a while, so many skills become automatic to the point that they are
invisible to you and you forget that newbies have to learn them.

Beginning programmers still struggle with proper indentation, for example.
That's something they have to learn.

~~~
grandalf
How is indentation relevant in any of the items I listed?

I think the key is to quickly get to something that does something interesting
and can be changed in minor ways.

------
markbao
I think the easiest way to get to Rails or Django or other similar framework
is to start by learning HTML, then CSS, then Javascript, then PHP + MySQL,
then Rails/Django/etc.

HTML will teach you basic web markup. CSS will teach you basic design.
Javascript, basic interactive functions in the browser. PHP, server-side
knowledge and how to create dynamic pages. MySQL, for how databases work and
how to use them in CRUD situations, or more elaborate ones.

------
samd
Let's say you're not really a developer and you have 6 months to write a
functioning Rails app or you're homeless. Now what's the best roadmap for
learning Rails?

~~~
bphogan
Well, we run RailsMentors (<http://www.railsmentors.org>) for that reason,
stop by, sign up, and see if you can find someone to mentor you. It's all
volunteer, there to help newcomers get excited about Rails. Doesn't cost you a
think, except for your time. Of course, the mentors will expect you to put
some effort in, and they won't do your work for you, but the idea is to help
people like you get up and running.

------
thinkbohemian
Good post, i've been teaching RoR at university of texas over the summer and
the videos/slides are all online.

<http://www.thinkbohemian.com/>

Any feedback is appreciated, as this is a beta class, and i'm writing the
material as I go.

------
bradly
When I first started with Rails the biggest problem for me was that I didn't
know Ruby.

Taking the time to learn Ruby before diving into Rails will make a huge
difference. And if Rails doesn't turn out to be your thing, you still have
your knowledge of Ruby for Sinatra or scripting.

~~~
cheald
I learned Ruby while learning Rails, and I don't think it was necessarily a
bad thing. I mostly just needed help over a few humps ("What are these symbol
things? How do blocks work? Wait, you mean _everything_ is an object?"), and
then it started to come together pretty nicely.

The biggest hurdle in learning Rails, IMO, is that it is such opinionated
software. It does _so much_ for you if you follow convention, and the newbie
follows conventions because the tutorial says to, and has this _holy pogo-
sticking africanized honey bees, what the dong just happened?_ experience.
Rails is fantastic because it does so much of the groundwork for you, but it
also means that there are a lot of conventions to learn, and a lot of magic
that happens that can be exceptionally confusing to the beginner.

~~~
slantyyz
I'm learning Ruby while learning Rails also. I didn't find the Ruby syntax
very confusing, but the humps for me are "How do I make sure I'm doing this
the right way even though I'm a n00b? How do I get over being a database
control freak and give in to db management using ActiveRecord?"

I came from using CodeIgniter, which is a Rails-esque framework for PHP.
Fortunately, the "opinonated" structure etc. made a whole lot of sense to me,
and in retrospect makes me wonder why I didn't jump into Rails sooner.

~~~
cheald
As far as DB management, I don't buy the whole Rails kool-aid as far as DB
constraints go. I still develop constraints, set up foreign keys, and hack
around AR when it's expedient to do so. AR is marvelous at solving 90% of the
standard boring CRUD without any headache, but it isn't a silver bullet, and
you can still shoot yourself in the face performance-wise with it. Don't be
afraid to overstep its bounds when necessary, but don't prematurely optimize,
either.

I've worked in CakePHP since learning Rails, and I have to say that more than
anything, it makes me really dislike PHP as a language. The framework is
pretty decent, but Ruby is so flexible and malleable that it really makes
working in PHP painful.

------
Twisol
This roadmap looks pretty nice! I actually jumped right into Rails without
knowing any Ruby, but I didn't have too many problems. That's probably because
I'd been programming in other languages for years, and I had a good book.
Still, some of the stops on this roadmap look interesting and I'll probably
run over it myself. Nanoc and Sinatra look interesting, and I never did give
Heroku a try.

By the way, has anyone else noticed that "nanoc" is "Conan" backwards?

~~~
techiferous
Thanks!

I think that if you have prior web development experience, you can just jump
right into Rails. If you have prior programming experience but not web
experience, I would visit the HTML/CSS/DNS/JavaScript section of the roadmap.
If you have no programming experience, then I would recommend the full
roadmap.

------
desigooner
wonder if there's a similar to-do list for learning up Django for newbies.

~~~
samratjp
For django, you're better off learning python first, because Django feels less
DSL-like than Rails and it's purely python.

If I were to make a workflow, it'd be this for Django: 1) Learn python with
these two resources: a.This is for absolute beginners
[http://ocw.mit.edu/courses/electrical-engineering-and-
comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-189-a-gentle-introduction-to-programming-using-python-january-
iap-2008/)

b.Do these exercises - [http://code.google.com/edu/languages/google-python-
class/exe...](http://code.google.com/edu/languages/google-python-
class/exercises/basic.html) there are some video lectures if required

2) Understand
HTTP:[http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Req...](http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods)

3) Now onto django, follow this book along:
<http://www.djangobook.com/en/2.0/> keep at it and finish the book regardless
of your comfort level

4) Build an easy search app from scratch to get a better idea of API's and
python's awesomeness: [http://lethain.com/entry/2008/jul/10/yahoo-s-build-
your-own-...](http://lethain.com/entry/2008/jul/10/yahoo-s-build-your-own-
search-service-in-django/)

5) Just make your own app

~~~
mfalcon
I'm having problems understanding how to put my applications written in Django
on the web(wsgi, apache, nginx...). Any recommended links?

So I'd add 2b)some sysadmin knowledge: apache, config files, ssh, ...

~~~
cilantro
I'd suggest anyone in this situation try slicehost / ubuntu / nginx / fcgi as
a starting point. Reasonably fast, low memory, slicehost is awesome and has
awesome tutorials. I find nginx much easier to configure than apache. These
articles should cover everything. You should pretty much be able to paste the
code in, but consider what you are doing first.

[http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-
set...](http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1)

[http://articles.slicehost.com/2009/3/5/ubuntu-intrepid-
nginx...](http://articles.slicehost.com/2009/3/5/ubuntu-intrepid-nginx-
configuration)

[http://stackoverflow.com/questions/605173/how-to-nginx-
virtu...](http://stackoverflow.com/questions/605173/how-to-nginx-virtual-
servers-fcgi-for-django) OR
<http://code.djangoproject.com/wiki/DjangoAndNginx>

[http://docs.djangoproject.com/en/dev/howto/deployment/fastcg...](http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/)

------
smitjel
"It will be months or even years before you are a productive Rails
programmer."

Doesn't that fly in the face of the definition of Rails?

~~~
bphogan
Kinda, but no. You can do simple things quickly with Rails. That means you get
to the harder things faster. You very quickly discover that you have to learn
Ruby if you want to do anything beyond scaffolding. I think that's what he
means by being a "productive" Rails programmer.

But a person who has done Rails development for 6-9 months, ad has used Git,
and knows how to deploy an application to Heroku... they will really be able
to do a lot of cool things very quickly. Just watch what happens in October
during the Rails Rumble.

