Ruby for Highschoolers?

why the lucky stiff wrote:

It’s just like a chemistry teacher having fun with liquid nitrogen and a banana.
You want to find dramatic, compelling exercises that you enjoy performing and
that the students totally lap up.

Ahhh, now we’re talking. Watch as I dip my Ruby code
into liquid nitrogen and then use it to drive a nail…

Hal

[email protected] wrote:

I completely agree with the above.

Now that I think about it, I suppose that the language is not that
important. I won’t be teaching a bunch of people who are interested in
programming as a hobby, nevermind professionally.

The Programming I course is part of a program at my school called the
Academy of Information Technology. The purpose of the program is to
expose students to lots of career possibilities in the IT field. That
means we get lots of half-year courses. The full run of the academy
lasts three years, sophmore to senior, and covers a quick run through
computer history, programming, relational databases, systems support,
networking, and a full year of Microsoft Office (woo).

I’ll be lucky (luckier than a lucky stiff!) if I get one or two people
who are actually interested in programming. So maybe it would be
detrimental if I were to get ‘too’ geeky/in-depth. My target audience
will probably use the concepts taught in simple Excel formulas.

I’m completely torn on the issue of Scheme or Ruby now. I’ve seen a
major point on each side of the debate:

A. Scheme, if unelegant looking, does have simple, consistant syntax,
allowing people to focus more on learning ‘programming’ as opposed to
learning Scheme.

B. Ruby offers many ways to do things, syntax-wise. Only one way could
be taught and stuck to, and those interested could explore on their own.
All the same, it would be easy to get caught up in Ruby syntax instead
of programming.

James B. wrote:

A big part of programming is understanding the world you live in.

There is nothing spooky about the command line, even in Windows.

Don’t treat people like children, or they’ll start acting like children.

Assume the best, and let them show you otherwise.

I suppose I have to agree with you. That said, we are children, and we
do act like children (some a good deal more than others).

I think one of my school’s biggest problems with all of its classes
involving computers is that teachers ignore it when you screw around on
MySpace or Miniclip all class. Students no longer take the class
seriously, and are not there to learn, but to check their e-mail. Of
course, a typical American teenager’s (lack of?) desire to learn is a
whole nother topic.

Keith F. wrote:

Now, if you’re learning programming in Ruby, an IDE may not be as
important, but it’s probably useful to remove as many barriers to entry
as possible–you want the kids to be learning the language, not :wq or
CTRL-X CTRL-C.

This is my reluctance to open up the Windows command line. James,
however, put that reluctance away by pointing out that programming is
about understanding your world. I guess introducing people to such a
beast does have a place in Programming I, even if its just to better
farmiliarize people with their Windows environment.

All the same, a DrScheme-like frontend to irb would be a big convinience
to everyone. Less typing == less errors == less confusion == less
frustration-in-an-already-challenging-situation. IMHO.

Christian N. wrote:

Of course, that’s a question of time. If you only have a half or a
full year, you need to stop digging deeper pretty soon; depending on
what you really want them to learn. Give foundations for figuring out
on their own.

Matthew S. wrote:

This has slightly confused me, but I’ll admit that it’s been a while since I’ve dealt with this sort of thing, so jump in with corrections as required.

  • A language has first-class functions when a function can be assigned to variable, passed to or returned from another function, and so on. In Ruby, a = lambda { |x| x + 1 } for example.

  • The distinction between Lisp-1 and Lisp-2 that the latter has a separate namespace for functions, in Ruby, for example, def a(x) x + 1; end can exist alongside a = lambda { |x| x + 1 } (and there’s a corresponding hoop to jump through to call the lambda).

What I don’t understand is how it follows that being in a different namespace implies that Lisp-2 doesn’t have true first-class functions. The only reason I can think of is the circular one that “only Lisp-1 has true first-class functions”, which gives it the distinct flavour of an age-old Lisp holy war (if that’s the case, consider me uninterested).

Nothing holds less truth than the phrase ‘there is always a better
wizard than you’. I’ll admit that I’ve never had any formal CS
training, and until recently, my experiences have been limited to
PHP4/MySQL/Oracle stuff. (I’m a self-taught sixteen year old with some
obscene amount of time invested in fiddling with PHP, then had my
education greatly sped up when I was recruited as a web app developer
for a small ISP.)

No object stuff. Limited technical vocabulary. I’m not qualified to
teach the class, but (all ego aside, really!) I am probably more
qualified than one of our business teachers, who has no experience with
programming. So I suppose I have some learning of my own to do before
the '07 schoolyear. :slight_smile:

I am very grateful to you all for your inputs. I did not anticipate such
an overwhelming response. Thanks!

why the lucky stiff wrote:

It’s just like a chemistry teacher having fun with liquid nitrogen and a banana.
You want to find dramatic, compelling exercises that you enjoy performing and
that the students totally lap up.
Aye, that’s something I agree with. Thermite paste is a bit more
dramatic that /anything/ nitrogen can do, though.

  • You show a picture on screen and ask students to “tag” the picture. Words
    appear on screen with size corresponding to the popularity. Use ambiguous
    imagery that solicits interesting responses.

The idea here is that students watch the screen fill and feel the reward as a
group. High school students crave group acceptance anyway, so this feeds that
craving.
That’s actually a really nifty idea for introducting people to Ruby.

Good luck, intrepid Nicholas. DO NOT TRY TO WRITE A GAME.
Thanks!

