My Thought on the "Pickaxe book" (from a Ruby novice)

[email protected] wrote:

when I can understand a concept, test it and see that it works. How do

-a

Probably true.

But I am finding I can’t really do much writing of the code, or driving
of the
car until I’m upwards of pages 120. Contrast this with the first Perl
Book I
had from O’Reilly and it’s a bit frustrating. Sorry about the perl
analogy but
it’s my best and most recently used language.

I’m badly hung up on trying to find out things like:
variable scope.
declaration.
loops/branches/control_structures.

They are presented in bits and pieces with a lot of forecasted
references (if
you want to know the details about ‘xxx’ see pages ‘…’) which makes
for a LOT
of page turning.

Because of the extensive differences between Ruby and where many people
will be
coming from, I would think more time spent on the pre-conditions of
writing code
would be helpful. I don’t understand the framework for writing the
language.

As a specific example (again contrasting to Perl) the introduction of
objects
and method from external objects or files is going to be required much
sooner in
Ruby than it will with Perl. But it’s not really explained until quite
a
distance in the book that, unlike perl, a filename doesn’t match the
modulename
or object you are loading. Perl would use something like Time::HiRes to
pull a
module into the code where Ruby would use something like ‘time’ or
‘hires’ or
some path implied string like ‘time::hires’.
But the module has little of any bearing on the objects affected and the
name
used in the require statement is not going to match the name found on
your
filesystem. These inconsistencies, by not being pointed out and
addressed
specifically, have lead to enormous frustration and a very bad first
impression
of the language (being immature and inconsistent). Inconsistencies at
this
level can be very scary to a newbie.

It was past page 100 that I found out that the subject of scope was not
the same
as what I would have expected after decades of programming in other
languages.
This was another nasty surprise. And after 100 pages of other stuff.
This
explained a lot of problems I was finding in my code that I was playing
with.

I realize that I’ve biasedly presented these two issues as problems with
the
ruby language. Well, I can do that because I’m too new to know any
better and I
have yet to “see the light” on why this is a good thing in contrast to
all my
experiences so far in life. From my background, SCOPE is a flaw and
non-strict
pragmas is a condition to be aware of when tracking bugs. But like I
said, I’m new.

I am reminded of the Monty Python skit where the Inspector was going on
about
the sweet titled “Crunchy Frog” and that, since it contained real live
dead
unboned dead frogs lightly killed and lovingly coated in sucrose that
the box
should contain a large red label “CAUTION: Real Live Unboned Dead Frog”.

I’m working through the book myself
but I personally find it a little tedious.
Its not a bad book so far, but I would
have to rate it just so-so compared to
other programming books I’ve read.

One way I think it can improve is
by having unified source code for programs.
They seem to have this style that they
show a little piece of a program, then another
piece a few pages later, then another piece
maybe even a few chapters later… its really
frustrating not being able to get a program
to run because its code is scattered across
half the book.

I would upgrade my rating from so-so to good
if they would unify more of the source code
in the next version of the book.

Just my $0.02 :slight_smile:

Tom A. wrote:

even faster
at first - so much faster once you’ve got it. :wink:

Which book was that? The only Perl book I’ve read is “Programming Perl,”
which is much like “Programming Ruby.” It is meant to be the EVERYTHING
book, which gives you probably way more information that you ever needed
(the Perl book explained how strings are stored - good to know, but not
something you need to know right away.) It’s not meant to be quick dive
into the language.
So, I don’t feel the Pickaxe book is good for just learning the
language, especially if you don’t have a solid programming/comp sci
background already. You’ll probably need to do some tutorials, etc.
However, it is really good if you want to know how to do a particular
thing.

Just my thoughts…

-Justin

Justin C. wrote:

Ruby seems like a great language and the book’s good too. However a
posting :wink:
Probably true.
(the Perl book explained how strings are stored - good to know, but not
something you need to know right away.) It’s not meant to be quick dive
into the language.

Learning Perl (actually from the CD).
Programming Perl is a fantastic book but only after you’ve exhausted the
Learning perl book. It’s a fine example of a reference book. As I read
through
the Pragmatic Ruby book I am seeing where it has that potential. I’m
starting
to come to terms with it.

So, I don’t feel the Pickaxe book is good for just learning the
language, especially if you don’t have a solid programming/comp sci
background already. You’ll probably need to do some tutorials, etc.
However, it is really good if you want to know how to do a particular
thing.

Well, I don’t have that exact background but I’ve always found books
like the
typical “21 days” and “dummies” are mostly useless. no pain, no gain…
:slight_smile:

Alex C. wrote:

I’m working through the book myself
but I personally find it a little tedious.
Its not a bad book so far, but I would
have to rate it just so-so compared to
other programming books I’ve read.

One way I think it can improve is
by having unified source code for programs.
They seem to have this style that they
show a little piece of a program, then another
piece a few pages later, then another piece
maybe even a few chapters later… its really
frustrating not being able to get a program
to run because its code is scattered across
half the book.

I would upgrade my rating from so-so to good
if they would unify more of the source code
in the next version of the book.

Just my $0.02 :slight_smile:

As a newcomer I would tend to agree with this. What I did with my
PickAxeII was to actually split it along the spine into 3 more
manageable books and rebind (DIY style) each of the 3 smaller parts are
as follows:

1: Part I (Facets of Ruby)
2: Part II, III (Ruby in its setting, with objects explained at the end)
3: Part IV upto the end (Bulky reference)

I tend to get some reading done at night and I found it was getting a
bit too bulky for reading just the introdcutory parts. I don’t really
see why I should carry around the bulk of the reference when I won’t
even be using it for a while. I think it would be better to split the
book in 3 physical sections, and market them as one book (another
innovative thing to consider for Pragmatic Programmers.)

