Knock-knock jokes for Music Blocks

Inspiration

I was asked today to come up with a new project for Music Blocks that a group of kids might like. Right away, knock-knock jokes came to mind because my son is learning about them right now.

My son, who is five-years-old at the time of this writing, first learned about knock-knock jokes from Dav Pilkey’s Dog Man series. My son loves that series, and has asked me to read the books to him many times.

In one of the books, Cat Kid tells numerous knock-knock jokes to Papa, but like this:

Cat Kid: Knock-knock.

Papa: Who’s there?

Cat Kid: Flower

Papa: “Flower” who?

Cat Kid: Flower poo-poo on your head!

Each time, cat kid says the joke pretty much the same way, except replacing “flower” with whatever other word comes to mind. At some point, Papa gets frustrated and explains how “knock knock” jokes are suppose to go.

If I remember correctly, Cat Kid ignores Papa and just keeps telling them the same way throughout the book. My son got the biggest laugh the first time he heard the joke (he was probably three when I first read it to him). I think this is mainly because of the word “poo-poo.” Recently, we picked up a book of “knock knock” jokes from the library, and now he’s learning more of them (and the way they are “suppose to go”).

Knock-knock joke as a program

You can try the knock-knock joke as a Music Blocks program via the following link: https://musicblocks.sugarlabs.org/index.html?id=1673315448985710&run=True

The coding blocks are imaged below, for reference (as exported via Music Blocks’ handy “Save block artwork as SVG” tool.) The program uses a variety of interactive elements, including event handlers (“on click, do ‘joke-call'”) and switch.

Entire code from knock-knock program

The joke

The joke that I coded for this project is the same joke that Papa tells Cat Kid as the correct example from the Dog Man book. Images of each frame are pictured below. The user is instructed to alternate between clicking on the door (left) and the person icon (right).

One of the things that made working on this program interesting is expressing the familiar structure of the knock-knock joke as a computational expression. It was also fun to come up with musical figures that fit well with the text. The following video displays the entire progression of the knock-knock program for Music Blocks.

video
play-rounded-fill
Knock-knock joke as Music Blocks program

Next steps

The plan is to bring this knock-knock joke program in as a template for students to remix for a class. In order to create their own jokes, they need to read the code and be able to understand the structure of the program. I plan to write this up as a lesson plan and add it to our list of Music Blocks lesson plans.