Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Using Music to Teach Programming

Wednesday, September 28, 2016

So, what does Paul Simon have to do with array processing?

Glad you asked.

You Can Call Me Al Video

As anyone that has tried to teach arrays can tell you they can be a bit dry. Sadly, the best way to really understand anything in programming is to practice. One of the best workarounds I have found is storing music in arrays. My AP kids never really got into the classic drunkards walk program, but make it a random set of notes on a kazoo and tuba and they were all over it. Music lets them play, which means more practice.

This is fairly simple to do. Each note is a number, or an object, depending on the language. I have done this in Scratch, Visual Basic and Java with the kids. Scratch music is built right in, in VB we use the Beep command, and in Java I use the JMusic tools.

And what, you might be asking, does this have anything to do with You can Call Me Al?

If you listen ahead to about 3:30, there is a bass solo. A Palindromic bass solo. The first part was recorded by Bakithi Kumalo, then played backwards for the second half

The lesson:

  • Play the video - ask them if they notice anything about the bass solo - you might need to play it a few times, and it helps if you have some band kids in the room.
  • Make sure everyone understands palindromes
  • Code a tune - store your notes in an array.
  • Create a new array that will store the original tune, then store it backwards.
  • So if your original tune was:  A B B D E the new array would store A B B D E E D B B A
  • Demo the songs to the class.



Bassists Abraham Laboriel from Mexico and Bakithi Kumalo from South Africa

Another extension here is to watch the video of U-Bassists Abraham Laboriel and Bakithi Kumalo jamming in 2012. What happens if a musician makes a mistake on stage?

I am planning on using this as a journal prompt this year. One of the hardest things for new programmers happens around mistakes. Sadly this is a by product of much of the rest of their education. They are trained to find the right answer.  In computer science we care most about the correct solution, and that is usually going to take several tries. Sometimes the mistake points the way to a better solution. My goal is to get them to embrace their mistakes.


  • Making Music with Java - by Andrew Brown
  • More info on jMusic you can download it here: http://explodingart.com/jmusic/GetjMusic.html
  • Bakithi Kumalo Video playing the solo - on a fretless bass! Starts at min 2:20. While you are at it look at his hat - so want one.
  • And if you are really in the mood for more bass:  U-Bassists Abraham Laboriel and Bakithi Kumalo jamming in 2012
Curious if anyone is using music in any other languages - if so, please share. 
Read More..

Internet Safety 2 days left! Alice programming introduction

Thursday, September 1, 2016

There are 2 days left to work on (in class) your Internet Safety project.  Tomorrow is the last day you will be allowed to work on it and it should be done by the end of the hour.

If you are done you are going to begin working on Alice - an Educational software program that teaches you computer programming in a 3D environment.  To use Alice, go to Finder on your computer.  Next, double click on the Alice folder.  Then, double click on the icon labeled Alice - you will need to agree to any user agreements.

Once you have opened Alice come back here and go to the following video and watch an introduction on how you will interact with the Alice interface.

Alice introductory video

Once you have watched that video you will begin working in Alice with Oracle Academy.  You will work through a series of Lessons that will help you to better understand how Alice works and how to manipulate the Alice programming environment.  Here is where you need to go:

Oracle Academy

Once at that website, click on "Get Started with Alice 3" under the red rectangle on the left side of the page (the red rectangle says "Self Study: Getting started with Java using Alice").  Work through each of the sections of that lesson - if you complete all of the sections move to the next lesson ("Add and Position Objects"); if you complete the different sections of that lesson move on the next lesson, and so on.

We will be using Alice often in the last quarter - you will be getting a head start on learning the software.
Read More..

Meatballs beat computer programming

Saturday, August 13, 2016

So my youngest came home with an project about a foreign country. Due the second to last day of school. My first reaction - only a deranged person would assign something like this. I should have tried a bit harder at the PTA fundraiser this year. Or sent a better teacher gift before winter break.

Then I read over the list of ideas...this is an official list of possible projects from the Dr Carol Tomlinson at the UVA Curry School of Education. There at the bottom:

It says: Write a computer program. Be still my heart. I suggested  something done in Alice, or Scratch, but for now she is leaning towards meatballs. She says its what the kids want. There was a lot of eye rolling involved in this conversation.

When I asked why she wasnt interested in a program, she said shed done all that and wanted to try something new. Fair enough...apparently I am my own enemy on this one.
Read More..

HTML is not programming so why teach it

Tuesday, April 12, 2016

So in talking to parents and guidance counselors I occasionally get asked if a kid can jump ahead and take one of our upper lever computer science classes. My first question is always "have they programmed?" Yes, I know, programming is not the end all and be all of computer science, but for a student that wants to take the current AP Computer Science course they need to be able to code.

Sadly the answer I most often get is "yes, they know HTML". Sigh.

For the CS Principles pilot this last year my second unit was The Internet Unplugged.  We covered both the hardware side along with how to actually make a web site. Yes, I taught HTML and CSS.

So the question is - why cover HTML at all?

One of the core themes of the CS Principles course is broadening participation. So many students have had exposure to HTML, and they all use web sites. This is the interface they use to get at the information on the web. It is an immediate way to show abstraction in action.

Plus, as we transitioned to coding students were already used to the idea that formatting and exact punctuation matters. This let us focus on the tools of programming, like ifs and loops.

And of course, CS Principles is not all about programming. The Internet is one of the seven core principles, equal to programming.

So this summer I am reviewing what we did in CS Principles last year. Honestly this was one of the better units we covered. It tied into all of the big ideas and was something we referred back to the rest of the year.

On the other hand I am not crazy about how I taught HTML. It was a bit dry - too much lecture and we got a bit bogged down. Id like to reduce this to just 4 days.

Next year I plan on trying Thimble. This is offered by Mozilla and lets you type in the HTML interactively and see what happens immediately. It also points out errors right away.

Read More..