Friday, 7 December 2012

Creating a Number Line with Wolfram Alpha

Wolfram Alpha is a pretty extraordinary tool (or set of tools) that is easy to forget about unless you teach math every day. I come back to it every couple of months and I always plan to dig deeper and explore all of the amazing things it can do. Thanks to a few useful posts on MakeUseOf, I have started to get into the habit of using it more often and there certainly are a lot of fun things you can learn.

For example, I typed in 'dimples golf ball' and it gave me the number of dimples on a Calloway HX golf ball and some others (332) but then produced a handy drop-down menu where I could select from a number of other well-known brands to see how many they have (Nike One Tour golf ball, 378, Srixon AD333, 333.)

I typed 'CN Tower' and it gave me a photo, a couple of maps, the height (553m), number of floors (147), completion date (1976) a series of comparison rankings (national, 1st, worldwide, 2nd), other tall buildings nearby (First Bank Tower, 0.8km away, 298m tall, city rank, 2nd) and the number of recent wikipedia hits.


This morning, I was watching Mr. Needham's 7th grade math class and they were plotting numbers on a number line and looking for patterns. That's something that Wolfram Alpha does with ease. You just enter a series of comma-separated values and let it do the rest.

Have a look at this MakeUseOf post, Become a Wolfram Alpha Expert With These Useful Search Techniques. It includes links to some other resources as well so there's plenty there to get you started


Tuesday, 20 November 2012

Using variables in Scratch: Math and Language Arts Integration

In today's grade 7 class, we looked at creating variables in Scratch and it provided some interesting challenges for the students that really got them thinking.

In the first part of the lesson, I introduced the idea of an random walk. First, it was just going in two directions. A student stood in the middle of the room and each time a classmate flipped a coin, the student would move either forwards (heads) or backwards (tails). Then, they were asked to figure out how to program this into Scratch. When the first couple of groups had worked it out, i asked them to have the sprite move in 4 directions based on a random number. Here's the solution:

a random walk in two directions

So, we looked at how, with the heads/tails random walk, the sprite has a 50% chance of heading in either direction. In the 4 direction version, they had a 25% chance of going in any particular direction. So then, I posed the question, "How would you modify this program so that your sprite can go in any direction, but has more of a tendency to move down and to the right?"

So this time, instead of generating a random number between 1 and 4, it could generate a number between 1 and 6. In this case, perhaps 1 means up, 2 means right, 3 and 4 mean down and 5 and 6 mean left. Then, I asked the kids to work out the percentages. After this, I let them play for a while, and there were some surprising results as they added their own touches, through in a little more randomness for how far the sprite would move on each turn, the colour and so on.

Next, I had the students create a simple Madlib using the same thinking process. The program would ask for a 'noun', a 'verb' and an 'ing-adjective'. One step at a time, the program will ask for user input, then that response will get put into a variable. Here is the solution:

this code is associated with the background in my example

I had another sprite speak the lines although I'm sure there are other ways to do this..

The kids already started discussing how they could use this to make all sorts of different projects such as quiz games and so on.  Conveniently, they are learning parts of speech in English class and percentages in math (totally unplanned) so hopefully, I will be able to get another teacher in on this one.

Monday, 12 November 2012

MIT Creative Tools workshop

Last weekend, I had the chance to participate in a great workshop at the LEAD Center in Hong Kong. It was run by Michael Smith-Welch, who was on the team that originally developed Scratch at MIT. The workshop was called MIT Creative Tools and we mostly played around with MaKey MaKey kits and Scratch Boards. We sometimes forget how much fun it is to play around with this stuff. We get caught up in teaching it and don't get to share in the joy of discovery along with our students. So it was a nice opportunity to just sit back with some colleagues, make a few new friends and play.

My friend Alan and I made a Play-doh piano using the MaKey MaKey.

Another group also focused on making music.  These little pie plates were turned into a drum machine.

At first, I wasn't convinced about the MaKey MaKey.  I saw the banana piano videos and thought is was a bit too gimmicky, but after spending an hour playing around with one, I am sold.  It really changes our thinking about the design process and focuses our attention on the user experience rather than just the technical problems of getting this or that to work.  We saw a video that showed a group of students recreating Dance Mat Revolution where the players are jumping into buckets of water!  Fantastic!

The Scratch boards that we used are very similar in that they allow you to add some more interesting inputs to your Scratch projects, such as a light sensor or a slider or even using some aligator clips to measure the electrical resistance in a circuit (unlike the MaKey MaKey which just gives a digital signal that can only be on or off, the Scratch boards have analog sensors that can return a range of values.  So, for example, you could have your project play from a whole range of notes or display from a whole range of colours, depending on the amount of light shining on the sensor or how close the aligator clips are together along a wire.)  I had two of them in my classroom that I barely touched.  But with a new grade 7 Scratch unit starting this week, I broke them out and started goofing around with them.

