Writing Rails tutorial

I have seen few posts where people are complaining about of Rails
documentation. I myself had lots of troubles with it, perhaps because
of my exposure to PHP. This is my third attempt to learn Rails, and at
last I am getting somewhere. I even made a little tutorial as an
exercise. http://www.jacekpodkanski.uklinux.net/rails/totorial1.html

I intent to improve what I have done so far and add to it as I learn
Rails, so hopefully I will fill the gap between the simple tutorial
and API documentation learning Rails and maybe helping others like
me.

Please tell me what you think of it.

Without a doubt more documentation on the latest Rails 2.1 is
needed ;o)

Up to now I thought that documentation on http://api.rubyonrails.org/
was for the latest version of Rails, but when I compared the
modification date with release of Rails I had a little shock. I think
it is too big task for me to write up-to-date comprehensive
documentation.

I thought about starting from simple tutorial and and then trying to
build a bridge between simple documentation and the API, even if it is
not up-to-date. My humble aim at the moment is to become productive
using Rails, and help others like me, who are trying to learn Rails.

I wonder how people cope not having up to date documentation. Are they
looking into Rails source code?

2008/8/28 DC [email protected]:

2008/8/29 Xavier N. [email protected]:

Rails is big. You can’t read a tutorial and jump to the API.

I think the most common path to learn Rails is to read the musts and
program. The API is meant as a reference.

The tutorials I have read so far give only you ready made solutions to
authors example problems. They don’t teach you to explore and play
with things. On one hand they give too much theory for a newbie and on
the other hand they don’t show you how you can use API and other
documentation to play and experiment.

My progress only started when I have abandoned copying tutorials and
started experimenting. At last I am able to do some of the things that
I was able to do in PHP. Still I have no idea how to find my ways
round the API. I have stumbled upon few things by accident, so there
is hope.

Still I have no idea what I am supposed to do with models and what
code should go there, but already I can use database and display it’s
content.

On Fri, Aug 29, 2008 at 12:56 AM, Jacek P.
[email protected] wrote:

I wonder how people cope not having up to date documentation. Are they
looking into Rails source code?

Rails is big. You can’t read a tutorial and jump to the API.

I think the most common path to learn Rails is to read the musts and
program. The API is meant as a reference.

On Fri, Aug 29, 2008 at 1:26 AM, Jacek P.
[email protected] wrote:

My progress only started when I have abandoned copying tutorials and
started experimenting. At last I am able to do some of the things that
I was able to do in PHP. Still I have no idea how to find my ways
round the API. I have stumbled upon few things by accident, so there
is hope.

Playing around is a very inefficient way to progress in my opinion.
Spend a couple of months reading some musts and you’ll have an
entirely different perspective (you being generic). That in addition
to program of course.

2008/8/29 Xavier N. [email protected]:

Playing around is a very inefficient way to progress in my opinion.
Spend a couple of months reading some musts and you’ll have an
entirely different perspective (you being generic). That in addition
to program of course.

Everybody’s different, your approach to me is like spending few months
reading the musts teaching you how to ride a bicycle before you learn
to ride.

I need to do both reading and playing/experimenting. When I was only
reading tutorial I was getting nowhere. I wonder if there are others
who prefere my approach to learning Rails, so writing a tutorial for
people like me wouldn’t be a waste of time

It’s one thing to say “the documentation is broken” and another to say
“there’s no documentation for these methods/classes:” and list the
methods/classes. Somebody out there should be able to help you as long
as you’re not vague.

On Fri, Aug 29, 2008 at 2:03 AM, Jacek P.
[email protected] wrote:

Everybody’s different, your approach to me is like spending few months
reading the musts teaching you how to ride a bicycle before you learn
to ride.

No, no, that’s why I said you need to program as well as reading.

But if you only read you’re progress will be slow, unfocused, with
friction. You can’t drive an airplane just by copy & paste and playing
around. You need to study the instruments and now formally how things
work to be able to know what’s available and how to use it.

The main oroblem with just playing around is that you don’t know what
you don’t know.

2008/8/29 Xavier N. [email protected]:

On Fri, Aug 29, 2008 at 2:03 AM, Jacek P.
[email protected] wrote:

Everybody’s different, your approach to me is like spending few months
reading the musts teaching you how to ride a bicycle before you learn
to ride.

No, no, that’s why I said you need to program as well as reading.

I’m glad you understand me.

But if you only read you’re progress will be slow, unfocused, with
friction. You can’t drive an airplane just by copy & paste and playing
around.
I agree with you about copy & paste, but I think my definition of
playing aorund is different than yours, and this is why I was able to
make significant progress

You need to study the instruments and know formally how things
work to be able to know what’s available and how to use it.
Imagine M. Faraday who didn’t have satisfying documentation about that
how electromagnetism works, he studied by playing and experimenting,
not by reading. Reading can save me time so I do not have to reinvent
the wheel, but it is not the only way to make progress. Before I was
able to experiment I had to read several times some impenetrable book.
So I can see your point. The problem is that only 1st chapter was
useful to me.

The main problem with just playing around is that you don’t know what
you don’t know.
You will never know everything, especially in situations where
documentation should be improved.
My problem is to know what I need to know, I do not intend to know
everything, but constantly increase my knowledge.

On Fri, Aug 29, 2008 at 2:40 AM, Jacek P.
[email protected] wrote:

