Friday, May 28, 2010
Monday, December 21, 2009
I wrote this back in 2003, as part of the justification for switching to a Haskell-like language in CS2; the original (well, except for being moved to a different wiki system after my TWiki installation was hacked...) is here.
Here's what I (Brian Howard) hate about Scheme (without mentioning the word p*r*nth*s*s):
- Lisp's S-expressions were originally intended as the internal representation of programs, which would be written in the more human-friendly M-expression syntax. Through historical accident, the M-expression design was never finished and people learned to make do with S-expressions.
- An S-expression is essentially what is known as Abstract Syntax (see Wikipedia:Abstract_syntax). This is fine for compiler internals, and for abstracting away from the gory details of a particular language, but I don't believe it is appropriate for beginning students. There is no point in learning an abstraction before one has seen at least two concrete instances of the abstraction.
- car and cdr. I know the origin of the terms, and understand that cons-cells are used for more than just lists, but why aren't they called something clear like first and rest? Of course, many reasonable people do exactly that by defining these as synonyms (see, for example, How to Design Programs), but I find it telling that the official definition of Scheme sticks to the traditional names, as if to emphasize that "you need to learn LISP/Scheme-speak to join this club". It reminds me of some of the more extreme elements of the APL/J community; for example, look at the front page of the J Primer: someone thought it would be clever to use the following as the menu bar on the document that helps beginners learn the system!
>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help Primer
It makes sense once you know what you're doing, but it's just going to turn away anyone who isn't willing to puzzle it out.
- One advantage of using car and cdr that I have heard is that it makes it convenient to name combinations of them; for example, caddr is the car of the cdr of the cdr of its argument (which extracts the third element of a list, if the argument was a list with at least three elements). My response is that this is only an advantage if you don't have structured data types with named selectors, so that you're constantly having to extract elements of lists by position. Furthermore, if you are hard-coding position-sensitive information such as "third element of a list" into your code, you have a very fragile design; the c(a|d)*r abbreviations don't help at all if you want to access the nth element of a list.
- Another claimed advantage of Scheme is its wonderful macro system. I agree that it is the model of design for such a thing, but it's an awfully big hammer for the nail of creating an embedded DSL. Haskell's lazy evaluation, and Scala's call-by-name parameters, give a more elegant approach without the ugly machinery; see this post for further discussion, as well as some other points on which Haskell compares favorably with LISPs.
- On the topic of excluding non-geeks (eventually--this one's a bit long): I liked LISP when I was a teenager, and well into grad school. I first learned about it in Gödel, Escher, Bach, which I devoured when I was 15 (I once read an interview with Hofstadter where he said he wrote it for 15-year-olds who were interested in the things he had been interested in at 15, and I was so proud...). I taught myself the language from the two books I could find on LISP at the Cleveland Public Library: The LISP 1.5 Programmers Manual and Anatomy of LISP. I wrote a LISP interpreter in LOGO on my Commodore 64. I went off to an engineering school and studied computer science; my senior honors thesis was on two-level grammar representations of music -- I implemented it in LISP. I went to grad school in CS at Stanford, used LISP in some classes, and met John McCarthy and a bunch of other LISPers. Then I started to learn more about programming language design, and how it needs to be a trade-off between safety and flexibility, and I moved in the direction of providing more safety; my Ph.D. thesis was on type systems for functional languages. Now I'm teaching CS at a liberal-arts college, and I look back on my days as a geek and realize that very few students are going to follow that sort of path. I think there are valuable ideas in functional languages that I can use in my teaching, but I realize that I have to guard against turning off many of the students who can most benefit from being exposed to those ideas. They aren't the geeks who are going to put in the effort to teach themselves an arcane language because it looks "neat"; instead, they're the students who will be spreading knowledge of computer science outside of the core circle of researchers. If one of the ideas that they spread is that "functional languages are only for geeks", then we're never going to succeed in bringing higher-level languages and programming techniques into the mainstream.
- Here are some quotes from a paper about DrScheme that demonstrate that the Scheme community itself is aware of many of these shortcomings:
- "Simple notational mistakes produced inexplicable results or incomprehensible error messages because the syntax of standard Scheme is extremely liberal."
- "The Lisp-style output syntax obscured the pedagogically important connection between program execution and algebraic expression evaluation."
- "The hidden imperative nature of Scheme's read-eval-print loop introduced subtle bugs that easily frustrate students."
- "Contrary to oft-stated claims, learning Scheme syntax poses problems for beginning students who are used to conventional algebraic notation."
- More rants coming, mostly about types... (but until that happens, read this excellent defense of static typing).
-- Brian Howard - 21 Apr 2003; last updated 21 Dec 2009
Wednesday, December 2, 2009
You can look him up on the web; he's been at Aleri in NYC for nine years, and the previous nine years he was at Bell Labs. Before that, he spent a year as a postdoc at UPenn, after getting his Ph.D. from MIT in 1991. He's basically my age, although in "advising genealogy" terms he's my uncle: his advisor at MIT was Albert Meyer, who was also my advisor (John Mitchell)'s advisor.
Since this occurs in the world of computer science, I should invoke the whole graph-theoretical "six degrees of separation" business; however, since our end of CS isn't very big, I won't detail all of the connections between Jon and me, in terms of chains of co-authors, joint attendance at conferences, etc. There's a fairly tight network there, but that's not surprising.
I got to talking to Jon at a conference, because of these mutual connections, and was interested to find out that I had essentially taken his place at UPenn -- I had been a postdoc there the year after he was there, occupying the same office (and probably the same desk). We started exploring our backgrounds, and he was interested to hear that I had attended Northwestern as an undergrad. He said that he had a good friend who had gone there, whom he met while camping at the Philmont Scout Ranch in New Mexico. I had also been a Boy Scout, though I had never made it to Philmont, but I asked what his friend's name was. It turned out to be Steve (I'll omit his last name, because it doesn't really matter for the story), a guy that I knew from the Film Board. My wife was there, and she pointed out that Steve had for a time been dating a good friend of hers!
So, those are my small world stories. There are others: encounters with people who played my old position in various handbell choirs, intricate webs of connections among people in small towns, etc., but none of them are as extensive or startling as these. In fact, that's one of the things I like about living in a small town now, that you can keep bumping into the same people in lots of different ways. Now we'll see if putting these up on the web (admittedly with no promotion whatsoever) might lend some of that small town feel to the Internet -- who knows, maybe someone will stumble across this and say, "hey, I know you from ..."
Thursday, October 1, 2009
In the mid-90's, we lived in Kansas. I was teaching at K-State, and ringing bells at First UMC in Manhattan. We went to an AGEHR Area VIII festival in Omaha in 1996; the next year, although we had moved to Virginia by then, we returned to attend the national festival in Kansas City. Both times, a teenager named Kendra Flory performed in one of the (non-massed) concerts; I believe she did a duet with her sister once, and a solo the other time. She was very good, and her name stuck in my memory because Daniel Flory was the founder of Bridgewater College in Virginia, where I started teaching in the fall of 1996.
A few years later, I was attending a start-of-the-year reception at the college president's house, and he greeted me by saying, "We've got a new student who is a bell ringer." Well, it turned out that Kendra was indeed related to the Bridgewater Florys, and was transferring from McPherson College to Bridgewater for her junior and senior years. Her father was involved in the leadership of the Church of the Brethren, with which McPherson and Bridgewater are affiliated (and which I had never heard of until I took the job at BC...), and he had arranged for her to do some solo ringing at the annual conference, where she was introduced to the president of her new college.
During her time at Bridgewater, Kendra and I became friends, and we worked on some duet and small ensemble music together. She also gave a solo concert at the Methodist church up in Harrisonburg where Eleanor and I were attending (I wasn't involved in setting this up, so it might count as another mini-coincidence that she showed up there), and joined our bell choir on occasion as a sub. After she graduated, she moved to somewhere in Pennsylvania, and we lost touch for a bit.
Now we get to a brief non-handbell tangent, where it starts to get a bit spookier. While in Kansas, I attended a couple of the Great Plains Programming Language Workshops, and I met a number of PL people from Kansas and the surrounding states. In 2001, somewhat out of the blue, I received an invitation from one of these people to give a pair of lectures at his school: McPherson College. I traveled there in October, gave the lectures (one about design patterns, and the other about automata), and spent the day visiting in classes there and talking to the faculty. In conversation with one of them, Kendra's name came up -- not only had she attended the school for a while, she had grown up just a few blocks away (I think her father had been on the faculty), and had been friends with my CS colleague's kids!
Giving those lectures at McPherson helped me decide to leave Bridgewater; in fact, I used the automaton talk when I went on job interviews. In the fall of 2002, we moved to Indiana and I started teaching at DePauw. We joined the Methodist church on campus, and started ringing with the bell choir. In 2003, and then again in 2005, the Area V festival was held at DePauw (it is apparently a popular site for the festival -- the first time I ever visited DePauw was for the 1983 festival, with my church's high school choir). Some of our choir rang in the 2003 festival, but by 2005 our director had moved away, our AGEHR membership had lapsed, and we didn't even hear that the festival was coming back to DePauw until it was too late to sign up. I did manage to get tickets to the concert by the featured choir, the Raleigh Ringers (they're very good). After the concert, someone familiar came up to say hi -- it was Kendra, who, unknown to me, was attending a Brethren seminary on the other side of Indiana!
I had in fact seen her once between her graduation from BC and 2005: one year (I forget which), I was asked to join my mother's bell choir back in Cleveland (the Presbyterian church whose high school choir went to DePauw in 1983 -- see, I haven't always been a Methodist...) for the Christmas Eve service. I went to the rehearsal, and found that they had another sub -- it was Kendra. I forget why she was in NE Ohio that year (this is about the point where you could really make a case for her stalking me...), but somehow she had made contact with my mother's bell director and gotten herself invited to ring there.
OK, that's almost the end of the story, except that while writing this I decided to Google Kendra and see if I could find out what she's doing now (since I assume she's graduated from the seminary). She turned up as a member of the Circle City Ringers, the community group over in Indianapolis where I subbed a few years ago. Now I'm planning to attend one of their concerts this fall (but I suppose that wouldn't count as a coincidence then). Who knows, maybe we can keep this up for years to come?
My Kindergarten teacher in Cleveland Heights was Mrs. Sugimoto. I suppose she had a first name, but it didn't really occur to me as a five-year-old to ask such a thing, certainly not of Mrs. Sugimoto. She was Japanese, and during the summer a year or two after I was in her class she traveled back to Japan for a visit. On the way, she spent a few days in Honolulu.
My aunt and her family were living in Hawaii at that time, and it happened that her mother, my grandmother, was out there for a visit (although her home was in Cleveland). One day she went to a restaurant at one of the hotels on Waikiki Beach (we could pretend that it was the Royal Hawaiian, but it doesn't really matter). It was busy, so she agreed to share a table with another single woman. They got to chatting, and were surprised to find out that they were both from Cleveland. Furthermore, they were both teachers. When my grandmother heard that the other woman (who was, of course, Mrs. Sugimoto) taught Kindergarten in Cleveland Heights, she asked whether she knew me, and was astounded to learn that she had just sat down with her grandson's teacher, 4500 miles from home!