Showing posts with label teach. Show all posts
Showing posts with label teach. 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..

Why Teach Computer Science Facebook Discussion

Wednesday, August 3, 2016

So last week on Facebook I posted this link: Teach US Kids to Code. It brought up a really interesting discussion between some of my former students about computer science classes.


Now back when I taught these kids (now very much grown up and in their careers) my focus was mostly code, code and more code. I am happy to say my teaching has grown since then. Our discussion centered on the fact that many kids just dont "get" coding. They pointed out that half the kids in our classes never really moved beyond variables. And honestly this was my fault.

Without the broader context the abstraction of computer science can be overwhelming. Especially for an age group that has not necessarily hit the abstract thinking phase of development. Abstract thinking starts in early adolescence and continues until they are in their early 20s. And as teachers we cant control where they are in that spectrum.

What I can control are the activities and topics we do in class. By building a scaffolding through engaging activities you create a framework and a context for all these abstract things. Though practice comes understanding.

This leap from teaching code to teaching computer science has been the biggest development in my career.

NCIS
So here is what I wrote. It is the core of why I think every kids deserves computer science in school.


In a way it is asking the question from the wrong angle. For instance in Latin there is no expectation that every student become a master level linguist. There is an understood intrinsic benefit to studying something rigorous even if you do not hit mastery.

For too many cs classes we have a kind of Jedi master approach  You will either become expert, or get nothing out of the experience. I think there is a valuable middle. 

I assume all of my students will engage with some type of computing device in their professional lives. Having some experience with programming means they have a better understanding of what these devices can and cannot do.

Weve hit the point where cs is the magic trick...watch any old episode of NCIS to see that. For too many people you hit the button, magic occurs and answers appear. Any person with some cs experience knows how untrue that is, and how manipulative it can be.

We are at a point where you are either someone that understands this, or is getting tricked. It has become a basic literacy issue.

So no, many of my students will not master abstraction or recursion, but my classes also cover the culture of cs. They dont have to get every nuance of programming to understand some of the science behind what we do.

And that knowledge puts them on the stage with the magician, maybe holding the hat but still on stage, rather than in the audience. Cs should be more than a fun show. We depend on these devices so much that cs is a core part of being a literate person of influence.
Read More..

How to Teach the Internet Dont

Saturday, April 30, 2016

Today my Computer Science Principles classes are starting Unit 2: The Internet Unplugged.

So rather than a terrible exciting lecture on the structure of the Internet - translation "Heres what I think you should care about" - we started with questions.

Telegraph Lines


They were asked to write their own definition of the Internet, and share at least three questions they have about it.

Really, we all use it daily, so we should all have our own working understanding of what it is. By starting with their understanding I can see where we need to add information and what the emphasis should be.

The questions help me plan our activities. By the end of the chapter I want them to understand that the Internet is a physical thing, and be able to describe how it works. I want them understanding how content is posted and to discuss the implications ethically of its content. I want them to know a little HTML and CSS and have the confidence to look up what they need.

But first, I want them thinking.

Questions they asked:
  • How is it possible that the internet can be censored in some countries?
  • Who owns the internet?
  • Who made the internet?
  • How does it actually work?
  • Why was it originally created?
  • When did personal computers have access to it?
  • Who owns data on the internet?
  • Why is internet copyright so important?
  • How hard is it to break the internet?
Right now some of my favorites are Who owns the internet? and  How is it possible that the internet can be censored in some countries? 

Frankly we could start by investigating those two things and cover everything we need to know.

Bookshelf:

  • Tubes by Andrew Blum
    • Story of how theInternet is constructed - I summarized it here
  • As We May Think by Dr. Vannevar Bush
    • Originally published in 1945 this is the first description of linked text - "Thus he builds a trail of his interest through the maze of materials available to him." Really, read section 7 if you are short on time.
  • Blown to Bits by Hal Abelson (also available free here)
    • Good reading for students, especially the appendix
  • Stuck in the Shallow End by Jane Margolis
    • Also read this by Jane - great food for thought in this era of "tech fixes everything"
Some Lessons Well do:
  • Cups and Strings
  • Mapping the Internet
  • Underwater Cables
  • Why do HTML
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..