It turned out to be a weekend of Scratch.  Just the day before, I had discovered a project called Enchanting that allows you to program LEGO Mindstorms kits using Scratch-like blocks instead of the program that comes with them.  It is still in beta, but pretty stable and you can already do a lot with them.  Here's a video that can get you started.  (Btw, I got in contact with the developer and he is looking for people to help him with testing and translation if anyone is interested.  His email address is on his site.)

Then, I woke up Sunday morning to an invite to participate in the closed beta for Scratch 2.0!  I am still playing around with it, but expect an update in the near future.

Wednesday, 7 November 2012

Easy poll with Google Docs

A colleague just asked my how he could set up a simple poll online.  I find that Google Docs presents a very easy way to do it and I thought I would share it here in case anyone else is interested.

1) Create a spreadsheet in Google Docs.  Give it a new name other than 'untitled document'.

2) Put the names that you want for each of the fields at the top of each column.

3) Go to the 'tools' menu and select 'Create a form'.

4) You should now see your poll pop up in a new window.  Give the poll a name and save it.

5) Email it to your target group or embed it into a web page.  You can do this either by clicking on the appropriate button in the form or later on in the form menu on the spreadsheet.

6) Revisit your spreadsheet to see the responses.  Easy as pie!

MYP Design Pilot

This year, I am officially participating in the pilot program for the new MYP Design curriculum.  I have been unofficially taking part and working with the documents for a couple of years already (thanks to a friend that shared what was happening at his school), but this year, there is a lot of new stuff and now I am in contact with everyone else in the program and things are a whole lot better.  I am not able to talk a lot about it as we have been asked not to share any of our work publicly until the pilot is over in February.  That being said, I can safely say that most people will be very pleased with the changes.  There is a lot more alignment with the PYP and DP, including more consistent use of the Command Terms across all subjects and more focus on Concepts.  By calling the new program 'Design', it is clear that the emphasis is on process rather than product and the new Design Cycle lends itself more easily to a wider variety of projects, from food to ICT.  I am sharing all of my units on my google apps site ( and I hope that people find this useful.  After a compete renovation of the program here at HKA, all of these units are brand new and very much works-in-progress.  Since I am sharing them publicly, I have had to remove the rubrics and a few other things for the time being.  But please feel free to send me any feedback on what you see.  At the moment, some of them are still using the terminology from the previous set of documents but as I move along, things will start to reflect the new language.

Thursday, 12 April 2012

Installing a Processing sketch on your Android device

This year, my students and I have been learning the basics of programming using a programming language called Processing (see previous entry).  One of the great features of working with Processing is that you can run your programs on a variety of platforms, including your handheld devices.  After just a couple of weeks of playing around, I was able to create a program that ran on my Android phone.  I have been using my kids as the target audience for my creations so i haven't thought much about the details, such as customizing the icon or how to upload the app to Google Play (aka the Android Market).

I thought I would share the code I used to create the Android installer in case anyone is interested.  I got it from here but his instructions are for Windows and I am currently using a Mac.  I had to modify a couple of steps.  You can find more thorough explanations on the Processing wiki here and here is a post that goes through uploading your project to the Android market.  I haven't tried it yet.

You will need to install the Java Development Kit (JDK) and the Android Software Development Kit (SDK) before we get started.  These include the following tools, which we will be using in the process:

1) You will be running the following commands from a terminal:

keytool, jarsigner, zipalign, ant 

If you get errors along the way, make sure that you can run these commands from a terminal.  You may need to download ant separately.  The others should have been installed with JDK and the Android SDK.

I created a simple project called 'test01'.  You can just replace test01 with the name of your sketch and the name (ben) and path (benjamincooperman) to yours.  It makes things easier if there are no spaces in the name.  Here's what I did:

1) By default, new projects are in 'standard' mode.  At the top right, you will see 'standard' in a little box.  Change it to 'Android'.  You may have trouble if your project includes any additional libraries, such as the Minim library for using sounds.  There is probably an Android library that does the same thing but you will need to research that.  In one case, I was using Minim for sound, but as an Android project, I had to use one called 'apwidgets'. The nice folks on the Processing forum helped me work out how to switch libraries and you can check out the thread here.

2)  Export your Android project by going to file > Export Android Project.  You will see that there is an option to export as a signed package but that feature has not been implemented yet so these instructions should work for you in the meantime.

2) Open a terminal and browse to the android folder inside your sketch folder.  On a Mac, the easiest way to do this is to type 'cd ' then locate the android folder in your sketch folder and click and drag it onto the terminal.  (mine was: /Users/benjamincooperman/Documents/Processing/test01/android)  It will look something like this:

cd /Users/benjamincooperman/Documents/Processing/test01/android

3) Next, type the following into the terminal and hit enter:

