Showing posts with label Education. Show all posts
Showing posts with label Education. Show all posts

Saturday, October 04, 2008

From Artless to Artful

Did you have art classes in high school? I did. I learned a lot in them. Not art—our teacher wasn't up to the task of squeezing any productions out of me—but rather my inadequacy at it. Those experiences registered not so much as scars but as shoals, to be avoided as I went off to seek something for which I had a little talent.

Now, I had a similar experience with handwriting. (Before you ask, no, I didn't abandon that altogether, though there were certainly times when I considered it, and in the era of computing I effectively have.) I'm left-handed by nature, and hence wrote naturally with my left hand. But writing left-handed in India was considered unacceptable, so I had to take after-school lessons to learn to write dextrously. The result was that I wrote disastrously, in a scrawl that was so ill-formed it wasn't even bad enough to be considered awful.

But sometime in 9th grade, I tired of the state of affairs. I wasn't quite sure what to do about it—after all, it wasn't for lack of practice, so more of the same wasn't going to help—so on a whim I opened up an encyclopaedia to the entry on calligraphy, and worked through tracing out letter-forms. I hadn't ever used a broad-nibbed pen (and didn't have one, either), so it took me a while before I realized the pattern to where the strokes were thin and thick. But I eventually got the hang of it, to the point of being able to reproduce a passable Textualis blackletter.

Which brings us back to art. I realized this summer that I was similarly tired of my inability to draw just about anything at all. I tend to have lots of pictures in my head, and ever since I've come to understand the visual language of cartooning I've wanted to learn it. (For me, reading my morning funnies is a bit like watching the infielders in a baseball game: periodically, I see something so stunning that I focus entirely on the particular act and forget all about the context of what I'm watching.) I've tried to work through cartooning books, but I tire of messing around with paper and pencil.

The game-changer was, amazingly, a software program. My OQO 1+ came with a copy of Alias (now Adobe) Sketchbook Pro (v. 2.0.1), which I'd never used in the two years I've had the machine. One day I idly started the application, picked the felt-tip marker tool, set it down on the canvas...and saw this:

That's right, the ink spread, as if it were a real pen put to real paper.

Something about that moment was magical. As I explored the application more and found out how much more it simulated the physics of paper-based media, I was hooked. I was in the process of preparing the Web site for PASTE 2008, which I co-chaired, and I was annoyed at the lack of any visual embellishment. Perhaps, I thought, I could fix that myself. So I came up with this, which you can see in context.

Buoyed by this success (by which I mean, I asked a few other PASTE dignitaries what they thought about it, and they gave me stiff-lipped responses to the effect that any visual embellishment is welcome—carefully saying nothing at all about this specific one), I started to design images for use in our new book-let. Now you know whom to blame for all the images in the first version of How to Design Worlds, though I am rather pleased with the cow and the UFO (both also to be found on the cover), and by the graphic accompanying “The Movie Principle” (section 4.4, page 11 in the book).

All this can only lead to hubris—and it has. Our latest victim is another wall of the same room that we painted earlier. We now have a little mountain thing going,

which includes my personal rendition of the Pão de Açúcar:

Somewhere in here is a message for my art teachers, but I'm not sure what. Perhaps just, “Don't worry, you didn't miss much”.

Monday, June 30, 2008

Functional Programming and the ACM Curriculum

In May 2008, ACM SIGPLAN organized a workshop on Undergraduate Programming Language Curricula. One of the outcomes of this workshop was a proposal to put functional programming in the ACM core curriculum. This was Stuart Reges's brainchild, and Matthias Felleisen and I worked with him on it. We were very pleased to accomplish this in a “zero footprint” fashion.

Of course, this has earned a little (but surprisingly little) sniping from the vasty deep that is the Internet. Stuart and I wrote some prose not only explaining how we planned to accomplish the zero-footprint but, even more importantly, why this material belongs there. It should be useful reading for people who are stuck in the old-fashioned trap of “paradigms” (more on that later).

Because I don't know what will happen to this prose when it's incorporated into the final report from the workshop, I'm posting the original version of it here. If you're stuck in a discussion about this change, feel free to refer to this.

NB: This is co-authored with Stuart Reges, and inspired by some text from Larry Snyder, who both seem to have more sense than to have blogs of their own.


Rationale for the Change to the CS2001 Curriculum

The proposed change has the following structure:

Knowledge Unit                       Current Proposed
-----------------------------------------------------
PF4  Recursion                           5       2
PF5  Event-driven programming            4       2

PL1 Overview of PL 2 0 PL2 Virtual Machines 1 0 PL3 Language Translation 2 0 PL6 Object-oriented programming 10 10 PL7 Functional Programming 0 10 -- -- Total 24 24

The changes have two key design goals:

  1. To make the functional programming unit (FP), currently listed as PL7 in the curriculum, required rather than optional.
  2. To account for this change in a "budget-neutral" way.

First we describe the high-level motivation for this change.

  • Functional programming is not merely about a change in syntax; rather, it forces students to approach problems in a novel way. This increases their mental agility and prepares students for a life of practice in a world where languages continuously grow, morph, and sometimes shift their perspective. This is not just the academic community speaking: this advice comes from influential industrial practitioners including Joel Spolsky, Steve Yegge, Paul Graham, Eric Raymond, and Peter Norvig, who have all written vocally about it.
  • The growth and change of languages, and the influence of functional programming, is not hypothetical. Virtually every significant mainstream language that has been designed, has gained prominence, or has been improved in the past decade, from JavaScript to Ruby to Java to C# to Visual Basic, incorporates notable features that used to be associated with functional programming. Datacenter programming techniques such as MapReduce grow directly out of functional programming. Microsoft has championed the use of functional constructs like closures in the .NET framework as the best way to express database and XML queries. The rise of multicore architectures is imposing new pressures on programmers to avoid the use of shared state whenever possible. Learning functional programming takes students directly to the source, without the overhead and pain of sometimes unwieldy encodings of these ideas.
  • By exposing students to multiple languages before they graduate, we make a strong statement about what they can expect to see in practice. History shows that the dominant programming language changes roughly every seven years, and over two or three of these changes little stays the same other than syntax. Furthermore, modern systems are rarely built in a single language alone; developers find it advantageous, and sometimes necessary, to use a combination of languages of widely different styles. Therefore, exposing students to a variety of styles is an essential part of their education.

Below we discuss the rationale for changes to specific knowledge units.

  • The topics in PF4 (Recursion) and PF5 (Event-driven programming) lend themselves naturally to coverage in both object-oriented and functional programming. Functional programming has traditionally made paradigmatic use of recursion, while the callbacks that guide event-driven programming are a natural fit when discussing closures. Furthermore, by seeing these topics in both contexts, students will be in a better position to compare and contrast their expression in different styles.
  • The topics in PL1 (Overview of programming languages), PL2 (Virtual machines) and PL3 (Language translation) are important topics, but we find it difficult to say much of use within this little time. The result is an enumeration of jargon without any deep study of concepts. Students will be better served by a substantial exposure to a functional language that serves as a contrast to whatever object-oriented language they will also learn. This experience of learning two different languages is more important than a superficial coverage of these other PL topics.
  • One of our major goals is to bring parity between the number of hours devoted to PL6 (Object-oriented programming) and PL7 (Functional programming) by requiring a substantial experience with each approach.

It is worth noting that the proposal is neutral about implementation. Some schools will choose to incorporate functional programming into their introductory sequence. Other schools might include it in an advanced programming course or a discrete structures course. And other schools will fit this into a required programming languages course.

Monday, June 09, 2008

Footprint-Neutral Curricular Change

Last wee we had a SIGPLAN-sponsored workshop on programming languages education. Most of the usual luminaries, and people like me, attended. One of the outcomes—what, in fact, I think may be our most significant outcome—was a suggestion to rearrange some hours in the core ACM curriculum. You can find the details of that proposal here.

If at think this is at all a good idea (and you should), please post a comment to that effect. Yes, it'll take an extra minute of your time because you'll have to log in, which will involve remembering your ACM user ID (which you have long forgotten), but believe me, it'll be worth your time.