Forum: Ruby Ruby as First Language

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fbb86fd26253fbaa0205bf51a940cdc4?d=identicon&s=25 woodyee (Guest)
on 2006-02-23 15:10
(Received via mailing list)
Hi! I'm interested in getting opinions on Ruby as a first language. For
example, how it compares to python/perl/basic/etc as a first language.
My goals are to learn the basics of a language, then delve into network
programming,  and then learn how to interact with the operating system
programaticallly. Will Ruby help me achieve this goal? Will Ruby enable
me to transition to other languages (ex., C/Assembly/etc)? Thanks in
advance!

WY
1fba4539b6cafe2e60a2916fa184fc2f?d=identicon&s=25 unknown (Guest)
on 2006-02-23 15:16
(Received via mailing list)
Hi --

On Thu, 23 Feb 2006, woodyee wrote:

> Hi! I'm interested in getting opinions on Ruby as a first language. For
> example, how it compares to python/perl/basic/etc as a first language.
> My goals are to learn the basics of a language, then delve into network
> programming,  and then learn how to interact with the operating system
> programaticallly. Will Ruby help me achieve this goal?

Yes, and then some.

> Will Ruby enable me to transition to other languages (ex.,
> C/Assembly/etc)? Thanks in advance!

It won't cause you to know those other languages of course, but it
will enable you to learn them in the sense that it won't stop you :-)
And C actually connects up naturally with Ruby, since Ruby is written
in C and you can write C extensions for Ruby.

Have you seen this book?

http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html


David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! http://www.manning.com/books/black
89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-02-23 15:19
(Received via mailing list)
On Thu, 2006-02-23 at 23:14 +0900, dblack@wobblini.net wrote:

> Have you seen this book?
>
> http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html

I wish I had that book when I first started programming.  That book
changed my way of thinking about code more than any other book!  Be
warned....If you learn ruby first then you'll hate the syntax of just
about every other language!

Charlie Bowman
recentrambles.com
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-23 15:19
(Received via mailing list)
woodyee wrote:
> Hi! I'm interested in getting opinions on Ruby as a first language.
> For example, how it compares to python/perl/basic/etc as a first
> language. My goals are to learn the basics of a language, then delve
> into network programming,  and then learn how to interact with the
> operating system programaticallly. Will Ruby help me achieve this
> goal? Will Ruby enable me to transition to other languages (ex.,
> C/Assembly/etc)? Thanks in advance!

Ruby vs. Perl: much cleaner syntax and less typing.

Ruby vs. Basic: although there might be Basic dialects around that have
evolved from the ridiculous line number + GOTO I'd rather not consider
it.

Ruby vs. Python: can't comment on that.

Ruby takes away a lot of the nifty details that you would have to deal
with in C or C++ (memory management etc.) or Perl (how many $'s do I
need
here?).  OTOH there is no *direct* access to system libs (as from C for
example).  For that you would have to write a C extension.  Still, I
think
to initially learn to develop software Ruby is a pretty good choice.

Kind regards

    robert
0b561a629b87f0bbf71b45ee5a48febb?d=identicon&s=25 Dave Burt (Guest)
on 2006-02-23 16:05
(Received via mailing list)
Robert Klemme wrote:
> OTOH there is no *direct* access to system libs (as from C for
> example).  For that you would have to write a C extension.  Still, I think
> to initially learn to develop software Ruby is a pretty good choice.

Just to knock down your only negative point a little, Robert, there is
DL,
which makes accessing C libraries about equal in pain to doing it in C,
no?

Me, I'm all for learning Ruby as a first language. My first language was
Basic, and I do reckon that it probably doesn't matter too much what you
pick, but an important factor is being able to actually produce
something
cool/fun/useful as you go. (Games, for instance.) Learning a second
language
will be significantly easier after you've learnt one already, almost
regardless of the language.

Ruby's productive, flexible, and crosses paradigms other languages are
built
around. Perhaps it's less simple than, say, Java or Basic, but I think
it
more than makes up for it in the
being-able-to-get-something-done-quickly-and-easily department. The
paradigm-crossingness of it may mean it's easier to pick up a wider
range of
languages after you've mastered Ruby; it's a bit like Lisp, a bit like
Basic, a bit like Java.

Choose Ruby.

Cheers,
Dave
D792c356b560e78b1db4bd2475e84d1c?d=identicon&s=25 Giacecco (Guest)
on 2006-02-23 16:20
(Received via mailing list)
Hi Woodyee, how important is this information according to your
profession?

If you're doing this for yourself, Ruby will be a great language to
learn and use.

But if you are doing this to revise your position in the job market,
none of the languages you listed will give you much advantage: it's
Java and/or C# to be obligatory these days in any curriculum.

I am certain that Ruby will grow a lot in the next years and things
will change, but if you have to decide today, and it is for your job,
Ruby is still too weak.

Gianfranco
9dfe8c734b0f9b37a4e218425c0a2138?d=identicon&s=25 Gene Tani (Guest)
on 2006-02-23 16:20
(Received via mailing list)
Robert Klemme wrote:
> woodyee wrote:

> Ruby vs. Perl: much cleaner syntax and less typing.
>
>
> Ruby vs. Python: can't comment on that.
>

Perl has gotten a bad rap, well-written perl is pretty easy to follow.
Also perl's kind of hard to avoid, in certain circles, lots of times i
start somethign by reading CPAN modules, lots of OReilly books have
sample code in perl, etc. so at least being able to read perl code is
helpful

python:
http://mail.python.org/pipermail/python-list/2005-...

ruby has a couple really nice IDEs, komodo and Arachno, which make
learning as painless as possible, popping up method names for you to
click on when the IDE can determine what object instance you're talking
about.  (Wing IDE for python is also really nice).
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-23 16:29
(Received via mailing list)
Gene Tani wrote:
> Perl has gotten a bad rap, well-written perl is pretty easy to follow.
> Also perl's kind of hard to avoid, in certain circles, lots of times i
> start somethign by reading CPAN modules, lots of OReilly books have
> sample code in perl, etc. so at least being able to read perl code is
> helpful

Yes, but this thread is about "first language".  I don't know how Perl's
OO has changed since Perl 5 but then it was horrible.  Certainly nothing
I'd recommend for learning OO - I'd definitely choose even C++ and of
course Java / C# over Perl for OO.

Kind regards

    robert
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-02-23 16:38
(Received via mailing list)
On Feb 23, 2006, at 9:28 AM, Robert Klemme wrote:

> Perl's
> OO has changed since Perl 5 but then it was horrible.

I agree.

On the flip side though, I would argue that Perl has better
networking, which the original poster was interested in...

James Edward Gray II
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-23 16:41
(Received via mailing list)
Dave Burt wrote:
> Robert Klemme wrote:
>> OTOH there is no *direct* access to system libs (as from C for
>> example).  For that you would have to write a C extension.  Still, I
>> think to initially learn to develop software Ruby is a pretty good
>> choice.
>
> Just to knock down your only negative point a little, Robert, there
> is DL, which makes accessing C libraries about equal in pain to doing
> it in C, no?

I forgot that.  Yeah, with DL it seems reasonably easy.  Good point!

