-----BEGIN PGP SIGNED MESSAGE-----

In article <20020111021338.11708.00000866 / mb-mo.aol.com>,
Moontoeki <moontoeki / aol.com> wrote:
>What is the best way to learn Ruby?
>
>I am a newcomer with windows background.
>This is my way to learn Ruby;
>
>-- study the book "the programming ruby - 
>     the pragmatic programmer", now reading 2nd time

- - Don't study to much. Just start writing... If you've
read it once you're ready to start coding. 

- - What works for me is to pick something concrete to do and work
on that. When you get stuck go back to the documentation. If you
find that something is taking a lot of code to write, start
trying to figure out why. Maybe it's a module that already
exists, or maybe there's a feature in the language that you don't
know how to use yet. You don't learn a language by reading, you
learn it by writing.

- - Another trick is to take an existing app and tweak it. 
Take something in the samples dir and make it do something
new. 

>
>-- study built-in libraries, classes and modules
>

- - Install the ri program and download the alpha's of
Rdoc. Running rdoc on the rdoc src and reading the html is a
pretty good way to learn.

>-- study irb.rb -- to understand the inside of Ruby
>
>What's your idea?
>

- - Go for the src. I don't have a lot of Ruby experience
at the moment, but I have to say the src and internals
are pretty damn readable. If you've got a good C background
and know a bit about objects, you could easily change things
in the core after a day or two of reading code. Read the 
C src for one of the basic classes like Fixnum. 

- - Most of the useful tools I've picked up along the years
have the ugly complexity hidden somewhere. There's some
routine or something where the deep magic happens and 
it takes a long while before you can even understand it
much less tweak it. For example: in perl it's the pp.c 
routine. I keep expecting to find some file like that
in the ruby src, but astonishingly I can usually understand
every c file I've looked at so far at first glance. 
I'm sure there's some ugly bits somewhere, but I haven't
found them yet %-). 

- - Booker C. Bense 

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBPD71egD83u1ILnWNAQGe1AP/f9kzQ41HWrPvhCLciA+zxr5vR1kNBmVY
X8phnb482yx4FrF5G39tt+tDqHh9FlDYfn9kDbnyQUEuGZq+BxZRxOKhLjaix2TC
IvARbZm7t2byuNw0wj4hMRuL3he/oEh/2A3I6WDQ4iGXp53s2KTqNdSYsT0N8ESn
2CiHpSWyHx0=
=YkHM
-----END PGP SIGNATURE-----
--