|
It was my junior year in college and the math course I intended to take
wasn’t offered that semester. My advisor recommended a computer
programming course. He said "It will be useful, and who knows, you may
like it." (Little did he know!). So that’s how I signed up for
an introductory class on FORTRAN.
When I got to the first lecture, the instructor kept writing code snippets
on the blackboard and asking questions about them. Now I knew a enough
FORTRAN to do simple plots for my physics lab courses, but the code on the
blackboard had way too many parenthesis to be FORTRAN.
Here’s one example (from memory):
(DE MEMBER (PIP DECK) (COND
((EQ PIP (CAR DECK)) T)
(T (MEMBER PIP (CDR DECK)))))
(And yes, the layout is accurate. The COND was definitely on the first
line. At this point in the class, it was explained as required
"magic".)
"What kind of programming language is this?" I thought. It
didn’t make any sense for about 3 days. And then I had the
"Ah-HA!" experience and everything fell into place. I finally
"got it", and fell in love with Lisp and programming in general
from that point on.
The instructor for the course was Daniel Friedman, the author of the book
"The Little Lisper" (which was one of the required books
for the course). The Little Lisper emulated, in print, Professor
Friedman’s style of teaching, revealing a little bit of information
through a question and answer session until the reader/student gains enough
understanding to put all together.
Brian Marick has started
a book where he emulates that Q&A style, but targets the book at Object
Orientation and Ruby instead of Lisp. You can find the first three chapters
of A Little Ruby, A Lot of Objects at www.visibleworkings.com/little-ruby.
In those three short chapters he introduces objects, messages, protocols,
inheritance, classes and meta-classes to a beginning programmer in a
whimsical manner, similar to the original Lisp book. It was a delight to
read the step by step approach used in the book.
The only downside is that Brian seems to have stopped after three chapters.
Nevertheless, if you are looking for a gentle introduction to object
orientation in general and Ruby in particular, take a look at A Little Ruby, A Lot of
Objects.
|