> Me, I'm all for learning Ruby as a first language. My first language
> was Basic, and I do reckon that it probably doesn't matter too much
> what you pick, but an important factor is being able to actually
> produce something cool/fun/useful as you go. (Games, for instance.)

I wouldn't go that far.  For example, at the time I was using BASIC
there
were no functions and you had to work with GOSUB and GOTO for
modularization; for me this is a major drawback.  I rather recommend to
use PASCAL (no kidding) over ancient BASIC's.  I know current BASIC
dialects are much better - but then again, there are so many of them...

> Learning a second language will be significantly easier after you've
> learnt one already, almost regardless of the language.

I'm not sure; it certainly helps, but I guess the paradigmatic distance
(TM) of the second language makes a difference.  I guess it's easier to
go
from C++ to SmallTalk (both OO) than from Lisp to BASIC...

> Choose Ruby.

Definitively! :-)

    robert
90ebe8da17aabd36cc30d9f96a530e6f?d=identicon&s=25 James H. (Guest)
on 2006-02-23 17:15
(Received via mailing list)
But more importantly, *should* Ruby be a first language taught, period?
 I tend to think no.

C allows you to have a base understanding of all the technical aspects
of programming, like memory management, procedural thought, and the
basics of writing methods.  These are generally good skills to have,
and you'll find that you use them everywhere.  C is a lot like latin,
insofar that it's not changing much, and is used to communicate ideas.
I also think it's a little more "native" to initial human understanding
about programming.  People tend to think of it as a linear, or
semi-cyclical set of instructions.  In that regard, I think C is a good
way to enter the scene.

The thought process overhead in object oriented programming is quite
extensive.  It takes a long time to really get in the mode.  If you
learn somethings about C, and get a basic grasp before moving on to
Ruby, you'll understand and have a better appreciation for some of the
"magic" going on behind the scenes, as well as opening other avenues
for your programming career.  Doubly, it takes a long time to learn how
to think in objects -- something I admit, myself, to just be getting
the hang of.  When you start reading about design patterns, you realize
the complexity, and beauty that OOP allows you.

If the original poster decides to forgo C for Ruby in the time being, I
hope the poster eventually returns to it, if even just to have a base
understanding of what's going on beneath the scenes.
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-02-23 17:30
(Received via mailing list)
Giacecco wrote:
> Hi Woodyee, how important is this information according to your
> profession?
>
> If you're doing this for yourself, Ruby will be a great language to
> learn and use.
>
> But if you are doing this to revise your position in the job market,
> none of the languages you listed will give you much advantage: it's
> Java and/or C# to be obligatory these days in any curriculum.

Your primary goal in learning a language is the most important criteria.

If you are looking first to get insight into programming, go  learn
Lisp, or enough Lisp to find your way around.

There are free videos online by Hal Abelson and Gerald Jay Sussman of
their book, Structure and Interpretation of Computer Programs

http://swiss.csail.mit.edu/classes/6.001/abelson-s...

The book is available online for free as well.

Then go learn Ruby.

If you are in need of vocational training, go learn Java.

Then go learn Ruby.

>
> I am certain that Ruby will grow a lot in the next years and things
> will change, but if you have to decide today, and it is for your job,
> Ruby is still too weak.

Highly subjective observation.


--
James Britt

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - The Journal By & For Rubyists
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://refreshingcities.org   - Design, technology, usability
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-23 17:36
(Received via mailing list)
James H. wrote:
> But more importantly, *should* Ruby be a first language taught,
>  period? I tend to think no.

That's precisely the point where we disagree. :-)

> C allows you to have a base understanding of all the technical aspects
> of programming, like memory management, procedural thought, and the
> basics of writing methods.

It won't teach you anything about methods because there are none in C.
:-)

>  These are generally good skills to have,
> and you'll find that you use them everywhere.  C is a lot like latin,
> insofar that it's not changing much, and is used to communicate ideas.

I use UML to communicate ideas - or Ruby - but certainly not C.  I don't
think it's suited for this at all.  There's too much overhead.

> I also think it's a little more "native" to initial human
> understanding about programming.  People tend to think of it as a
> linear, or semi-cyclical set of instructions.  In that regard, I
> think C is a good way to enter the scene.

Even if you want to start with a strictly procedural language I'd
strongly
favour Pascal over C exactly because those detailed technical aspects
are
*not* present there.  Getting memory allocation and pointer handling
right
is difficult for a novice and prevents early successes.  IMHO it's far
more important to grasp abstract concepts that are common to many
programming languages (like abstraction, modularization, data
structures)
than to know how to not shoot yourself in the foot when doing *ptr++.

> The thought process overhead in object oriented programming is quite
> extensive.  It takes a long time to really get in the mode.  If you
> learn somethings about C, and get a basic grasp before moving on to
> Ruby, you'll understand and have a better appreciation for some of the
> "magic" going on behind the scenes, as well as opening other avenues
> for your programming career.  Doubly, it takes a long time to learn
> how to think in objects -- something I admit, myself, to just be
> getting the hang of.  When you start reading about design patterns,
> you realize the complexity, and beauty that OOP allows you.

Although I agree with your last paragraph (that OO is more difficult to
grasp than the procedural paradigma) I strongly disagree with what you
state in the first paragraph.  If you like to, you can use Ruby
procedurally most of the time.

Kind regards

    robert
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-02-23 17:48
(Received via mailing list)
On Feb 23, 2006, at 10:13 AM, James H. wrote:

> But more importantly, *should* Ruby be a first language taught,
> period?
>  I tend to think no.

I see this comment a lot and it bugs me, so I'm going to take it out
on you.  ;)  (I'm kidding there, really.)

I think it's important to remember that there are many different
levels of programmer.  Some programmers work on operating systems,
bank ATM software, or missile guidance code for a living and we sure
hope they have all the knowledge they can get.  That's *not* all of
us though!

Many people are coming to Ruby right now through exposure to Rails
for web programming projects.  Do they need to know how absolutely
everything works under the hood?  Well, it probably depends on the
project, but honestly I don't think being able to roll their own
binary search off the top of their head is too useful to them.

I work daily with a guy who probably has less language experience
then me, but he sure knows which JavaScript library will help us get
this week's work done in one day.  (He showed me lightbox this
week.)  His gift may just be that he follows different news sources
than me, meaning that it isn't programming knowledge at all.  His is
just a different kind of knowledge, but still very useful to both of us.

As another example, my wife works for a food company.  She's always
messing with some data it Excel or Access.  One day, I was watching
over her shoulder when she was doing some horribly repetitive changes
to a document.

Soon after that I taught her enough Perl to roll a Unix filter style
input loop, very basic array and hash usage, and a small subset of
regular expression.  You learn much more from the first three
chapters of Programming Perl, I assure you.  (She has everything I
taught her on a couple of cheat sheets.)

I would not call my wife a programmer and she knows literally nothing
about C, but she does program, and I'm confident that I more than
doubled her productivity for tasks she is often faced with.  There's
nothing wrong with someone getting things done at her skill level.

I'm not arguing that knowing fifteen languages won't help you as a
programmer.  Obviously, experts get to be experts by soaking up all
the knowledge in their field they can get their hands on.  What I
think you are forgetting is that we are not all experts.  Some of us
aren't even trying to be, and that's okay too.

