April 16, 2010

Tutorial: Custom Poem

A good candidate "first program."

The kids love custom-poem.html (view source), which uses document.write to produce a one-of-a-kind custom poem just for you. Refresh to get a new poem.

The bits of wisdom are generated madlibs-style, by inserting a random choice out of of a list of words for each of several spots. A simple idea, but the resulting poems are incredibly entertaining to the 3rd-6th grader set.

I chatted with one of the kids who will be in my trial "programming class," and I was floored to hear this sixth-grader say - without me mentioning jQuery at all - that he "wants to learn jQuery." When I pointed him to Douglas Crockford's talks about the good parts of Javascript, he said, "oh yeah, I've watched that."

So we will definitely follow up with the more-advanced (but conceptually the same) dynamic-poem.html (view source) that uses jQuery instead of document.write. That gives the poem the ability to change itself over time.

Posted by David at April 16, 2010 05:50 AM

jQuery is pretty great, as evidenced by this screenshot of a thread from stackoverflow:


Posted by: Rachel Grey at April 23, 2010 02:20 PM

I don't know how I missed Rachel's comment from three years ago here.

Took me a minute to get up off the floor from laughing.

Posted by: David at March 16, 2013 04:25 PM
Post a comment

Remember personal info?