Ruby for Python/OO developer

  • Thread starter Achim Domma (SyynX Solutions GmbH)
  • Start date
A

Achim Domma (SyynX Solutions GmbH)

Hi,

I'm a experienced Python developer (also other OO languages, like C++,
C#, Java). Until now I had no reason to look at ruby because I love
Python, but I'm very interested in Rails.

Could somebody probose a good tutorial for me? I'm not interested in
'how to program' and so one. My target is clearly Rails. Is there
something for 'language-switchers' available?

regards,
Achim
 
J

Joe Van Dyk

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm a experienced Python developer (also other OO languages, like C+
+, C#, Java). Until now I had no reason to look at ruby because I
love Python, but I'm very interested in Rails.

Could somebody probose a good tutorial for me? I'm not interested
in 'how to program' and so one. My target is clearly Rails. Is
there something for 'language-switchers' available?

Honestly, the best documentation / tutorial out there is the Agile
Web Development book by Dave Thomas and DHH. You can get the PDF or
hard-copy from http://www.pragprog.com.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDU21ysWh6/7z1gt4RAt8UAJwKAq6uCgZkesNl458khcUyLw8a4ACgzP9s
C6QVrBP6hbsujMMb5NSlfBQ=
=LhNY
-----END PGP SIGNATURE-----
 
A

Achim Domma (SyynX Solutions GmbH)

Joe said:
Honestly, the best documentation / tutorial out there is the Agile Web
Development book by Dave Thomas and DHH. You can get the PDF or
hard-copy from http://www.pragprog.com.

I had already a look at the website, but the book does not seem to
contain a introduction to Ruby. Because I'm new to Ruby, I think I
should learn some basics first.

regards,
Achim
 
J

Joe Van Dyk

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe Van Dyk wrote:



I had already a look at the website, but the book does not seem to
contain a introduction to Ruby. Because I'm new to Ruby, I think I
should learn some basics first.

There's a short section / appendix at the back of the Agile Web Dev
book that has an introduction to Ruby. It will probably be a good
enough introduction for you, although if you plan to get heavily into
Rails, you'll probably want the Ruby "Pickaxe" book as well. I refer
to my copy of it all the time at work.

The first edition of the Pickaxe is available online for free, covers
Ruby 1.6. The second edition covers Ruby 1.8 http://
www.pragmaticprogrammer.com/titles/ruby


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDU3Q8sWh6/7z1gt4RApryAJ0Z59JAbekEJ3Qng2O1QSpkJ2GuZgCfS0yB
p6nOoUJrqk7smIBE9kX0d14=
=hacK
-----END PGP SIGNATURE-----
 
D

Damphyr

Achim said:
I had already a look at the website, but the book does not seem to
contain a introduction to Ruby. Because I'm new to Ruby, I think I
should learn some basics first.
Well, nothing like the Pickaxe book. You can start with the first
Edition (which is a pleasure to read), I recommend buying the second
edition as it is invaluable as a reference, and you can also read the
chapters online on www.ruby-doc.org.#
Cheers,
V.-

--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
 
T

Timothy Hunter

Achim said:
Hi,

I'm a experienced Python developer (also other OO languages, like C++,
C#, Java). Until now I had no reason to look at ruby because I love
Python, but I'm very interested in Rails.

Could somebody probose a good tutorial for me? I'm not interested in
'how to program' and so one. My target is clearly Rails. Is there
something for 'language-switchers' available?

regards,
Achim

_why's (poignant) guide to ruby

http://www.poignantguide.net/ruby/

Also look around www.ruby-doc.org
 
P

Peter Burns

I was in the same boat as you Achim, experienced Python guy who got
into Ruby because of Rails. Now it's my favorite language. I learned
on Agile Web Development and The Pickaxe, but there's definitely a lot
of the Pickaxe that I skimmed past. The most important section for
you is probably the one on blocks. Beyond that, you might want to run
through the section on Regular Expressions pretty quickly, as the
syntax may be a bit unfamiliar, specifically String.scan. Play around
with rubygems and irb (equivalent to the python interactive shell).=20
Oh, and a couple things that will be helpful to pick up rails quickly:

Things that begin with a colon, e.g. :action, or :controller, are
symbols, which are similar to Strings, save that they're more
efficient for certain comparison operations. That and method calls
like has_and belongs_to_many in class definitions are actually methods
that tend to modify the class definition that they're in.
 
S

snacktime

------=_Part_8941_31193085.1129568888105
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Programming Ruby from the pragmatic bookshelf is a great guide to most of
what you will need to get going, and it has a good reference section. I cam=
e
from a strong perl/python background and this book has been invaluable.

Chris

------=_Part_8941_31193085.1129568888105--
 
A

Achim Domma (SyynX Solutions GmbH)

marco said:
http://www.djangoproject.com/

I haven't used either Rails or Django, but I've read their intro
docs and they seem quite similar, at least on the surface.


Yes, I know Django. It looks very promissing and as a python fan I would
be happy if I could say: "Forget Rails, I'll use Django!". But from an
objective point of view I would say, that Rails is at a point where
Django might be in one or two years.

regards,
Achim
 
A

Achim Domma (SyynX Solutions GmbH)

Peter said:
I was in the same boat as you Achim, experienced Python guy who got
into Ruby because of Rails. Now it's my favorite language.

Interesting to here, that there are developers which converted from
python to ruby. The syntax looks a little bit scaring to me. In this
point I wonder about myself, because I was a hardcore-C++-template-guy
for many years before I stared using python more and more.
I learned
on Agile Web Development and The Pickaxe, but there's definitely a lot
of the Pickaxe that I skimmed past.

They look quite good, but I hesitate to buy two expensive books, just to
give Rails a try.
The most important section for
you is probably the one on blocks. Beyond that, you might want to run
through the section on Regular Expressions pretty quickly, as the
syntax may be a bit unfamiliar, specifically String.scan. Play around
with rubygems and irb (equivalent to the python interactive shell).
Oh, and a couple things that will be helpful to pick up rails quickly:

Things that begin with a colon, e.g. :action, or :controller, are
symbols, which are similar to Strings, save that they're more
efficient for certain comparison operations. That and method calls
like has_and belongs_to_many in class definitions are actually methods
that tend to modify the class definition that they're in.

That was just the kind of information I was looking. Thanks a lot. I'll
have a look at the points you mentioned.

regards,
Achim
 
G

Gene Tani

The syntax becomes quite natural, what is difficult is keeping perl,
python, tcl and ruby straight. Also, the language hasn't gone through
substantial overhauls like python 2.2 and perl 5.6, just new libraries
and incremental improvements (ok, a lot of them):

http://whytheluckystiff.net/articles/rubyOneEightOh.html

(read _why_'s "Upturned Bin" and the Metaclass article while you're
over there.
 
A

Adrian Holovaty

Yes, I know Django. It looks very promissing and as a python
fan I would be happy if I could say: "Forget Rails, I'll use
Django!". But from an objective point of view I would say, that
Rails is at a point where Django might be in one or two years.

Hmm, I'm not too sure about that. For example, Django gives you an
automatic, production-ready admin interface for your model objects.
Rails has nothing of the sort. The admin interface is one of the
reasons Django has become extremely popular even though there's no
"official" version yet.

Rails and Django have different advantages and disadvantages; it's
ludicrous to say that Rails is "one or two years" ahead of Django.

Adrian
 
J

Jeff Wood

------=_Part_19676_25936689.1129581457734
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

... uh, this is becoming a religious battle, and I don't know about
everybody else, but I'd much rather you two folks take it somewhere private=
 
P

Peter Burns

I was in the same boat as you Achim, experienced Python guy who got
Interesting to here, that there are developers which converted from
python to ruby. The syntax looks a little bit scaring to me. In this
point I wonder about myself, because I was a hardcore-C++-template-guy
for many years before I stared using python more and more.

Yeah, I wouldn't have thought that I would prefer ruby for the average
scripting project, but the language has some more kick to it; my
programs are shorter, and I can do more cool metaprogramming. Of
course, part of that is probably the fact that I learned Ruby after I
had a few more years of experience, so I guess I shouldn't be
surprised that my skills with it are more sophisticated.
They look quite good, but I hesitate to buy two expensive books, just to
give Rails a try.

The first edition of the Pickaxe is free, and it's the only version
that I've used. It's all over the net, but why's site is serving it
particularly fast today: http://whytheluckystiff.net/ruby/pickaxe/

If you do pick up the Agile Web Development Book, one thing that I
wished they would have covered was Active Migrations, which let you
define and modify your database tables in pure ruby. (domain specific
languages rock)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top