James Edward Gray II
90ebe8da17aabd36cc30d9f96a530e6f?d=identicon&s=25 James H. (Guest)
on 2006-02-23 17:54
(Received via mailing list)
> > C allows you to have a base understanding of all the technical aspects
> > of programming, like memory management, procedural thought, and the
> > basics of writing methods.
>
> It won't teach you anything about methods because there are none in C. :-)

Ah, yes.  I have a bad habit of using procedure and method
interchangably =/

Interesting point about Pascal though, and when I read your words I
find myself nodding my head in agreement that it is definitely more
important to understand the concepts found amongst the majority of
programming languages than the specifics of one (e.g. pointers -- one
of the great evils of C).

Okay, how about this: "If you decide to use Ruby as a first language,
it would be wise to learn C later down the road given it's widespread
usage".  Does that make more sense?

James
280b41a88665fd8c699e83a9a25ef949?d=identicon&s=25 Stephen Waits (Guest)
on 2006-02-23 18:27
(Received via mailing list)
On Feb 23, 2006, at 8:33 AM, Robert Klemme wrote:

> Even if you want to start with a strictly procedural language I'd
> strongly
> favour Pascal over C exactly because those detailed technical
> aspects are
> *not* present there.

Object and Turbo Pascal took the language nicely into the realm of
OO.  It's still a great way to learn how to program - and even after
all of these years, I still can't understand why nearly all major
Universities (in the US anyway) have abandoned it completely.

--Steve
C5eecd44fa818c7985d4f31bc2c42ac9?d=identicon&s=25 Eric Jacoboni (Guest)
on 2006-02-23 18:31
(Received via mailing list)
"James H." <james.herdman@gmail.com> writes:

> it would be wise to learn C later down the road given it's widespread
> usage".  Does that make more sense?

Is the "C widespread usage" still true, by the way? I admit it is
still necessary to master C to write extension modules or low level
software, but should this application domain called "widespread" ?
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-23 18:31
(Received via mailing list)
James H. wrote:
> Interesting point about Pascal though, and when I read your words I
> find myself nodding my head in agreement that it is definitely more
> important to understand the concepts found amongst the majority of
> programming languages than the specifics of one (e.g. pointers -- one
> of the great evils of C).

:-)))

> Okay, how about this: "If you decide to use Ruby as a first language,
> it would be wise to learn C later down the road given it's widespread
> usage".  Does that make more sense?

Certainly!  C might not be for everyone but if mastered certainly helps
understanding basic issues about how programs, processors and operating
systems interact.

Kind regards

    robert
Bb6ecee0238ef2461bef3416722b35c5?d=identicon&s=25 pat eyler (Guest)
on 2006-02-23 18:37
(Received via mailing list)
On 2/23/06, woodyee <wood_yee12@hotmail.com> wrote:
> Hi! I'm interested in getting opinions on Ruby as a first language. For
> example, how it compares to python/perl/basic/etc as a first language.
> My goals are to learn the basics of a language, then delve into network
> programming,  and then learn how to interact with the operating system
> programaticallly. Will Ruby help me achieve this goal? Will Ruby enable
> me to transition to other languages (ex., C/Assembly/etc)? Thanks in
> advance!


Harvard is teaching Ruby and C in their introduction to CS, and several
other schools are starting to use Ruby.   (Take a look at
http://www.oreillynet.com/ruby/blog/2006/02/ruby_a... for
a bit more info -- including a URL)

For CS heavy programs it looks like Ruby is a good member of the
first set of languages.  For more vocational programs it might be a
good first language.  That's likely an important distinction.

From my perspective (I'm teaching my 11 yo son about programming
with Ruby), Ruby makes sense as a first language because it allows
nearly instant gratification, encourages good habits, and provides a
good bridge to other things.
90ebe8da17aabd36cc30d9f96a530e6f?d=identicon&s=25 James H. (Guest)
on 2006-02-23 18:46
(Received via mailing list)
The OS you're using is likely written in a combination of C and C++ ;)
There are tonnes of legacy systems written in C too.  You can't forget
those.
89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-02-23 19:28
(Received via mailing list)
That's such a good point.  I'm a self taught programmer and my first
language was perl.  Without anyone to point me in the right direction, I
developed some pretty bad habbits.  You can still pick up bad habbits
using ruby, but it's less likely.

charlie bowman
recentrambles.com
8b38133f90cfe26622c5ad72e1846bca?d=identicon&s=25 Glen (Guest)
on 2006-02-23 19:58
(Received via mailing list)
James H. wrote:
> Doubly, it takes a long time to learn how
> to think in objects -- something I admit, myself, to just be getting
> the hang of.

I think there are two flaws in your argument.

1) Your experience does not set the standard for everyone else.

2) I assume you started with a language similar to C (or at least
procedural), and then learned OO. Because it took you a long time to
fully grasp OO, you think it is best to start with a procedural
language. ?? Is there no possibility that it took you longer to grasp
OO *because* you started with a procedural language?

I was taught both procedural and OO in college, and did not experience
the difficulties you mention.

Alan Shalloway, one of the authors of "Design Patterns Explained"
argues that avoiding design patterns makes it harder to learn them
object-oriented design. Instead, he introduces his students to
object-oriented design *and* design patterns and has found the students
learn object-oriented design faster.

Quote from preface in book:
"The design pattern books I had been reading and the design pattern
experts I had been talking to were saying that you really needed to
have a good grounding in object-oriented design before embarking on a
study of design patterns. Nevertheless, I saw, with my own eyes,
students who learned object-oriented design concurrently with design
patterns learned object-oriented design faster than those just studying
object-oriented design. They even seemed to learn design patterns at
almost the same rate as experienced object-oriented practitioners."

If experience can be used to draw conclusions, I would trust his
experience with a larger test set over yours.
4feed660d3728526797edeb4f0467384?d=identicon&s=25 Bill Kelly (Guest)
on 2006-02-23 20:04
(Received via mailing list)
From: "Giacecco" <giacecco@gmail.com>
>
> I am certain that Ruby will grow a lot in the next years and things
> will change, but if you have to decide today, and it is for your job,
> Ruby is still too weak.

It should be noted that many people here are using ruby for our jobs.

:)

It's true Ruby isn't suited to every task, but it's working for a lot
of us.


Regards,

Bill
89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-02-23 20:11
(Received via mailing list)
If you plan on working on the web, you should definitely make sure that
ruby is in your tool belt.
9539774fe19b5268e39ee6cf3ca19b71?d=identicon&s=25 Jules Jacobs (Guest)
on 2006-02-23 20:11
(Received via mailing list)
So it all depends on what you want. Do you want to have knowledge of
processors and memory management by learning C? Or do you want to skip
these low level issues and be able to write practical programs from the
word go?

If you want to be a computer scientist, learn C, plus Smalltalk, Lisp,
Io, etc. If you want to learn to program to code programs, go for Ruby
or Smalltalk.

Ruby - More like other programming languages. Easier to learn if you are
a programmer. Good choice if you want to create webapplications because
of Rails.