I’m also guessing that you’re saying don’t write a game because people
will be discouraged by the fact that they can’t create Unreal 2010 with
four lines of code, MS Paint, and a lot of luck?

Again, thank you all!

Regards,
Nick Evans

This is the second statement I want to support with all emphasis. The
/concepts/ are more important than any specific language skill at the end of
the day. There is no need to teach every possible way (as mentioned somewhere
else in this thread): the skillful will find the way, the less skillfull will
work with what has been given to them.

I am currently in finals week for two courses I am teaching using Ruby
at the Art Institute of Phoenix and I can attest whole heartedly to
this sentiment. With the caveat that I a have students that are
either 50% programming / 50% art students or 100% art students and are
taking a required course, my experience has been that the concepts are
where people are getting hung up, not the syntax/language constructs.
As a result I am changing my curriculum for next quarter to be MUCH
heavier on non-computer related exercises that promote a healthy dose
of critical thinking and problem solving abilities. I?m not sue
exactly what kind of students you are going to get but I find that
critical thinking is a skill that needs to be developed a bit before
going anywhere near an IDE.

As for a Ruby vs Scheme I have also found a fair amount of people have
dabbled at least a little in programming related topics. Perhaps it?s
adding a Javascript do-dad to their website or (since these are
artists) a simple Flash game. The more familiar syntax of Ruby was a
big win there. It was especially rewarding to ask the students to
?write? a program by just calling out some pseudocode which I could
baby sit on the whiteboard as we came to a solution. When it was all
done I told them to type that into their editor and run it. The Ruby
syntax and the problem I had chosen went together very well and it
really was a case of executable pseudocode which I think helped with
some of the fears about the ?strangeness? of programming.

Now I only have 11 weeks while you have half a year so obviously your
course can be a bit more full that mine bit I find that I can get up
to objects but not cover them in any particular depth. For our final
projects we did a lot involving the File and Directory classes as many
people wanted to write helper utilities to clean up files or rearrange
them. This practical application seems to have gone over pretty well
as the students can see how this skill can benefit them on a day to
day basis. I?m not sure I could have gotten to the same point using
something like Scheme (and yes, I did consider it for this course).

Hopefully this will be useful to you in some degree. I plan on
putting up all my course material and posting a link once I have
incorporated the changes from this quarter.

David K.

[email protected] writes:

With the caveat that I a have students that are
either 50% programming / 50% art students or 100% art students and are
taking a required course, my experience has been that the concepts are
where people are getting hung up, not the syntax/language constructs.

Now you mention it, I’d like to add one more thing: Don’t do too much
math.

The CS class I need to attend is led by a maths/physics teacher, and
we use Pascal—a language that sucks at string/symbol processing. A
lot of my pals get turned off by calulating factorials, printing
square roots or doing fibonacci stuff.

With the languages considered here—Scheme, Ruby or Smalltalk—you
have the great possibility to do better. For example, write a small
database-like system with a few hashes, or a vocabulary trainer, or
whatever. Sure, some of these math things are “essential”, but there
is so much more computers can do that is not number-crunching. Your
students will like it, especially if they are not maths-oriented anyway.

Logan C. [email protected] writes:

This has slightly confused me, but I’ll admit that it’s been a
a corresponding hoop to jump through to call the lambda).

In a Lisp-2 you have to use special syntax (funcall, apply, #call) to
call a function-value. I believe that was the distinction he was
making.

Exactly. If there are two different syntaxes for a) method calling,
and b) calling of “first-class” code objects (“functions”), these
functions are a) either are not really first-class or b) not functions
in the usual meaning of the term.

I could also say: Ruby has first-class lambdas (which wrap a block
or a method), but not first-class methods (or blocks, for that
matter). In Scheme, all executable code objects are first-class.

In real life, it’s probably not that important; but from the language
aspect, it’s rather characterizing. (E.g. python has first-class
functions and first-class methods (which are functions, too)).

Nicholas E. wrote:

I suppose I have to agree with you. That said, we are children, and we
do act like children (some a good deal more than others).

Me too, but even I can still use the command line.

I think one of my school’s biggest problems with all of its classes
involving computers is that teachers ignore it when you screw around on
MySpace or Miniclip all class. Students no longer take the class
seriously, and are not there to learn, but to check their e-mail. Of
course, a typical American teenager’s (lack of?) desire to learn is a
whole nother topic.

Turn off the freakin’ Internet access.


I am very grateful to you all for your inputs. I did not anticipate such
an overwhelming response.

Well, this is Rubyland. We’re responsively overwhelming here.


James B.

“Take eloquence and wring its neck.”

  • Paul Verlaine

Heh, yes I am very aware of the math-phobia in my students. The only
time I can really get buy-in on math concepts is in a “necessary evil”
capacity such as for game related scenarios. I’m certainly not going
to have them solve fibonacci just for the sake of doing it, and there
is naught a square root to be seen in the course work :slight_smile: I’m shooting
for more usage of RRobots next quarter after I can eliminate most of
the “just ignore all that stuff, I’ll explain it later” which I detest
doing.

David K.

Quoting Christian N. [email protected]:

Don’t treat people like children, or they’ll start acting like children.

I suppose I have to agree with you. That said, we are children, and we
do act like children (some a good deal more than others).

I think this is actually your greatest asset. Make it as fun as you
can (and as James said kill the internet access, then all eyes will be
on you).