Suggestions for Nuby transition through "suck" stage?

I once read that in learning Ruby, there is a “suck” stage where it is
difficult to accomplish much of anything, followed by a “Wow” stage
where the Ruby N. “sees the light”.

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”? I’m
historically a Unix scripter, haven’t spent a lot of time on languages
like Perl or Python, and am finding the transition to Ruby rather
painful. Any areas to concentrate on??

TPL

Thomas L. wrote:

I once read that in learning Ruby, there is a “suck” stage where it is
difficult to accomplish much of anything, followed by a “Wow” stage
where the Ruby N. “sees the light”.

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”? I’m
historically a Unix scripter, haven’t spent a lot of time on languages
like Perl or Python, and am finding the transition to Ruby rather
painful. Any areas to concentrate on??

TPL

Also, I have substantial amounts of experience coding pseudo-OO Fortran
95, so I do have some idea on how OO programming works (although not the
depths of inheritance and other OO concepts that are not well
implemented in Fortran 95).

On Sat, 18 Nov 2006, Thomas L. wrote:

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”? I’m
historically a Unix scripter, haven’t spent a lot of time on languages

Using what as your main development language then? That will
tend to influence how you think about problems, and will help people
know where you are coming from.

like Perl or Python, and am finding the transition to Ruby rather

Both those now use some kind of OO model, whereas (TTBOMK) most shells
don’t have this aspect. Reading up on the various flavours of OO
will seriously help understand how/why Ruby is put together the way
it is.

painful. Any areas to concentrate on??

Also, tell us where it hurts. Obvious medical analogy in helping
solve the problem.

How are you getting on with the [online?] docs? Which aspects of
them make your brain feel like cheese?

TPL

    Hugh

Thomas L. wrote:

TPL

I started learning Ruby after two years of programming experience in
C++ and Java and as I remember it was quite painful - largely because I
was so used to static typing. As a unix scripter you might need to get
comfortable with objected oriented programming. For that you will need
to read “Programming Ruby.” I also recommend that you become intimate
with every method of Array, String and (to a lesser degree) Hash.
Somewhere half-way to that point I went “wow.” Not to say that got me
anywhere close to “pro” :slight_smile:

Juozas G.

Thomas L. wrote:

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”?

I never experienced the “suck” stage…it’s been wow all the way.
I think that’s because I started off with the Pickaxe book. Experience
with other programming languages helped some. Shell scripting
was mainly useful as a motivation. If you have to maintain a congeries
of shell scripts that call each other, you are powerfully motivated to
seek a better way.

Python also was a motivation. It was a language that looked great
at first, but grew progressively more annoying as I got into it more
deeply. By the end of my Python days, I had come to think of Python
as the Pascal of scripting languages. I was delighted to find that
Ruby did the right thing just about everywhere that Python irked me.
Ruby is beauty and freedom. Or at least as much beauty and freedom
as you are going to find in a scripting language!

Knowing C was useful when it was time to peer into Ruby’s innards, but
knowing C well probably slowed me down. The big conceptual hurdle
was to start thinking naturally in terms of dynamic OO. I didn’t mind,
though, because my main goal at the time was to learn this way of
thought.

Knowing Lisp was helpful, as it had kept my mind from sinking into a
procedural rut.

What I remembered of Pascal was not useful at all. Of course, I’ve
tried to forget as much as possible of that dreadful B&D language,
which I had only learned because I was forced to teach it. (My
experience with Pascal was mainly with the version that inspired
Brian Kernighan’s famous paper Why Pascal is not my favorite
programming language
.I understand that more modern versions are
not as horrible.)

Thomas L. wrote:

I once read that in learning Ruby, there is a “suck” stage where it is
difficult to accomplish much of anything, followed by a “Wow” stage
where the Ruby N. “sees the light”.

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”? I’m
historically a Unix scripter, haven’t spent a lot of time on languages
like Perl or Python, and am finding the transition to Ruby rather
painful. Any areas to concentrate on??

It helps to have a concrete problem you need to solve. Do you have any
somewhat generic task you would like to automate? Searching files for
certain kinds of text strings was a good one for me to learn Ruby,
although I still don’t use it as much as I ought. Processing large
quantities of files from certain formats to certain other formats served
a similar role in helping me learn Perl. What is it you would like to
achieve with the language?

Thomas L. wrote:

/ …

Also, I have substantial amounts of experience coding pseudo-OO Fortran
95, so I do have some idea on how OO programming works (although not the
depths of inheritance and other OO concepts that are not well
implemented in Fortran 95).

With that as a background, it’s clear that Ruby is quite far removed
from
languages you have used until now. In that case, I recommend that you
acquire a copy of the pickaxe (“Programming Ruby”) book, and/or look at
the
online Ruby resources including the code examples in this newsgroup,
using
Google as your indexer.

Thomas L. wrote:

I once read that in learning Ruby, there is a “suck” stage where it is
difficult to accomplish much of anything, followed by a “Wow” stage
where the Ruby N. “sees the light”.

Any hints/suggestions by you Ruby pros for me to expedite my flounder
through the “suck” stage, and achieve the Nirvana of “Wow”? I’m
historically a Unix scripter, haven’t spent a lot of time on languages
like Perl or Python, and am finding the transition to Ruby rather
painful. Any areas to concentrate on??

TPL

It’s always struck me that the key to that nirvana seems to lie mostly
in the meta-programming aspects of Ruby. Look at _why’s stuff, study
blocks, closures, *eval, send, method_missing, the various ways to
dynamically add methods, etc. I think that the barrier to non-suckage
is lower in Ruby than in most languages, so just have some patience. Be
artful in your work and rethink every line if you have the time to do
so.

On Nov 17, 2006, at 11:55 AM, oinkoink wrote:

Python also was a motivation. It was a language that looked great
at first, but grew progressively more annoying as I got into it more
deeply. By the end of my Python days, I had come to think of Python
as the Pascal of scripting languages. I was delighted to find that
Ruby did the right thing just about everywhere that Python irked me.

It’s nice to know I’m not the only one who has felt that way. I’m
sure I wouldn’t appreciate Ruby nearly as much if I hadn’t slogged
through with Python first.

Tom