Smalltalk - Probably easier to learn for a non-programmer. Good choice
if you want to create webapplication because of Seaside.
C5eecd44fa818c7985d4f31bc2c42ac9?d=identicon&s=25 Eric Jacoboni (Guest)
on 2006-02-23 20:20
(Received via mailing list)
"James H." <james.herdman@gmail.com> writes:

> The OS you're using is likely written in a combination of C and C++ ;)
> There are tonnes of legacy systems written in C too.  You can't forget
> those.

Yes, but you haven't understood my previous post. I've not said that C
isn't necessary. I've only pointed the fact that "widespread use" is
/today/ perhaps a little excessive. I don't think writing a OS or a
low-level driver is, /today/ a widespread programming job.
D63c268960051bc17a310aa29fffd979?d=identicon&s=25 Dave Cantrell (Guest)
on 2006-02-24 05:32
(Received via mailing list)
James Edward Gray II wrote:
> I think it's important to remember that there are many different levels
> of programmer.  Some programmers work on operating systems, bank ATM
> software, or missile guidance code for a living and we sure hope they
> have all the knowledge they can get.

Okay, now I have to pull this one out. See if listening to this one
makes your head explode. :)

http://www.aoe.vt.edu/~cdhall/Space/AFGUID.wav

Yes, my head exploded the first time I heard it. But if you listen to it
vewwy vewwy cawefuwwy it makes sense.

In a sick, sick sort of way. :)

-dave
90ebe8da17aabd36cc30d9f96a530e6f?d=identicon&s=25 James Herdman (Guest)
on 2006-02-24 06:54
(Received via mailing list)
On 2006-02-23 13:55:44 -0500, "Glen" <glen_ap@yahoo.com> said:

> James H. wrote:
>> Doubly, it takes a long time to learn how
>> to think in objects -- something I admit, myself, to just be getting
>> the hang of.
>
> I think there are two flaws in your argument.
>
> 1) Your experience does not set the standard for everyone else.

Of course =)

> 2) I assume you started with a language similar to C (or at least
> procedural), and then learned OO. Because it took you a long time to
> fully grasp OO, you think it is best to start with a procedural
> language. ?? Is there no possibility that it took you longer to grasp
> OO *because* you started with a procedural language?

There's quite a bit of merit to what you said, and it's quite possible.
And...

> Alan Shalloway, one of the authors of "Design Patterns Explained"
> argues that avoiding design patterns makes it harder to learn them
> object-oriented design. Instead, he introduces his students to
> object-oriented design *and* design patterns and has found the students
> learn object-oriented design faster.

As suggested by this statement, I *did* find OO easier to grasp and
understand once I started learning design patterns.  I suppose I worry
that if someone isn't taught OO well that they're just going to end up
like me and program some sort of pseudo-OO crap and just end up
enforcing bad habits.

You're right, his experience is much more extensive than mine and I'd
trust it more.  Just sharing my $0.02 though =)

Kindly,

James
70c8da82d09d3866222976ab8978133c?d=identicon&s=25 Daniel Nugent (Guest)
on 2006-02-24 09:01
(Received via mailing list)
I think they should teach kids Lisp/Scheme, C, the Lambda Calculus,
and computer organization at the exact same time.

Then they'll grasp the differences between the theoretical computer
science, practical computer engineering, and the balance between the
two faced when programming.

A second course would then use Ruby or Smalltalk along with design
patterns as an introduction to Object Oriented programming/design and
being able to communicate about programs (that is, talk to other human
beings).

Then, I dunno, teach them declarational programming using SQL and
Prolog, explaining the relational theory and logic programming.

The ones that come out of it alive will be Masters of the Universe.
8b38133f90cfe26622c5ad72e1846bca?d=identicon&s=25 Glen (Guest)
on 2006-02-24 09:43
(Received via mailing list)
> I *did* find OO easier to grasp and understand once
> I started learning design patterns.

Sorry, I did not notice that in your first post.

> I suppose I worry that if someone isn't taught OO well
> that they're just going to end up like me and program
> some sort of pseudo-OO crap and just end up enforcing
> bad habits.

I agree with you on this. In fact, my worry goes further. I
worry about college grads only learning the technical aspects
to programming and not learning to solve problems. This is by
far one of the largest problem I have encountered with peers.
Other problems being, an unwillingness to learn. But that is
another soapbox. ;-)

> You're right, his experience is much more extensive than
> mine and I'd trust it more. Just sharing my $0.02 though =)

Oops. I didn't mean to come across as rude. Your experience is
certainly valuable. And when combined with Alan Shalloway's
experiences I think we can agree that it takes a good teacher
and that we might need to rethink how we teach programming.
B464ff27d7d3b0750a7bfe2717c49d2d?d=identicon&s=25 Chris Pine (Guest)
on 2006-02-24 10:17
(Received via mailing list)
On 2/24/06, Daniel Nugent <nugend@gmail.com> wrote:
> I think they should teach kids Lisp/Scheme, C, the Lambda Calculus,
> and computer organization at the exact same time.

"They"??  Have *you* ever tried to teach kids programming?

I humbly suggest starting with Ruby.


> The ones that come out of it alive will be Masters of the Universe.

The ones that come out of it alive would have been Masters of the
Universe, anyway.

:)

Chris
70c8da82d09d3866222976ab8978133c?d=identicon&s=25 Daniel Nugent (Guest)
on 2006-02-24 10:47
(Received via mailing list)
I agree, I was just being flippant (mostly).

I do sort of wish that when I was just starting someone had told me
straight up the sort of things I mentioned right there.  Understanding
the differences between functional, procedural, declarational, and
object oriented programming models has been haphazzard(at best) in my
education.

I just think that it's possible to really get at the core of what
"Computer Science" really is without arduously teasing the nuances of
it out over the course of years.

Heck, what do I know.  Maybe we should just have kids read all the
back archives of Lambda the Ultimate :D
B464ff27d7d3b0750a7bfe2717c49d2d?d=identicon&s=25 Chris Pine (Guest)
on 2006-02-24 12:48
(Received via mailing list)
On 2/24/06, Daniel Nugent <nugend@gmail.com> wrote:
> I just think that it's possible to really get at the core of what
> "Computer Science" really is without arduously teasing the nuances of
> it out over the course of years.

Hmm... iteresting.  (I was just talking about teaching kids to
program, not getting at the core of what CS really is.)

Perhaps the analogy to draw upon would me that programming (as I meant
it:  getting the computer to do things for you) is like arithmetic and
maybe simple algebra:  it's how you get things done, and if you don't
have a good handle on these basics, it will be hard to move beyond it.

In this analogy, I guess that makes CS kind of like Math:  deep,
subtle, hard to get at the core of it.

But (sticking with the math side of the analogy, since that's where my
education is), I think it would be a mistake to begin by teaching
people the field axioms (that is, expecting them to use them in proofs
and such), or arithmetic base n (for n other than 10), or about
groups.  In some sense, these are more general or fundamental or
simple... but they're not, not really.  :)

Without a background of the basics, it's hard to understand the
*significance* of more general or fundamental or simple solutions.  If
I don't know how to concatenate strings or show those strings on the
screen, what do I care if this way is the procedural way to do it, and
that way is the object-oriented way to do it?

