My school teaches intro to programming with Java or C#, intro to cs with Scheme, then requires two semesters of C to scare us into being good and careful. Learning about Ruby has been a way nicer experience and I think it would draw more kids into the major if it was taught early on. What do you think?
I agree whole-heartedly that Ruby would make an excellent introduction to programming, but as it stands, I don't think your letter would get any serious consideration unless someone on the committee was already evangelising Ruby and could say "look, students want it too". Stylistically, it reads a bit like this:
"You should use Ruby because it's great, it's great, ok, maybe some things aren't great, but really it's great, and all the things about it are great, so you should use Ruby."
I'd suggest separating the various ways why Ruby is great, and giving particular examples. Since you're suggesting that it's used in the early stages of the program, concentrate on things of interest in that context. To be clear: neither "writing useful apps in [one's] first semester" nor an active developer community are as relevant to an introductory course as "how can a student learn general programming principles from this language".
I think that in much of your letter you're explaining why Ruby a good language to *learn*, instead of explaining why Ruby would be a good language to *teach*, and the two are not necessarily the same thing. For example, Java forces students into using OO in a very explicit way and Scheme forces students into using functional programming. Students may (and do) use them in extremely degenerate ways[1], but these excursions tend to be easy to spot, easy to correct, and most importantly, easy for the instructor to explain and the student to understand.
Introductory exercises in programming aren't usually about the output of the program, but about how you get there. One of the difficulties of using languages like Ruby (or Python or Perl) in introductory settings is that because the language paradigms aren't as apparent in the syntax, the point you're trying to illustrate (loop invariants, binary search, recursion vs. iteration, etc) can get lost in the mix, or obscured by a language idiom, and it's very difficult for an instructor to explain what's "wrong" because nothing really is wrong, it's just not what we were trying to show the student with that exercise.
If you wanted to explain the strengths of Ruby as a teaching tool, I would devote more time to describing the theoretical aspects of the language. I might mention, in particular, closures and blocks (http://www.rubygarden.org/ruby?ClosuresAndBlocks and http://www.whytheluckystiff.net/ruby/pickaxe/html/tut_containers.html\), noting they're similar to Scheme, as well as iterators and mixins.
That all said, being easy to learn is itself a good reason to consider a language for teaching. On this aspect, I'd discuss the relative readability of the syntax - perhaps with a reference to the Poignant Guide, particualrly this bit: http://poignantguide.net/ruby/chapter-3.html#section1 or maybe with a short example from Java:
for ( Iterator i = mySet.iterator(); i.hasNext(); ) {
String element = (String) iter.next();
System.out.println(key);
}
my_set.each { |element|
puts element
}
Along with lessons on theory, syntax and conventions, I suggest that you offer some lessons on checking documentation and wikis, and installing and using libraries.
Remember that they won't restructure the entire program to use Ruby in introductory courses. If the program does a lot of C in later courses, I don't think changing their prerequisite courses to use Ruby over a more C-like language would fly. I'd suggest finding a potential niche for Ruby in your program, and giving reasons why it might fit there. Though I don't know the program there, good choices might be programming courses for non-programmers, or a course on bio-informatics (look up bio-ruby). Suggestions of this nature tend to carry more weight than just suggesting "teach Ruby". This approach would also make the "useful apps fast" point carry a lot more weight, since students taking those types of courses aren't necessarily in a CS stream, but do want some useful skills to support their core studies.
As a final bit of feedback, I would specifically leave out this bit:
In fact, many wiki pages might be well-written enough that you could lecture right off of them,
No matter how lazy your professors actually are, noone enjoys the implication that they can't do their job on their own, or could be replaced by a small shell script.
Best of luck.
[1] I recently tutored a course which introduced Java to a group of AI students, some of whom had only ever used Prolog. Looking at the code they generated was an invaluable experience for me as an instructor. How do you explain classes and objects (or even *scope*) to someone who thinks of every variable as effectively global?
···
On Nov 23, 2005, at 9:49, Mike Schwab wrote:
----
Matthew Smillie <M.B.Smillie@sms.ed.ac.uk>
Institute for Communicating and Collaborative Systems
University of Edinburgh
Here's my draft of what I'm sending to the Teaching and Learning committee. Suggestions welcome.
Professors,
Ruby is a very powerful, very concise and readable, and I think very easy to learn language. You should seriously consider teaching this language at an introductory level. It combines the flexibility of scripting languages, the modularity of object-oriented languages, and the recursive/iterative chaining of functional languages. Perhaps it would be overwhelming to present all these capabilities to young students too quickly; nonetheless there's enough documentation on the web that motivated students could move beyond the problem sets and start writing their own useful apps within their first semester (Ruby is also rather addictive). There is an interactive shell (invoked by /$ruby eval.rb ), so students would get instant feedback during their initial debugging that would really help them quickly straighten out their mistakes.
While it doesn't run fast enough for every application, Ruby saves quite a bit of programmer time, and it's concise nature makes it simple to maintain. The community is very agile and develops programs at a surprising pace. Often these releases seem to have a very modular nature that allows them to be incorporated usefully into other apps, so in other words, the time-saving capabilities of using Ruby are great and increasing. I cannot wait to see what libraries, software, and websites are available this time next year (hopefully by then I'll be able to understand all their code too). Along with lessons on theory, syntax and conventions, I suggest that you offer some lessons on checking documentation and wikis, and installing and using libraries. In fact, many wiki pages might be well-written enough that you could lecture right off of them, reducing the burden of preparation (also, if the lecturer ran across a question she couldn't answer, she could post to the Google group comp.lang.ruby and probably have an answer before the lecture was over). This combination of simplicity, facility, documentation, and human explanation is something Yale students could use to great benefit in the coming decades, whether or not they take additional CS classes.
I encourage you to investigate Ruby for your own uses - you may find that it plays very nicely with the codebase you already have. I hope you and your students will find it as useful as I have.
-Mike
http://www.rubygarden.org/ruby?RubyIdioms <- a taste of Ruby
http://www.ruby-doc.org/docs/ProgrammingRuby/ <- a free textbook (newer version available)
http://www.ruby-forum.com <- discussion of real-world uses
Ruby | zenspider.com | by ryan davis <- papers from Ruby conferences