Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Printing why's (poignant) guide to ruby

Reply
Thread Tools

Printing why's (poignant) guide to ruby

 
 
Richard Dale
Guest
Posts: n/a
 
      02-13-2005
Alexander Kellett wrote:

> i'm really puzzled by this.
> why python? or even worse. vb??!!

Why do you think they are easier to learn than ruby? I'd just like to try
teaching non-programmers programming and find out what it is they don't
know. Or if they don't know much can they get started and learn
incremently?

From Alan Kay's recent interview:

http://acmqueue.org/modules.php?name...owpage&pid=273

"Basically what happened is this vehicle became more and more a programmer’s
vehicle and less and less a children’s vehicle—the version that got put
out, Smalltalk ’80, I don’t think it was ever programmed by a child. I
don’t think it could have been programmed by a child because it had lost
some of its amenities, even as it gained pragmatic power."

I don't think Why's is the first in the line of 'cartoon computer science
books'. I have 'Think about [TLC] Logo - A Graphic Look at Computing with
Ideas' by John R. Allen, Ruth E. Davis and John F. Johnson. It has great
cartoons, and is written by serious people (I believe why is very serious
too - that's why he's so funny).

People don't seem to want teach computer programming to children anymore (or
45 year old beginners)..

-- Richard
 
Reply With Quote
 
 
 
 
Anders Engström
Guest
Posts: n/a
 
      02-14-2005
On Mon, Feb 14, 2005 at 08:19:57AM +0900, William James wrote:
>
> Michael Walter wrote:
> > The Ruby user would think "Who puts?"
> >
> > Michael
> >
> > Anders Engström <> wrote:
> > > Ruby:
> > >
> > > (hello.rb)
> > > puts "Hello World"

>
> "Hello, world!".display
>


Ok, that's probably more intuitive But not if you want to achieve the
same effect as 'puts'. Then you'd have to change it to:

"Hello World!\n".display

That '\n' is pretty confusing for a newbie.

//Anders