So many things are common to (nearly) all languages.  Variables.
Functions/methods/procedures.  Using numbers to do things other than
solving math problems.  These are so basic that we don't even think
about them anymore, but they are *not obvious* to new programmers.

So, getting back to the original question:  Is Ruby a good language
for getting a handle on those basics of programming?

Absolutely.  (And *much* better than C for this.)

After Ruby, C is a reasonable choice as a next langauge.  As is Lisp.
(Depends on where you want to go with your programming.)  But it sure
is nice that you can stick with Ruby for most tasks.

(As an aside, I'm always skeptical of people who say you should learn
language X first, when that's not the language they prefer to use
themselves.  Usually, they have over-thought the problem.)

Chris
3a0d61d465c296f7f291b5bd09c90a4a?d=identicon&s=25 tony summerfelt (Guest)
on 2006-02-24 14:30
(Received via mailing list)
On Thu, 23 Feb 2006 23:18:33 +0900, you wrote:

>Ruby vs. Perl: much cleaner syntax and less typing.

ruby has the cleaner syntax, but i don't think it has less typing you
mean at the keyboard :)

i find the typing to be about even.

>Ruby vs. Basic: although there might be Basic dialects around that have
>evolved from the ridiculous line number + GOTO I'd rather not consider it.

somewhere around '87 they had fully evolved to the point of no line
numbers or gotos.  something like libertybasic is great for
beginners... although it' s not object oriented.

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org
3a0d61d465c296f7f291b5bd09c90a4a?d=identicon&s=25 tony summerfelt (Guest)
on 2006-02-24 14:36
(Received via mailing list)
On Fri, 24 Feb 2006 00:28:32 +0900, you wrote:


>Yes, but this thread is about "first language".  I don't know how Perl's
>OO has changed since Perl 5 but then it was horrible.

it still feels "tacked on". i think python's does also...

[incr tcl] has oo similar to C, but i'm not sure i'd recommend that as
a first language...

lua is great as a first language. oo, very clean syntax, cross
platform and small.

it also makes a great embedded language.

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org
7cec1794eee99e802da0608849cd551d?d=identicon&s=25 Rob (Guest)
on 2006-02-24 14:56
woodyee wrote:
> Hi! I'm interested in getting opinions on Ruby as a first language. For
> example, how it compares to python/perl/basic/etc as a first language.
> My goals are to learn the basics of a language, then delve into network
> programming,  and then learn how to interact with the operating system
> programaticallly. Will Ruby help me achieve this goal? Will Ruby enable
> me to transition to other languages (ex., C/Assembly/etc)? Thanks in
> advance!
>
> WY

Personally, I think it is a horrible first language.  Let me preface
this by saying I'm a hardware guy that uses programming as needed, so
I'm not a *real* programmer.

Here is the problem.  With C or even C++ I can learn a few basic
conditional statements, variable declarations, etc. and I can write just
about any program.  Sure, it will be long and inefficient, but at least
I can write it without knowing any more about the language.  In Ruby,
you can't do that.  The key to learning Ruby is learning the numerous
methods that come with each class.

When I first started playing with Ruby, I thought I would do a typical
programming exercise and write several sort functions in Ruby (bubble,
selection, quicksort, etc.).  I couldn't figure out how to do it because
all I needed was Array.sort!  It is tough to find documentation on
things like for loops in Ruby, and blocks can be confusing.

I think Ruby is best for people that already have some programming
experience.
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-02-24 15:15
(Received via mailing list)
On Feb 24, 2006, at 7:56 AM, Rob wrote:

> Here is the problem.  With C or even C++ I can learn a few basic
> conditional statements, variable declarations, etc. and I can write
> just
> about any program.  Sure, it will be long and inefficient, but at
> least
> I can write it without knowing any more about the language.  In Ruby,
> you can't do that.  The key to learning Ruby is learning the numerous
> methods that come with each class.

I'm not seeing that.  Ruby supports pretty much the same constructs
and even index access to Arrays.  Iterators are a lot sexier, but if
you want to walk everything by index knock yourself out.  If you
don't know the helper methods, you can always roll your own code.

That doesn't make sense to me.

James Edward Gray II
7cec1794eee99e802da0608849cd551d?d=identicon&s=25 Rob (Guest)
on 2006-02-24 15:41
James Gray wrote:
> On Feb 24, 2006, at 7:56 AM, Rob wrote:
>
>> Here is the problem.  With C or even C++ I can learn a few basic
>> conditional statements, variable declarations, etc. and I can write
>> just
>> about any program.  Sure, it will be long and inefficient, but at
>> least
>> I can write it without knowing any more about the language.  In Ruby,
>> you can't do that.  The key to learning Ruby is learning the numerous
>> methods that come with each class.
>
> I'm not seeing that.  Ruby supports pretty much the same constructs
> and even index access to Arrays.  Iterators are a lot sexier, but if
> you want to walk everything by index knock yourself out.  If you
> don't know the helper methods, you can always roll your own code.
>
> That doesn't make sense to me.
>
> James Edward Gray II

Sure, you can do that stuff, but most of the existing documentation
focuses on the sexy aspects of Ruby.  I don't think it means much to a
novice programmer to write some ultra-powerful statement consisting of
one or two lines of code.  It's easier to follow something that is three
times as long and more verbose.

Don't get me wrong.  I love Ruby.  It's just that as a mediocre
programmer, I found it very difficult to learn because I spent too much
time looking for certain methods in the Ruby book.  Sometimes it is
easier for beginners to move forward when they don't have 10 different
options for how to do something.
7264fb16beeea92b89bb42023738259d?d=identicon&s=25 Christian Neukirchen (Guest)
on 2006-02-24 15:43
(Received via mailing list)
Dave Cantrell <ruby-talk@deadcantrant.com> writes:

> http://www.aoe.vt.edu/~cdhall/Space/AFGUID.wav

Plain lovely.
6d9bf78ca49a017e9e3e6b0357b6c59e?d=identicon&s=25 Peter Hickman (Guest)
on 2006-02-24 16:55
(Received via mailing list)
Rob wrote:
>
> I found it very difficult to learn because I spent too much
> time looking for certain methods in the Ruby book.
>

This is a big problem for a lot of programmers. We've had Visual Basic
programmers looking for the on error gosub handler because that is
all they know and have become incapable of learning anything new. I've
seen Cobol written in Perl by Cobol programmers who just couldn't learn
anything new. We've had C programmers have fits because they couldn't
use the pre / post
increment / decrement operators that they used in C and -= and += was
too hard to learn.

You get the picture. Take a deep breath and forget you ever knew C then
try again, prior expectations can be a real hindrance when learning
something new.
B464ff27d7d3b0750a7bfe2717c49d2d?d=identicon&s=25 Chris Pine (Guest)
on 2006-02-24 17:18
(Received via mailing list)
On 2/24/06, Rob <robert.c.may@gmail.com> wrote:
> Sometimes it is
> easier for beginners to move forward when they don't have 10 different
> options for how to do something.