Imagine M. Faraday who didn’t have satisfying documentation about that
how electromagnetism works, he studied by playing and experimenting,
not by reading.

Note that I don’t say you do not progress, I say your progress is slow
and unfocused, compared to the progress you can do if you study, like
a martial artist, a piano player, a chessmaster. Study and practice.

If Faraday had the modern books he would have been done in an epsilon
of the time he needed to figure everything out by himself.

On Fri, Aug 29, 2008 at 2:16 AM, Xavier N. [email protected] wrote:

But if you only read you’re progress will be slow, unfocused, with
friction.

If you only program I mean.

2008/8/29 Xavier N. [email protected]:

a martial artist, a piano player, a chessmaster. Study and practice.

If Faraday had the modern books he would have been done in an epsilon
of the time he needed to figure everything out by himself.
I do not intend to try to figure out everything by myself. I only
think that some people need to experiment a little to understand how
things work and maybe have more enthusiasm for further study. A bit
like a kid who was playing with chemistry set, and later went to
university to study chemistry.

I think that a composer is a piano player, who experiments with new
melodies or styles
so there is a room both for study and experimenting,

Jacek P. wrote:

I have seen few posts where people are complaining about of Rails
documentation. I myself had lots of troubles with it, perhaps because
of my exposure to PHP. This is my third attempt to learn Rails, and at
last I am getting somewhere. I even made a little tutorial as an
exercise. http://www.jacekpodkanski.uklinux.net/rails/totorial1.html

I intent to improve what I have done so far and add to it as I learn
Rails, so hopefully I will fill the gap between the simple tutorial
and API documentation learning Rails and maybe helping others like
me.

Please tell me what you think of it.

Hi,

i am also having PHP background too. There are many PHP programmers who
has been working on rails very successfully, yes i am too.

if you want to learn rails with in like one or two week with particles.
ya it is very simple.

Please follow these following steps.
first setp- start with this very short book(The Little book of
Ruby).This is free.
http://www.sapphiresteel.com/The-Little-Book-Of-Ruby

second step- find this book from google
John McCreesh - Learn Ruby On Rails in 4 Days (August 2005).pdf
use this book, use and rails version(i suggest to learn)
use older version of rails like(1.23,1.2.4…etc)
and use SCIte editor(free and with Ruby installer) for development.

Thanks
Purab

2008/8/29 Purab K. [email protected]:

and API documentation learning Rails and maybe helping others like
ya it is very simple.
and use SCIte editor(free and with Ruby installer) for development.

Thanks
Purab

Maybe my problem is that I’m not a real programmer, I was only
programming when I needed something for myself or friends. Perhaps
proper programmers are comfortable with a different approach, but I
need experiment with things.

I have learned Ruby few years ago. But when I tried to learn Rails at
first I stumbled over meta-programming syntax, and I couldn’t even
understand how to make on my own very simple dynamic page that would
also use data from database.

Now I got past this point so I feel I will be inspired by the Rails in
4 Days book to make further progress. As I have used old documentation
and experimenting to get so far.

My two cents. There’s a whole hell of a lot to be said for getting out
there and coding and getting your feet wet but, unlike PHP where there
are no conventions and “rules”, sometimes just “experimenting” with
Rails instead of reading [instead of not along with] instructional
materials can often lead one down the wrong paths, reinforcing
non-Rails-way methodology, and creating Frankencode monstrosities. For
example, how would one ever stumble on the core idea of MVC just
playing with code? Books, guides, tutorials all have good places in my
opinion. YMMV

RSL

On Fri, Aug 29, 2008 at 5:23 AM, Jacek P.
<[email protected]

wrote:

[snip]

I have learned Ruby few years ago. But when I tried to learn Rails at
first I stumbled over meta-programming syntax, and I couldn’t even
understand how to make on my own very simple dynamic page that would
also use data from database.

If have truly learned Ruby, then you would have learned
meta-programming.

Now I got past this point so I feel I will be inspired by the Rails in
4 Days book to make further progress. As I have used old documentation
and experimenting to get so far.

Good luck,

-Conrad

On Fri, Aug 29, 2008 at 5:39 AM, Russell N.
[email protected]wrote:

RSL

Yes, I think is very important to understand the concepts by reading the
relevant
book(s) and reinforce those concepts by coding. Thus, you’ll do some
reading,
do some coding, and do some more reading, and so on. This is pretty
much
how my computer science course work did it and it has been very
effective in
learning the material or anything for that matter.

Good luck,

-Conrad

2008/8/29 Russell N. [email protected]:

RSL

I must admit you are correct, I do realise I could write bad PHP style
code in Rails. But somebody had to come up with MVC idea before it was
in the books, so there is hope that my desire to experiment might one
day give some interesting results. You are correct about the book and
tutorials, but experimenting and trying new things is also important.
After all this is one of the reasons why i am trying to learn Rails.

2008/8/29 Conrad T. [email protected]:

If have truly learned Ruby, then you would have learned meta-programming.
Well, I do not have a “black belt” in Ruby yet. but I am in the
process of exploring meta-programming. Hope that I will get more
advice from people on this forum, but I will never renounce playing
and experimenting, even if I will study seriously as I was advised
before.

Now I got past this point so I feel I will be inspired by the Rails in
4 Days book to make further progress. As I have used old documentation
and experimenting to get so far.

Good luck,
-Conrad

Thank you