Also, I think that the book jumps around with its examples and tended to
frustrate me in the beginning when I was trying to use it as a tutorial.
What I ended up doing was take the 3 parts and read them buffet style.
Each chapter explains concepts well, if you don’t mind not having a
cohesive strategy of code examples supporting the theoretical material.

So, how am I going about learning Ruby?

My approach is to read PickAxeII in conjunction with excellent tutorials
out there (Why’s and Chris P.s come to mind). Read tutorial, See what
PickAxe has to say about it, read some more tutorial read the object
explanations etc. etc.

Right now, I would say to the newcomers to use Chris P.'s book in
conjunction with Why’s tutorial and the Parts I, II and III of the
PickAxeII. To understand Objects in Ruby read the “A little Ruby, A lot
of objects” tutorial. Even though I tend to get lost towards the end of
the tutorial with the meta-classes/meta-meta-objects etc.

So, fellow newbies, this is how I’m going about it:

  1. Chris P.s PDF book from PragProgg’rs (the pdf book is well worth
    it)
  2. Why’s Poignant guide (take frequent breathers and come back to it.
    You’ll find that Why is literally sneaking ruby concepts through your
    subconscious)
  3. PickAxe2 : Part I, II, II (occasionally Part IV, but ri is always
    easier and much lighter)
  4. Brian M.'s “A little ruby A lot of objects”

Unfortunately PickAxeII is NOT the greatest Ruby tutorial out there,
even though Part I & II are excellent introductory texts, but the
pedagogical style suffers from inconsistency and code doesn’t exactly
build on theory. I still constider it an excellent reference book and
frequently re-read parts to understand what’s going on.

I personally would like to see some of the Japanese texts translated
which explain the internals of Ruby. One would be the Ruby Hacking Guide
which Why talks about in his article on Ruby GC.
(http://whytheluckystiff.net/articles/theFullyUpturnedBin.html).

Either that or I’ll have to learn Japanese. :slight_smile:

-Amr

On Jan 20, 2006, at 7:36 PM, [email protected] wrote:

safely read it :slight_smile:
[email protected]

“Ruby for Rails”, from Manning Publications, coming April 2006!
Ruby for Rails

I agree. The 21 day ruby book is probably the most useful 21 day type
book I have ever read. It does cover a bunch of very useful stuff.

Cheers-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
http://yakimaherald.com
[email protected]
blog: http://brainspl.at

[email protected] wrote:

I wrote three of the “days” in “Teach Yourself Ruby in 21 Days”, and I
went out of my way to make them excruciatingly painful, so you can
safely read it :slight_smile:

Well, I certainly do need to keep that in mind.
Glad it’s painful.
Many are not…

Hi –

On Sat, 21 Jan 2006, Tom A. wrote:

Well, I don’t have that exact background but I’ve always found books like the
typical “21 days” and “dummies” are mostly useless. no pain, no gain… :slight_smile:

I wrote three of the “days” in “Teach Yourself Ruby in 21 Days”, and I
went out of my way to make them excruciatingly painful, so you can
safely read it :slight_smile:

But seriously… that book did get a lot of “not a typical book of its
genre” remarks, for which I take a mini-bow but mostly give a big nod
to Mark Slagell, the chief author.

David


David A. Black
[email protected]

“Ruby for Rails”, from Manning Publications, coming April 2006!

On Jan 20, 2006, at 9:25 PM, Tom A. wrote:

Learning Perl (actually from the CD).
Programming Perl is a fantastic book but only after you’ve
exhausted the Learning perl book. It’s a fine example of a
reference book. As I read through the Pragmatic Ruby book I am
seeing where it has that potential. I’m starting to come to terms
with it.

To be fair, the PickAxe was never intended to be a “Learning R.”
book, as much as a “Programming Ruby” book. For a ground-up book on
learning to programm using Ruby, I’d recommend Chris P.'s.

Dave

On Jan 20, 2006, at 3:23 AM, Alex C. wrote:

I would upgrade my rating from so-so to good
if they would unify more of the source code
in the next version of the book.

It was a hard decision: showing full listings all the time would
significantly add to the size of an already big book. That’s why we
did it the way we did, but also made sure we have full and complete
listings, ties to the page numbers, available online at http://
pragmaticprogrammer.com/titles/ruby/code

Cheers

Dave

Dave T. wrote:

To be fair, the PickAxe was never intended to be a “Learning R.”
book, as much as a “Programming Ruby” book. For a ground-up book on
learning to programm using Ruby, I’d recommend Chris P.'s.

“Programming Ruby” is a great, great book, but it is basically the
equivalent of O’Reilly’s “Programming Perl” - more of a reference than a
learning tool. What the community really needs now is a Ruby equivalent
of “Learning Perl”, which is one of the best guides to learning a
programming language I’ve ever seen. A book to get you started before
you move up to the Pickaxe, just like the Llama prepares you for the
Camel. (The Rock Hammer?)

How is “Learn to Program” for learning Ruby? I got the impression that
it was aimed at people who had never done any programming before, as
opposed to “Learning Perl”, which is intended for otherwise experienced
programmers who have simply never encountered Perl.

Chris

On 1/23/06, Dave T. [email protected] wrote:

It was a hard decision: showing full listings all the time would
significantly add to the size of an already big book. That’s why we
did it the way we did, but also made sure we have full and complete
listings, ties to the page numbers, available online at http://
pragmaticprogrammer.com/titles/ruby/code

Thanks Dave!
Is that mentioned anywhere in the book itself? That makes
a big difference. You’ve upgraded my opinion from Good to Great :}