While I disagree with most of what you have written (respectfully,
though :), I think you hit the nail on the head here.  Most of the
time when we are showing Ruby, we are showing *off* Ruby.  How can we
not!

But, for a sufficiently beginner audience, it's not the most helpful
way to go about things.  (This was one of the things I really tried to
address in my book.)

Having said that, I seriously doubt that looking up "how to
concatenate strings" in Ruby is much harder than in C, and '+' is
easier to remember than 'strcat', don't you think?  So you're less
likely to have to look it up.  And which is easier to use??  What,
exactly, does strcat return?  What if the strings overlap?  Plus, once
you use strcat, you have the potential gotcha of having changed one of
your strings.  And, of course, you have to make sure you have enough
space in your destination string... well, not in the "string", but in
the space declared...

How can you possibly think these are equally easy??  You have to know
*more* to get things done in C than in Ruby, not the other way around.

(Have you tried teaching people to program using C?  And Ruby?  If you
have, and in your experience C is not vastly more difficult for your
students, I'd love to hear about it.  :)

Chris
C942fd6cb977f0fe38cce6df92e36f7e?d=identicon&s=25 Friedrich Dominicus (Guest)
on 2006-02-24 18:00
(Received via mailing list)
"Glen" <glen_ap@yahoo.com> writes:

> procedural), and then learned OO. Because it took you a long time to
> fully grasp OO, you think it is best to start with a procedural
> language. ?? Is there no possibility that it took you longer to grasp
> OO *because* you started with a procedural language?
This is definitly a problem for "imperative" programmers. Therefor I
would tend to judge C++ quite negativly. You can write C with a C++
compiler but that does not make for "OO" Programming....

Regards
Friedrich
C942fd6cb977f0fe38cce6df92e36f7e?d=identicon&s=25 Friedrich Dominicus (Guest)
on 2006-02-24 18:00
(Received via mailing list)
"Robert Klemme" <bob.news@gmx.net> writes:

>
>
> Kind regards
>
>     robert

I don't think the vs stuff is needed. Ruby is a nice language by many
means, and the others are nice also. Of course the programmers here
have decided pro Ruby. Ruby is a good choice if you like OO, but for
that you can use Smalltalk also. Unfortunatly the Self stuff has not
get the attention it deserves, but that's things are.

If you are not used to OO, it is a task to get into it. My experiences
with OO start while learning Eiffel (now around 12 years or so ago). I
was a enthusiastic Eiffel programmer but the whole stuff around a few
actors have taken away all the fun. Now if you are a fan of static
types language which are good for building scyscrapers, you still can
go for Eiffel. But if you learn other approaches like e.g functional
programming (very much advised to learn it whther you use it or not)
you fell way to much tighthen to imperative/object-oriented stuff in
Eiffel.

An eye opener was Haskell, Ocaml, Erlang and last but not least the
Lisp family.

I like Ruby for my scripting purposes, but I write a few liners
of ugly shell code. It's nice that ruby offers quite a lot in regard
to functional programming, also the most software I've seen written in
Ruby uses the imperative / object-oriented programming style.

I found most of the code quite readable and "understandable" the
learning curve is not steep (if you know OO of course)

Regards
Friedrich
A16652fd5d83c0473bd1e39d9a2117a6?d=identicon&s=25 Dirk Meijer (Guest)
on 2006-02-24 18:46
(Received via mailing list)
2006/2/23, woodyee <wood_yee12@hotmail.com>:
>
> Hi! I'm interested in getting opinions on Ruby as a first language. For
> example, how it compares to python/perl/basic/etc as a first language.
> My goals are to learn the basics of a language, then delve into network
> programming,  and then learn how to interact with the operating system
> programaticallly. Will Ruby help me achieve this goal? Will Ruby enable
> me to transition to other languages (ex., C/Assembly/etc)? Thanks in
> advance!
>
> WY


besides Ti-BASIC (i'd say that doesn't count), Ruby is my first
language,
and i think that's just fine. I had to learn Java at school, and i'm
very
annoyed by it's inconvenience and the fact that not everything is an
object
(;-)) so i'm happy that i learned Ruby first, because i think i wouldn't
understand the OO-principle this well, if i would have learned Java
first..
but that's just my opinion/vision..
Dirk.
Be223e60c56535a0e465b84243aeb0d1?d=identicon&s=25 Timothy Goddard (Guest)
on 2006-02-25 00:13
(Received via mailing list)
My order was Quick BASIC, then C++, PHP, then Ruby. I found the
following things:

1. Don't learn any of the BASIC family. My knowledge of this was a
severe impediment to learning C++ a few years later. It teaches you
really bad habits.

2. C++ is extremely useful to know. It provides a very good launching
point for understanding OO design while at the same time providing  an
understanding of low level details of how it all works under the hood.
The easy Ruby-C(++) integration also makes this useful for speeding up
the slower parts of your Ruby code later.

3. Ruby is truly incredible in its simplicity and ease of expressing
quite complex concepts. I started using this about 3 months ago, just
before beginning my first job designing a web application. I used the
Rails platform (built on Ruby) and would choose it over PHP for web
applications any day.

After using Ruby you will feel handicapped writing in any other
language. For this reason, I would thoroughly suggest learning at least
the basics of C or C++ in parallel with Ruby. Learning two languages at
once is not nearly as daunting as it sounds as the basic concepts
translate nicely between them. After building up a basic knowledge of
each of them, you will have a nice base to launch off into the
specifics.

Please note that I am completely self taught in programming and have
never taken any formal education in any language. My experience may not
be typical.

My personal choice for application development would be Ruby, using C++
extensions for the heavy lifting. I believe it is essential to
understand both a compiled and high-level language, preferably that
integrate easily with each other, as this will let you  effectively
partition tasks based on speed requirements while retaining the clean
overall logic of the higher language. For this, I believe Ruby and
C(++) are an ideal pair.

My advice to you is to get an introductory book on C++ and a book on
Ruby (the Pragmatic Programmers' guide is excellent). As you work
through the books, try to write the equivalents of the C++ examples and
the Ruby examples in the opposite language. This will rapidly teach you
both the upsides and the downsides of each language.
D63c268960051bc17a310aa29fffd979?d=identicon&s=25 Dave Cantrell (Guest)
on 2006-02-25 06:34
(Received via mailing list)
Rob wrote:
> Don't get me wrong.  I love Ruby.  It's just that as a mediocre
> programmer, I found it very difficult to learn because I spent too much
> time looking for certain methods in the Ruby book.  Sometimes it is
> easier for beginners to move forward when they don't have 10 different
> options for how to do something.

Perfectly said.

Wittgenstein's Ladder.  http://c2.com/cgi/wiki?WittgensteinsLadder

Training wheels, training wheels, training wheels.

Everybody needs 'em when starting out in a new area. I need 'em. Big
time. Especially as I start watching the SiCP LISP videos. And I have
some past experience hacking around with Python. Though with my
background it looked more like object-oriented VBScript.

God help me.

Just my $.02.

-dave
Bf6862e2a409078e13a3979c00bba1d6?d=identicon&s=25 Gregory Seidman (Guest)
on 2006-02-25 17:59
(Received via mailing list)
On Sat, Feb 25, 2006 at 08:13:34AM +0900, Timothy Goddard wrote:
} My order was Quick BASIC, then C++, PHP, then Ruby. I found the
} following things:
}
} 1. Don't learn any of the BASIC family. My knowledge of this was a
} severe impediment to learning C++ a few years later. It teaches you
} really bad habits.

