I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where
should I turn to “prelearn” ruby? I have taught myself shell scripting
and AWK, but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any
thoughts?
There are a couple of tutorials around. I suggest you grab the
documentation bundle from ruby-doc.org, and take a look at them. Make
sure you follow the links to the latest versions, though, and feel
free to ask follow-up questions.
Programming Ruby certainly does assume some programming background.
“Teach Yourself Ruby in 21 Days” comes well recommended, and is
probably a better intro for you.
Cheers,
Gavin
···
On Thursday, May 13, 2004, 12:13:53 AM, Mike wrote:
I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where
should I turn to “prelearn” ruby? I have taught myself shell scripting
and AWK, but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any
thoughts?
There is a nice tutorial for nonprogrammers at http://pine.fm/LearnToProgram/
You can probably skip the first chapters, since you
already know some programming.
I think Ruby is the best way to learn Object Oriented
programming, because you can see how it works for yourself,
rather than banging some abstract terminology in you head.
(I haven’t read this book though).
Regards,
Kristof
···
On Wed, 12 May 2004 10:10:19 -0400, Mike Rhodes wrote:
I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where
should I turn to “prelearn” ruby? I have taught myself shell scripting
and AWK, but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any
thoughts?
I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where should
I turn to “prelearn” ruby? I have taught myself shell scripting and AWK,
but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any thoughts?
Teach Yourself Ruby in 21 Days is a good book. Admittedly that series
is of inconsistent quality, but this one is really pretty good.
And The Ruby Way has a short intro to OOP in the first chapter, as
well as a whirlwind tour of Ruby. Increasingly out of date, of course.
I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where
should I turn to “prelearn” ruby? I have taught myself shell scripting
and AWK, but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any
thoughts?
…“Object Oriented Software Construction” by Bertrand Meyer) but
that seems like a lot to absorb
I have Meyer on the shelf here and although it is quite a bit to
absorb for a newbie, Meyer’s terminology is fairly complete and
absolutely consistent. That’s quite a breath of fresh air in the
notoriously muddy field of O-O, polluted as it is with misapplied
concepts and misused terminology from thousands of grubby little
experiments, of which C++ is the foremost.
Although I read Meyer over ten years ago, I still relate “new” O-O
terminology back to his. That said, he doesn’t cover the important
terminology from functional programming, much of which would help
with your Ruby.
Yes, the 21 Days books is probably your best bet for a soft
introduction to OO and Ruby.
···
On Wednesday, 12 May 2004 at 23:26:28 +0900, Gavin Sinclair wrote:
On Thursday, May 13, 2004, 12:13:53 AM, Mike wrote:
Programming Ruby certainly does assume some programming background.
“Teach Yourself Ruby in 21 Days” comes well recommended, and is
probably a better intro for you.
–
Jim Freeze
A consultant is a person who borrows your watch, tells you what time it
is, pockets the watch, and sends you a bill for it.
This brings up what I think is currently somewhat of a gap in the
literature. Most of the books on OO out there use Java or C++ for their
examples. I recently heard of a design patterns in C# book. Wouldn’t
it be great to have a tutorial that introduced OO gently to its readers
using ruby code examples?
Carl
Kristof Bastiaensen wrote:
···
On Wed, 12 May 2004 10:10:19 -0400, Mike Rhodes wrote:
I recently bought “Programming Ruby” and set out to learn the language
through sheer force of will and determination, but I have to admit that
I just can’t keep up… I’m way behind the book conceptually. As a
self-taught programmer with no computer science background, where
should I turn to “prelearn” ruby? I have taught myself shell scripting
and AWK, but I have no background in larger programming concepts. I am
considering the book mentioned in “Programming Ruby” (“Object Oriented
Software Construction” by Bertrand Meyer) but that seems like a lot to
absorb just to get started with a new programming language. Any
thoughts?
Thanks,
Mike
Hi,
There is a nice tutorial for nonprogrammers at http://pine.fm/LearnToProgram/
You can probably skip the first chapters, since you
already know some programming.
I think Ruby is the best way to learn Object Oriented
programming, because you can see how it works for yourself,
rather than banging some abstract terminology in you head.
(I haven’t read this book though).
I’ll second that! My goal was actually to write a tutorial covering everything up to “Programming Ruby”, sort of an unofficial prelude, so it might be exactly what you’re looking for.
I think Ruby is the best way to learn Object Oriented
programming, because you can see how it works for yourself, rather
than banging some abstract terminology in you head.
Yes, that was partly why I wrote the tutorial. We have to realize that saying things like “in Ruby, everything is an object” doesn’t really mean anything to someone who doesn’t already know what you are trying to say in the first place.
In so many ways, object-oriented programming is so natural, and Ruby lets that emerge so beautifully. Unfortunately, I think it’s easy to get lost in the terminology. We end up talking about “string objects” or worse, “instances of the String class”, instead of just saying “strings”. Eventually, it’s important to have those three concepts mean the same thing in your head, but until you wrap your head around objects and classes, it’s just confusing.
Anyway, I hope you can get something out of my tutorial, even if it is aimed a bit lower than your level of experience.
Chris Pine
···
On Wed, 12 May 2004 23:43:54 +0900, Kristof Bastiaensen wrote:
Interesting. I was turned off by the title, but after browsing through
it on the O’Reilly web site I see that it’s actually a well-written,
useful book. Thanks for the tip.
Mike
···
On 2004-05-12 11:01:29 -0400, Jim Freeze jim@freeze.org said:
On Wednesday, 12 May 2004 at 23:26:28 +0900, Gavin Sinclair wrote:
Programming Ruby certainly does assume some programming background.
“Teach Yourself Ruby in 21 Days” comes well recommended, and is
probably a better intro for you.
Yes, the 21 Days books is probably your best bet for a soft
introduction to OO and Ruby.
In so many ways, object-oriented programming is so natural, and Ruby lets that emerge so beautifully. Unfortunately, I think it’s easy to get lost in the terminology. We end up talking about “string objects” or worse, “instances of the String class”, instead of just saying “strings”. Eventually, it’s important to have those three concepts mean the same thing in your head, but until you wrap your head around objects and classes, it’s just confusing.
8< ----- snip -----
I agree that OOP is very natural. As for terminology: Perhaps the
biggest roadblock to learning O-O programming (and this is just a
personal opinion) is to understand how objects communicate. It’s all
nice to say an object is like a car, where you don’t need to know how
the engine works to operate it… that works to teach programmers to
read O-O code. However, when programming (and this is specially
important for programmers with a functional language background) is
that (using the car metaphor) you don’t move the car left and right,
but you ask it to move itself (that of course is where the metaphor
turns silly, but it gets the point through). And even though this is
perhaps the most important concept in OOP it is also the most ignored
one by professors, which instead jump straignt to terms like
encapsulation and inheritance and polymorphism.
I went through three courses that dealt with OOP (at least remotely)
until I came upon a professor that explained the above before anything
else. Once that was understood, everything else clicked into place.
I agree completely. I find it always annoying when you open a book about
“object oriented programming”, and it contains twenty times the word
“management” on each page, many other buzzwords, diagrams, flow tables,
but no example code. In fact Object Oriented Programming is very closely
related to human communication and language. Messages (methods) are the
verbs, and objects can be seen as Subjects (or vocative, direct object,
…). OO-programming is a very natural way to talk with the computer. Ruby
does this perhaps even better than the original OO-language (smalltalk),
because constructs like “if” and “while” are part of the languages
grammer, not verbs, just like in real life.
A nice example of this is a moo (http://www.moo.mud.org/moo-faq/), which
is sort of a chat-room with objects. In addition to talking with people
you can manipulate objects, create them, manipulate them, etc… It would
probably be easy to create one in Ruby.
Also the idea of “Duck Typing” is very natural in this regard. (When it
quacks like a Duck, you assume it is a duck). You don’t care what it is,
as long as it responds to what you ask it to do. It is like going to the
shop, they will not ask you what you are, as long as you respond to there
question to pay.
It is interesting that Perl was designed with natural languages in mind,
while Ruby (and 00 in general) may even come closer to them.
Kristof
···
On Thu, 13 May 2004 10:45:29 +0900, Claus Spitzer wrote:
8< ----- snip -----
In so many ways, object-oriented programming is so natural, and Ruby
lets that emerge so beautifully. Unfortunately, I think it’s easy to
get lost in the terminology. We end up talking about “string objects”
or worse, “instances of the String class”, instead of just saying
“strings”. Eventually, it’s important to have those three concepts
mean the same thing in your head, but until you wrap your head around
objects and classes, it’s just confusing.
And even though this is perhaps
the most important concept in OOP it is also the most ignored one by
professors, which instead jump straignt to terms like encapsulation and
inheritance and polymorphism. I went through three courses that dealt
with OOP (at least remotely) until I came upon a professor that
explained the above before anything else. Once that was understood,
everything else clicked into place.