Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Sunday, September 1, 2013

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

Glad you asked.


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.




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.


Curious if anyone is using music in any other languages - if so, please share. 

Monday, October 17, 2011

AP Computer Science Materials This site is from a summer workshop they run for APS teachers. It includes several good sample assignemnts from their CSE142 course.

Sunday, October 9, 2011

Friday, July 29, 2011

Java SE 7Oracle has finally shipped Java Platform Standard Edition 7, otherwise known as Java SE 7, in what is the first major update to the programming language in over five years. Oracle let news of this out in a company announcement yesterday. This is also the very first release of Java SE under the ownership of Oracle.

According to Oracle Chief Java Architect Mark Reinhold in a webcast earlier in the month, "We all know for various business and political reasons that this release has taken some time."

According to an estimate by Oracle, some 9 million developers from around the globe use Java. Tiobe Software also estimates that Java is the most widely used programming language in the world, bumping off C and obliterating C++ with twice as many users. Over 3 billion devices around the world run Java and it is deployed by 97% of enterprise desktops worldwide. In addition to that, the Java runtime is downloaded over a billion times each year.

Since Oracle acquired Java as part of its January 2010 acquisition of Sun Microsystems, the company has come under a lot of scrutiny from a plethora of different quarters for its management. Back in December, the Apache Software Foundation withdrew its participation from the Java Community Process, stating that Oracle did not govern Java as a truly open specification. Oracle has also sued Google for "inappropriate use of Java" in Google's Android mobile OS.

According to Senior Director of Engineering for Red Hat's Middleware Business and Red Hat's Primary Liaison for the JCP Mark Little, however, "The new release is solid, though it is more of an incremental release than anything else."

The new version of Java addresses many of the trends that have overtaken the field of computer programming over the past 10 years. It offers increasingly improved support for the growing number of non-Java dynamic languages that are designed to run on Java Virtual Machine. In addition to that, it also features an API for simplifying the task of running a program across multiple processor cores. Also, the range of actions that programs can take with file systems has been vastly improved as well.

Source: Computer World - Oracle releases Java SE 7

Subscribe to RSS Feed Follow me on Twitter!