keytool -genkey -v -keystore test01-release-key.keystore -alias ben -keyalg RSA -keysize 2048 -validity 10000

It will ask for a password.  Put something in. It will ask you to re-type the password.  Then, there will be a series of questions.  I answered the first one (what is your first and last name) with just my first (ben) and then I ignored the rest of the questions and just hit enter until I got to:

Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?

Type 'yes' and hit enter  and enter again to enter the password you already used.

4) Type the following into the terminal, hit enter and wait a bit for it to finish:

ant release

5)  Then, type the following and hit enter after which it will ask you for the password from step 3.

jarsigner -verbose -keystore test01-release-key.keystore /Users/benjamincooperman/Documents/Processing/test01/android/bin/test01-release-unsigned.apk ben

6)  Next, type:

jarsigner -verify /Users/benjamincooperman/Documents/Processing/test01/android/bin/test01-release-unsigned.apk

It should say 'jar verified'.

7)   Next:

/Users/benjamincooperman/Documents/Processing/test01/android/zipalign -v 4 /Users/benjamincooperman/Documents/Processing/test01/android/bin/test01-release-unsigned.apk test01.apk

If all went well, it should say 'Verification successful' and you will now have a test01.apk file in the android folder that you can install on your phone.  Most file managers that you find in the Android Market allow you to install software.  Just be sure to have have your phone set up so that you can install from unknown sources.  You can find that under Development Settings.

I tried to make this as clear and simple as possible since these are the same instructions that I am giving to my students.  If you see any errors or you have suggestions, please let me know.

Friday, 9 March 2012

forget Codeacademy, try Processing

Since I started along this road as a tech teacher, I have always had this awkward feeling as though I were some sort of impostor. There are just so many things that I don't know about computers and technology and here I was passing myself off as some sort of expert. A lot of this had to do with understanding what is going on under the hood. Sure, I could throw a few commands into a terminal here and there and I could tweak the html on a web page but I didn't really understand much about the programming side of things and I felt like I would have to remedy that if I was ever going to feel confident in role as an educational technologist.

So then came the inevitable question that plagues anyone nerdy enough to try to learn programming on their own. Where to begin? Which language? If you do even a brief internet search, you will find a deluge of posts arguing this point. And, like a good nerd, I had to try them all. I'm sure that many a prospective programmer got caught up in this question and ended up getting nowhere. There are too many suggestions. There are too many languages. It can be very confusing.

I found some great resources along the way. They are all neatly packed in my toolbox in case I have a reason to pull them out. The ones I like the best are interactive. Here are a few that I found:

HTML: Interactive HTML Tutorial 
Ruby: HacketyHackTryRuby
JavaScript: Codeacademy
Python: LearnPython, TryPython

There are tons more, of course.  If you want to go down the visual programming language road, then there are products like Google's AppInventor (now part of the MIT , Greenfoot, BlueJ, Alice or even Scratch.  Microsoft has a great visual programming language that you can use for robotics among other things.  They have a pretty incredible collection of resources for teaching robotics that they do nothing to promote.  There are a pile of resources to get you started with that here.  There are even lesson plans and PowerPoint presentations to help.

But I was interested in writing code.  I didn't just want to understand the sort of logic used in writing programs.  I had that.  I had been teaching with Scratch and many similar programs for a while.  I learned LOGO as a kid and did some BASIC in high school.  I wanted to understand more about the syntax.  I wanted a good starting point that I could use to dig into other languages in the future.

After trying a few languages, reading a ton of tutorials, even working my way through a couple of courses, I didn't feel that I had gotten anywhere.  And to be honest. it was kind of boring.  Then, my friend Ray introduced me to Processing.  Processing is an open source programming language based on Java.  it is aimed at artists and designers and it promoted as a sort of idea sketchpad.  It is really easy to get started and your creations are visual.  In fact, it is a lot like learning LOGO but quite a bit more powerful.  You write your programs, called 'sketches', and you click the 'play' button and it runs right away.  You change a value here and there and run it again to see how things changed.  It is a wonderful tool for Constructivist learning.  You can learn so much just by playing around.  The best part is, you can make some pretty cool projects after just a few minutes of learning. In the spirit of open source, many users, put the code for their own projects online so you can tear them apart and see how they work.  Even if a project is beyond your understanding at the moment, you can still learn a lot through that same process of experimentation--open the sketch, change something, run it again to see what happens.

Here's an example of perhaps the simplest program you can write:

point(50, 50);

This will open the default size window, 100 pixels x 100 pixels and put a dot in the middle.

Here's a slightly more sophisticated one that makes a white circle float across a black screen over and over:

float x = 0;
float y = 100;