I mostly agree with this, but I will both expand and contract that
category. Most forms of Basic are, indeed, impediments to learning to
program well. This specifically includes all Visual Basic forms through
VB6
and VBScript. It does not, however, include VB.NET. VB.NET is pretty
much a
dialect of C#, rather than the horror that is VB6. I include Perl in
this
category, however. I will name this category "Languages that play fast
and
loose with syntax, types, and APIs without any coherent underlying
sense."
It is because of this lack of basis that it impedes learning other
languages.

I learned AppleSoft BASIC as my first language. Thankfully, I bridged
the
gap between this category of bad languages with Logo, Pascal, many
years,
and puberty. I consider Logo an excellent first language, and not just
for
moving the turtle around to make pretty pictures.

} 2. C++ is extremely useful to know. It provides a very good launching
} point for understanding OO design while at the same time providing  an
} understanding of low level details of how it all works under the hood.
} The easy Ruby-C(++) integration also makes this useful for speeding up
} the slower parts of your Ruby code later.

C should be learned before C++. Everything useful and powerful about C++
(other than employability) is brought into sharp relief by contrasting
it
with C. I don't think it is a good language for learning OOP, however.
C++
is slightly better at providing OO features than straight C (yes, I'm
serious), but its real power lies in its libraries and its facilities
for
generic programming (i.e. templates).

} 3. Ruby is truly incredible in its simplicity and ease of expressing
} quite complex concepts. I started using this about 3 months ago, just
} before beginning my first job designing a web application. I used the
} Rails platform (built on Ruby) and would choose it over PHP for web
} applications any day.

Ruby is great. Rah rah rah. I mean, it's true, but you aren't going to
get
much dissent about it on this list.

} After using Ruby you will feel handicapped writing in any other
} language. For this reason, I would thoroughly suggest learning at
least
} the basics of C or C++ in parallel with Ruby. Learning two languages
at
} once is not nearly as daunting as it sounds as the basic concepts
} translate nicely between them. After building up a basic knowledge of
} each of them, you will have a nice base to launch off into the
} specifics.

I've said it before and I'll say it again. Learning your first language
is
*hard* because you are also learning concepts of programming. Learning
your
second language is somewhat difficult because you will spend most of
your
time thinking in your first language and trying to translate that to the
second, and often getting hung up on syntax. Learning your second
paradigm
is *hard* because you must make your brain think in a way that it hasn't
before. Learning your third, fourth, or fifth languages is a bit of a
challenge. Learning your tenth language is a weekend of geekiness.
Learning
your twentieth language is a day of playing around.

I think the ideal progression of learning languages would be:

1) Logo as a preteen, or AWK and/or Bourne shell scripting at any age
2) C (second procedural language)
3) Ruby, Python, Java, or C# (first OOP language)
4) C++ (kitchen sink language)
5) Scheme, Haskell, or ML (not OCAML) (first functional language)
6) SQL (first declarative language)
7,8,9) Whichever of Ruby, Python, Java, and C# has been missed
previously
10+) Anything at all

} Please note that I am completely self taught in programming and have
} never taken any formal education in any language. My experience may
not
} be typical.

I learned BASIC, Logo, and Pascal on my own. I took a high school CS
course
which used Pascal, so what I learned was good programming. I learned C,
C++, Bourne shell scripting, and AWK before entering college.

In college, as part of a CS major, I learned (in no particular order)
Lisp,
ML, SQL, Java, make (fantastic declarative language, BTW), and
lexx/yacc.
Outside of coursework, I also learned JavaScript, a bit of AppleScript,
VRML (both 1.0 and 2.0, but 2.0 was sort of a dataflow language), and
just
enough Perl to modify other people's scripts while hating it.

In grad school I taught C++, both as a TA for the software engineering
class and in a week-long minicourse; this meant that I had to learn it
deeply, and I learned to appreciate its subtlety, power, and specific
safety nets. (I could go into the relative advantages and disadvantages
of
C++ for pages. I will spare you all.)

} My personal choice for application development would be Ruby, using
C++
} extensions for the heavy lifting. I believe it is essential to
} understand both a compiled and high-level language, preferably that
} integrate easily with each other, as this will let you  effectively
} partition tasks based on speed requirements while retaining the clean
} overall logic of the higher language. For this, I believe Ruby and
} C(++) are an ideal pair.

The right tool for the right job. Ruby is nearly the same size and shape
tool as Perl and Python. It is good for many of the same things. In
addition, Rails makes Ruby ideal for standalone, database-backed web
apps.
For a GUI app, however, I would choose C++ and Qt/KDE or C#. For a major
enterprise app (e.g. the mission-critical, proprietary, special-purpose,
in-house application with which a company performs its work, such as the
retirement management software I am working on now for an actuarial
firm) I
would choose C#. For a numerically intensive application, particularly
one
that is paralellizable, I would use C. For simple scripts I continue to
use
Bourne shell and/or AWK.

The really valuable thing about knowing lots of languages is that you
can
think flexibly and work efficiently. Granted, I haven't found a use for
a
functional language for ages, but I've certainly use functional idioms
that
would not have occurred to me if I hadn't learned a couple of functional
languages. My dayjob involves programming VB.NET, but you better believe
I
use a variety of other languages (particularly SQL, AWK, and Bourne
shell
scripting) to aid me in my work. Furthermore, I take great joy in
playing
with Ruby (and Rails in particular) and JavaScript on the side.

} My advice to you is to get an introductory book on C++ and a book on
} Ruby (the Pragmatic Programmers' guide is excellent). As you work
} through the books, try to write the equivalents of the C++ examples
and
} the Ruby examples in the opposite language. This will rapidly teach
you
} both the upsides and the downsides of each language.

Gah! I could not disagree more. Learning more than one language at a
time
is a recipe for confusion. My advice is to choose a simple toy task that
you will attempt to implement in each language you learn. For many years
I
used an abacus (which I implemented in Java 1.0, Java 1.1, VRML 1.0 w/
CGI,
VRML 2.0, C++, and JavaScript/DHTML). For BASIC, Pascal, and C I used a
simple bubblesort. For Ruby (and Rails) I used a Firefox "live bookmark"
generator <http://www.anthropohedron.net/bookmarkfeeds/>.

Start with shell scripting and awk. There are excellent books on it out
there, the technology isn't changing, and you can keep pretty much the
entire language in your head. Failing that, there are good man pages. If
you are on Windows, get Cygwin. If you want to jump straight into Ruby
from
there, well, that's almost as good as the progression of languages I
listed
above.

For someone who is starting out with no programming experience, I
consider
Why's Poignant Guide to be the best introductory Ruby text out there.
Yes,
really. It introduces concepts gently and humorously.