--
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Anders Engström
http://www.gnejs.net PGP-Key: ED010E7F
[Your mind is like an umbrella. It doesn't work unless you open it.]




 
Reply With Quote
 
 
 
 
Alexander Kellett
Guest
Posts: n/a
 
      02-14-2005
On Feb 14, 2005, at 12:19 AM, Navindra Umanee wrote:
> Alexander Kellett <ruby-> wrote:
>> i'm really puzzled by this.
>> why python? or even worse. vb??!!

>
> How is a total beginner going to learn Ruby? By reading Pickaxe? I'm
> not talking about a CS student here. My dad lives half-way around the
> world from me.


google is your friend

http://www.google.nl/search?
hl=en&lr=&q=learning+to+program+ruby&btnG=Search

Alex



 
Reply With Quote
 
Caio Tiago Oliveira
Guest
Posts: n/a
 
      02-14-2005
Navindra Umanee, 13/2/2005 20:19:
> Alexander Kellett <ruby-> wrote:
>> i'm really puzzled by this.
>> why python? or even worse. vb??!!

>
> How is a total beginner going to learn Ruby? By reading Pickaxe? I'm
> not talking about a CS student here. My dad lives half-way around the
> world from me.
>
> Besides, Python is a more restricted and syntactically uniform
> language. Ruby is more flexible and expressive, but IMHO to really
> understand the code you have to know more CS concepts and have a
> deeper understanding of the syntax than some people like to admit.
>
> Even though in Ruby you can abuse the syntax or treat it glibly --
> which makes it look like a nice thing for experienced programmers -- I
> think it is better to understand what you are doing first. Python
> forces you to understand these issues.
>
> I prefer Ruby but I think Python will be easier for a beginner to
> grasp at the beginning, and it has less hurdles as well
> documentation/book-wise -- I even saw one of the beginner books
> describe how to implement a neat graphical game in a few steps.
>
> And yeah, VB has wizards and stuff on top of plenty of documentation.
> Like I said, quicker gratification can be a good thing. Someone used
> to fancy windows and GUI stuff probably isn't going to be happy stuck
> at the command-line level. Joao makes a good point, of course.




Someone posted this code here:
def fib:
a, b = 1, 1
while true:
yield a
a, b = b, a+b

It fails. Ask why! Because are missing '()' after 'fib'.
Ruby is more prolixe. It's bad to refactoring tools, but is easier for
the ones who can't remember the names of everything.
Isn't a good thing you got errors because is missing a space, or because
you couldn't choose a number so great
(try
j = 0
for i in range(1000000000):
j = j + 1

).



 
Reply With Quote
 
Caio Tiago Oliveira
Guest
Posts: n/a
 
      02-14-2005
Anders Engström, 13/2/2005 21:03:
> On Mon, Feb 14, 2005 at 08:19:57AM +0900, William James wrote:
>>
>> Michael Walter wrote:
>> > The Ruby user would think "Who puts?"
>> >
>> > Michael
>> >
>> > Anders Engström <> wrote:
>> > > Ruby:
>> > >
>> > > (hello.rb)
>> > > puts "Hello World"

>>
>> "Hello, world!".display
>>

>
> Ok, that's probably more intuitive But not if you want to achieve the
> same effect as 'puts'. Then you'd have to change it to:
>
> "Hello World!\n".display
>
> That '\n' is pretty confusing for a newbie.


"Hello world!
I'm here.
".display


Without "\n"!



 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      02-14-2005
Anders Engström wrote:
>
>
> That '\n' is pretty confusing for a newbie.


How do you know that?

I'd be interested in any good sources that detail the sort of things
different types of newbies find troublesome or confusing.

Offhand, I don't quite see that "\n" would be such a problem given a
reasonably succinct explanation. My own experience with teaching
programming newbies suggests that most of them are comfortable with
fairly straight-forward edicts (e.g., "That's just how you tell the
computer to start writing to a new line").

It's the more abstract stuff (e.g., blocks, high-order functions, even
the notion of a variable) that spooks them.

James


 
Reply With Quote
 
William James
Guest
Posts: n/a
 
      02-14-2005
Caio Tiago Oliveira wrote:
> Anders Engström, 13/2/2005 21:03:
> > Ok, that's probably more intuitive But not if you want to

achieve the
> > same effect as 'puts'. Then you'd have to change it to:
> >
> > "Hello World!\n".display
> >
> > That '\n' is pretty confusing for a newbie.

>
> "Hello world!
> I'm here.
> ".display
>
>
> Without "\n"!


Nice. I didn't know that. Ruby certainly has a lot of bells and
whistles.

 
Reply With Quote
 
Shalev NessAiver
Guest
Posts: n/a
 
      02-14-2005
--Apple-Mail-1--951252625
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed

I agree. I've just started teaching someone C++ and he had no problem=20
with \n. This is the first time he's ever looked at a language but,=20
even so, it's not like he's a dumb person. Often times it seems we=20
(programmers) underestimate the ability of non-programmers to learn=20
programming. We tell ourselves that the only reason it looks simple to=20=

us is because we're so used to it when, really, a lot of it is pretty=20
simple. The parts that we find a bit difficult - that's what we should=20=

focus on. (That last statement may be a little to limiting, it's just=20=

a thought).

-Shalev

On Feb 13, 2005, at 9:55 PM, James Britt wrote:

> Anders Engstr=F6m wrote:
>> That '\n' is pretty confusing for a newbie.

>
> How do you know that?
>
> I'd be interested in any good sources that detail the sort of things=20=


> different types of newbies find troublesome or confusing.
>
> Offhand, I don't quite see that "\n" would be such a problem given a=20=


> reasonably succinct explanation. My own experience with teaching=20
> programming newbies suggests that most of them are comfortable with=20
> fairly straight-forward edicts (e.g., "That's just how you tell the=20
> computer to start writing to a new line").
>
> It's the more abstract stuff (e.g., blocks, high-order functions, even=20=


> the notion of a variable) that spooks them.
>
> James
>


--Apple-Mail-1--951252625--


 
Reply With Quote
 
Matthew Margolis
Guest
Posts: n/a
 
      02-14-2005
James Britt wrote:

> Anders Engström wrote:
>
>>
>>
>> That '\n' is pretty confusing for a newbie.

>
>
> How do you know that?
>
> I'd be interested in any good sources that detail the sort of things
> different types of newbies find troublesome or confusing.
>
> Offhand, I don't quite see that "\n" would be such a problem given a
> reasonably succinct explanation. My own experience with teaching
> programming newbies suggests that most of them are comfortable with
> fairly straight-forward edicts (e.g., "That's just how you tell the
> computer to start writing to a new line").
>
> It's the more abstract stuff (e.g., blocks, high-order functions, even
> the notion of a variable) that spooks them.
>
> James
>

I have to agree with James. I taught several young children the basics
of ruby over the summer and they had no problem with the concept of a
newline. They know what the return key does on a keyboard, just tell
them that it is like that.
Ruby is a great first language. If someone has no programming
experience then it would be ideal if they had a mentor they could talk
to for the basics and OO stuff but I see no reason why someone couldn't
learn ruby and programming from a combination of
http://pine.fm/LearnToProgram/ , Programming Ruby and,
http://poignantguide.net/ruby/.

-Matthew Margolis


 
Reply With Quote
 
Navindra Umanee
Guest
Posts: n/a
 
      02-14-2005
> > def fib:
> > a, b = 1, 1
> > while true:
> > yield a
> > a, b = b, a+b
> >
> > It fails. Ask why! Because are missing '()' after 'fib'.

>
> Um yeah the whole program is syntactically wrong. Fortunately Python
> tells you there's an error on practically every single line.


Whoops. Okay the whole program is not syntactically wrong... I cut
and paste the code into the interpreter instead of trying it from a
file, so it rejected everything since it couldn't get past the first
line.

I also got confused seeing "yield" there. Hmm, I didn't know Python
supported that.

Later,
Navin.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 2 11-27-2010 12:12 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:52 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM



Advertisments