void setup() {
size(400, 200);

void draw() {
ellipse(x, y, 20, 20);
x = x + 1;
if (x > width) {
x = 0;

The real breakthrough for me came when I discovered FunProgramming.  A fellow that calls himself 'Hamoid', inspired by what he saw from Khan Academy, decided to create a series of videos to teach basic programming.  He started by doing a video every day for the month of August and then just kept going.  There are over 100 now and they really go step-by-step through everything you need to know.  I cannot recommend this resource enough.

Since then, I have managed to create all kinds of different programs and am even using Processing to teach an introduction to programming in my Technology program.  My new knowledge has made it a lot easier to understand how the coding works inside of other programs, such as using ActionScript in Flash or JavaScript with Unity3D.

Lastly, with processing, you can export your programs as executables that can run on Windows, Mac or Linux.  You can export them as webpages (they get converted into JavaScript) and with a little work, they can even be exported to Android or iOS.  I had already created my first Android app using processing after only a couple of weeks using Processing.  In a future post, I will explain the steps I went through to get my programs to run on my Android phone.

So, if you want to learn programming and are having trouble getting started, give Processing a try.  If you want to see some things people have created with Processing, have a look here.  Below is a simple example that I made while working through Hamoid's tutorials.  Just click in the window and watch bouncing circles appear.

Friday, 17 February 2012

Game Design and other unit plans

Second day for me at the 21st Century Learning conference in Hong Kong.  Some of the people that I have talked to showed some interest in seeing some of the unit plans that I have been working on this year.  The units are far from perfect but hopefully sharing them will lead to some collaboration.  Here are a few:

Grade 9/10 Game Design unit

The plan for next year with this one is to have the students make their games specifically for our lower elementary students to support learning in the classroom.  They will meet with teachers to find out more about what sorts of games/apps might be appropriate, then they will meet regularly with members of their target audience for feedback.

Introduction to Game Design (using Gamestar Mechanic)

Grade 8 Scratch unit

Grade 7 Movie Making unit

Thursday, 16 February 2012

Math and the IKEA Home Planner

I was just chatting with a colleague this afternoon about some difficulties that she has had trying to get elementary teachers onboard using Google SketchUp. It is such a great tool for introducing some practical application of geometry and it is so easy to learn yet so powerful once you become competent with it. I just introduced a grade 8 class to it the other day and all it really took was me showing them how to draw a rectangle using the rectangle tool, then how to pull it into 3D using the push/pull tool. The kids took it from there and with no additional instruction or other materials at all, they were building houses and furniture and all sorts of stuff in no time. Nevertheless, I can understand how some teachers may be intimidated by something new and different from anything they have worked with before.

When I taught in the elementary school, I introduced kids and teachers alike to working in 3D using the IKEA Home Planner. The software is free, it runs in a browser and only requires you to install a simple plugin.  It allows you to create rooms to your own specifications and fill them with furniture, fixtures etc... from the IKEA catalogue. You can rotate the rooms around and see them from a top view as well. This was a wonderful tool for teaching perimeter and area and throwing in some discussion about money while I was at it. As a class, I would have the kids create one of the smaller rooms in the school. We would measure it accurately and work out where the electrical sockets and everything else were, then recreate it in the home planner. Then, I would task the kids with designing the room. We treated it as though each one was competing for an interior design contract so they would have to keep to a budget (the prices are all included) and various other requirements for how the room might be used. Later, the kids would go home and measure their own bedrooms and recreated those. They had a budget to redesign their own bedrooms. It was a fun way to introduce the math but it also got them used to working in 3D. Making the transition from there to SketchUp was a piece of cake and I got much less resistance from teachers as a result.

Learning about money online

I met someone at the 21st Century Learning conference in Hong Kong who asked about games that teach some of the basics of finance and economics. I thought I would share a few that I know about:

Zapitalism is a business simulation game that has been around since the 90's. It has been one of the most popular ones out there and boasts users that range from students to heads of corporations. In Zapitalism, your goal is to become a retail tycoon by taking a small store and building a business empire.

If you have read Rich Dad, Poor Dad by Robert Kiyosaki, you may already know about this one. In Cashflow, you are assigned a character to play and your job is to get to the point where your passive income is enough to cover all of your expenses. You do this by making investments, buying property etc... Originally, it was available on CD-rom but a few years ago, it was put online for free. It is a lot of fun to play and you can compete against your friends.

I haven't played Capitalism 2 but it was highly recommended on a number of forums so I thought I would add it. I am on a mac at the moment so couldn't try it. It's Windows only. (Windows only, I think. Recommended by haven't tried)

Lemonade Stand is a classic. It is very simple and doesn't take long to play. It makes a great, quick activity in a math class.

Coffee Shop is similar:

It is always fun to run a stock market simulation with students and make it a contest.  I have tried a few different ones.  Investopedia is a bit dry and there are better ones for little kids but there are lots of good educational resources on there and it is a good choice if you are teaching high school.


I will try to add more when I have a minute. At least this is a start.