--Greg
B464ff27d7d3b0750a7bfe2717c49d2d?d=identicon&s=25 Chris Pine (Guest)
on 2006-02-25 21:22
(Received via mailing list)
On 2/25/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:
> 1) Logo as a preteen, or AWK and/or Bourne shell scripting at any age
> 2) C (second procedural language)
> 3) Ruby, Python, Java, or C# (first OOP language)

No way.  :)  Ruby before C, any day.  It's really not an issue of
"procedural is easier than OOP".  You can do procedural Ruby, and it's
so so so so so much easier.  The aspiring programmer will be able to
do so much more after their first half-hour lesson.  This is
motivating.  A motivated student learns faster, retains more (longer),
and most importantly, is less likely to quit!  (You wouldn't believe
how often I hear people saying, "I've tried to learn to program over
and over again, but never got into it... until Ruby!")


> For someone who is starting out with no programming experience, I consider
> Why's Poignant Guide to be the best introductory Ruby text out there. Yes,
> really. It introduces concepts gently and humorously.

GIANT HONKING DISCLAIMER:

I have written a tutorial, and recently a book, lovingly and
painstakingly built over the last three years, aimed at teaching
programming, using Ruby, to non-programmers.  So I'm totally,
hopelessly biased here...

And I'd also like to say that I *absolutely love* the Poignant Guide
and, as a programmer, I'd much rather read it than my own writings.
Chunky!  Bacon!  (Seriously.  Chunky bacon.)  How can one *not* fall
in love with Why instantly?  I have personally had an asthma attack
from laughing too hard reading his sidebar dissing asthmatics.  His
insight and sensitivity were... (must not say breath-taking....
resist...) um... good.

I totally and sincerely believe that the world is a better, brighter,
more love-filled place now that the Poignant Guide is in it.  I do.

However, having said that, I *really* don't think that the Poignant
Guide is the way for a non-programmer to learn programming.  Do you
personally know of any non-programmers learning to program from
reading it?

I mean, I feel bad saying that... dude, I love it, too!  But, for all
it is, I just don't honestly believe that it meets the
non-programmer's needs.

But as I mentioned, I'm so hopelessly and completely biased... you
should probably take everything I say with 200 parts salt, 1 part
Chris.

:)

Chris
622fa8560c82dfaa59c91ec75efb0c19?d=identicon&s=25 Alex Combas (Guest)
on 2006-02-26 00:46
(Received via mailing list)
On 2/25/06, Chris Pine <chris@pine.fm> wrote:
> I have written a tutorial, and recently a book, lovingly and
> painstakingly built over the last three years, aimed at teaching
> programming, using Ruby, to non-programmers.  So I'm totally,
> hopelessly biased here...
>
Chris, I really enjoyed your book. The exercises are well thought out
and practical.
The lessons build knowledge in a logical manner. When you are finished
the
book you feel "learned", I've been subconsciously buying tween blazers
ever since.

I am a big, really big big... not even in a strictly volume sense, I'm
talking mass...
ridiculously humongous fan of the Poignant Guide.

However I found the actual lesson material was not always as thorough
as I would like, and there are no exercises. I don't think I will ever
forget the forklift, or the caterpillar but _why's book is not really
for a new programmer, unless they
are really strange/wonderful/interesting/open minded type people or
unless
they have just finished reading your book ;)

I think normal[1] folk will probably find _why's guide too distracting.

I think the books add to each other. _why's guide is very entertaining
and fun. Your
guide is very practical. Both guides will teach you a lot and we as a
community are far richer for having both to read.

Thanks Chris, and thanks _why.

[1]People who know how to send email and download music, but not much
else.
571b69519dc3cb4a78aa80f4e645349f?d=identicon&s=25 Aaron Kulbe (Guest)
on 2006-02-26 04:57
(Received via mailing list)
On 2/25/06, Alex Combas <alex.combas@gmail.com> wrote:
> ever since.
Chris, I am presently enjoying your book.

> I am a big, really big big... not even in a strictly volume sense, I'm
> talking mass...
> ridiculously humongous fan of the Poignant Guide.

me too!

> However I found the actual lesson material was not always as thorough
> as I would like, and there are no exercises. I don't think I will ever
> forget the forklift, or the caterpillar but _why's book is not really
> for a new programmer, unless they
> are really strange/wonderful/interesting/open minded type people or unless
> they have just finished reading your book ;)
>
> I think normal[1] folk will probably find _why's guide too distracting.
>

This depends.  I have them both.  I printed out Why's guide, and I
also purchased both the PDF and dead tree copy of Chris Pine's Learn
to Program book.

As I've said publicly in other places... Why was one of two things
when he write the Poignant Guide.... he was either 1. VERY stoned.  or
  2. VERY much a genius.

Let me qualify.  Chris wrote a VERY good book with excellent examples.
 Why uses crazy techniques and you think the guy is all over the map.

This will sound painfully obvious... but if it were, schools would be
MUCH different than they are today.

People do NOT learn the same.  Let me say that again... people do NOT
learn the same.  One person may learn the most from the traditional
'teacher talk - student listen' model.  That is what the VAST majority
of our schools still believe and practice to this day.

There was a man named Howard Gardner [2] that came up with the theory
of multiple intelligences.  In a nutshell, many different methods of
learning... and if you're trying to teach someone a subject in a
manner that doesn't match what their learning style is, you're missing
the mark!!!

This is where I think Why has it right on, and where I think Chris
might benefit in doing a little research and seeing if he wants to
implement some of these things in his next book.

A present day example would be the Head First series that O'Reilly &
Associates is doing.


> I think the books add to each other. _why's guide is very entertaining
> and fun. Your
> guide is very practical. Both guides will teach you a lot and we as a
> community are far richer for having both to read.

AMEN!

>
> Thanks Chris, and thanks _why.
>
> [1]People who know how to send email and download music, but not much else.
>
> --
> Alex Combas
> http://noodlejunkie.blogspot.com
>

[2]  http://rubyurl.com/g2V
3f865be519a5c5149b16fee62fb41854?d=identicon&s=25 Chris (Guest)
on 2006-02-26 05:15
Dave Cantrell wrote:

> Okay, now I have to pull this one out. See if listening to this one
> makes your head explode. :)
>
> http://www.aoe.vt.edu/~cdhall/Space/AFGUID.wav

I apologize for noise but I have to say thanks for that link.  My
girlfiend ask me what goes on in my brain while I am reading/writing
code - I played that for her and I am positive she will not try to learn
how to code.  Another soul saved...
560c83ff6b6600e39315a1cf75b7c229?d=identicon&s=25 Tom Copeland (Guest)
on 2006-03-03 04:25
(Received via mailing list)
On Fri, 2006-02-24 at 01:27 +0900, James Britt wrote:
> If you are looking first to get insight into programming, go  learn
> Lisp, or enough Lisp to find your way around.
>
> There are free videos online by Hal Abelson and Gerald Jay Sussman of
> their book, Structure and Interpretation of Computer Programs
>
> http://swiss.csail.mit.edu/classes/6.001/abelson-s...
>
> The book is available online for free as well.

And if you want to convert those videos to sound files to listen to
during your commute, here's how:

http://tomcopeland.blogs.com/juniordeveloper/2006/...

I'm on lecture 8 at the moment... good stuff!

Yours,

Tom
This topic is locked and can not be replied to.