28 October 2010

Google Code-in and Exploring Computational Thinking

I run across a large number of education links that talk about how to use a particular computer program or website to create lesson plans or other classroom materials. For example, there are pages like:
I suppose that I run across these a lot because they (on the surface) seem to apply to the topic of 'teaching' and 'computers'. As someone who teaches how to program computers, it can be frustrating that these 'how to teach using computers' pages seem to drown out the content that is of real interest to me.

I can accept the fact that there are more educators out there trying to use computers than there are trying to teach computers and so, Yes I can see how these pages are serving a useful purpose. But No, I still don't find them particularly interesting.

The reason I bring this up is because I've recently come across not one, but two interesting links to Google projects that I think are interesting for people teaching computer science in 6th through 12th grade. Since I work for Google, I was hesitant because I tend to be suspicious of other people who push their employer's projects on their blogs, so I was starting to get suspicious of myself. I don't want this blog to start linking to every 'How to use Google product X in your classroom' document on the web.

But having thought about it a bit, I really think that these projects are both interesting and relevant to K-12 Computer Science educators.

Google Code-in 2010

The first one is Google Code-in 2010, announced back on 7 October 2010. As I read the description, it sounds like Google's Summer of Code (SoC) but for pre-university students.

If you're unfamiliar with SoC, it is basically a summer job for college students where they are paid by Google to work (from home) on a selected set of open source projects. The open source projects act as 'mentor organizations' for the students as they work on their assigned summer task.

For the Code-in, each open source project will propose a set of tasks and students will claim tasks to work on. When the task is done, the mentor organization will evaluate the work and accept the task as done (assuming the work was done properly). For every three tasks, the student gets $100, up to a max of $500.

As is stated in the Code-in FAQ:
It is Google's not so secret hope that the student contestants of today will be long-term contributors to these and other open source projects in the future.
In other words, they hope that students participating in this contest will become computer scientists and programmers.

This is open to students between the ages of 13 and 18 (as of 22 November 2010) and runs from 22 November 2010 until 10 January 2011. The list of mentor organizations hasn't been announced yet, but the list will be posted on the Code-in site on 5 November 2010.

If you're interested, be sure to check out main Code-in site. There are many more details than I can give here, and any updates or changes will be posted there.

Exploring Computational Thinking

The second link of interest is to Exploring Computational Thinking. This site contains a set of lessons created by teachers that can be used to demonstrate computational thinking in a variety of math and science topics, such as:
  • Calculating percent change
  • Determining the distance between 2 points
  • Finding the roots of an equation
  • Understanding Filters (in Cellular Biology)

The site was announced earlier this week so it's still fairly new, but it already contains over 60 different lessons for grades ranging from 6th through 12th.

It will be interesting to see how people make use of these materials since it seems (to me) that they might be most useful for non-CS teachers interested in including some CS material. Although CS teachers should also find the material useful since the lessons make a nice summary of how CS ('computational thinking') can be relevant to math and science education.

23 October 2010

Using PlainCards to create classroom materials

For a while I've had my eyes open to pick up some printable cardstock that was pre-perforated to make 'playing card'-sized classroom material.

I've tried printing the cards out on regular paper, but that doesn't feel right when you have a stack of them. Laminating helps make the cards sturdier, but they still don't slide off each other the way regular playing cards do (and the cards tend to stick together a bit).

The standard place to go for cardstock products like this is Avery, and they have a number of products that are almost (but not quite) like this: they list Business Cards, Greeting Cards, Note Cards, Index Cards, Postcards, Tent Cards, Rotary Cards, and ID Cards.

But not Playing Cards.

This is unfortunate because the cardstock products that they have don't work well for cards that you want to stack and hold in your hand. Either the size is wrong (business cards are too small; greeting and note cards are too big) or the cards don't slide against each other well.

PlainCards

However, a company called PlainCards makes exactly what I was looking for: micro-perforated cardstock that you can run through your printer to make custom cards.

My immediate need was to create "number system" cards to teach binary, octal and hexadecimal, so I picked up a set of the Blank Playing Cards with Pattern Backs.

These are blank on one side and have a standard 'playing card' pattern on the back so that you only need to print on one side. They also offer cards that are blank on both sides so you can print your own card backs, but this seems unnecessary for classroom material.

Software

To layout the card designs, PlainCards offers their own QuickCards3 software. This is free to download, but you need to buy it for ~$17 if you want to be able to print. I can't comment on the quality of the software since I haven't used it, but I didn't feel it was worth purchasing. One annoying thing about how they market this software is that they divide it into three separate versions: one for Playing Cards, another for Game & Trading Cards and yet another for Tarot Cards. Of course, you have to buy each one separately (or get the special bundle pricing).

Rather than use their software, I created some blank templates in Inkscape, which is a freely available, open-source vector drawing package (download here for Mac, Windows, et al.). Note that these template are SVG files, so they should work fine in any vector drawing application like Illustrator or Freehand.

Download: PlainCards Blank Template

The templates are quite simple: they contain boxes marking the micro-perforation outlines on the PlainCards cardstock. To use the templates, simply:
  • Add your design/artwork
  • Use the bounding box outlines to center the design for each card
  • Delete (or hide) the bounding box outlines
  • Print
Note that the perforations are centered and symmetric on the cardstock, so you don't need to worry about paper orientation when printing.

Overall

Overall, the PlainCards did exactly what I wanted them to do and I'll certainly be using more of them to create class materials. After I finish the current batch of number system cards, I plan on going back and re-doing the Binary Magic Trick cards so they can be printed directly onto PlainCards.

Other Reviews

Here are a couple other reviews for PlainCards, written by people using them to make custom cards for their games. They provide some useful tips on how to carefully remove the cards from the cardstock after printing.

17 October 2010

Getting "Computing in the Core"

I've typically avoided spending much time on trying to convince school board (or whomever) that they should do more to include Computer Science & Engineering & Programming in the K-12 curriculum. This is not because I feel this is unimportant (double-negative = yes, I think it's important), but rather that I'd rather not get mired in the politics at this point. In any case there are lots of competent people already working on this (uphill) battle.

I've also felt that I can do my part by creating and publishing various assignments, projects and presentations so that other instructors can make use of them. (I've been doing OK on the 'creating' part, but I have a large backlog of material I need to get around to 'publishing').

Getting back to the 'lots of competent people already working on this' topic, I just saw the announcement for Computing in the Core (CinC) which touts itself as a:
...non-partisan advocacy coalition of [blah, blah, blahs] that strive to elevate computer science education to a core academic subject in K-12 education...
And it made me go 'yea!'

Even if they focus only on 9th-12th grade (which I hope they don't), their success would still makes a great start since eventually the requirements will trickle down to the lower grades. I strongly believe that we should be starting earlier with CS education and that many of the problems we encounter are due to the late start, but that's another topic for another day.

I was reminded of the importance of getting CS into the core curriculum when I was talking with a friend the other day:
This friend has a daughter who attends a middle-school with an after-school robotics program. She was interested in this class (and had done some robotics in the past) but none of here friends were going to be taking it. In the end, she chose not to sign up for the program.
If this had been a "6th period robotics" class that everyone had to take, this would not have happened. It's difficult to be the only one of your peers interested in something like this. Who knows, maybe her friends would have enjoyed it as well.

But to finish up on a positive note. Yea for CinC! I hope that they are wildly successful.

10 October 2010

Computer Class - Week #1

[So, this past week my Computer Class finally started. We purposefully delayed the start until the school year was well underway so that the students didn't have everything starting at the same time. This class is sortof a continuation of what I taught last spring, and sortof a new class since we'll be taking things a different direction.

Last spring, I covered basic pre-programming skills: number systems + logic and data representation. Later we went into electronics since that meshed well with what was being taught in the students' regular class.

This year I'll be doing (roughly) the following:
  • (Review) Pre-programming skills: number systems and logic
  • How computers work and computer architecture
  • Computer programming (embedded systems like GBA and Arduino, then HTML+JavaScript)
The rest of this post is a rough outline of what I covered in the first class.]

(1) Welcome - Introductions and getting settled.

This was a simple intro and an overview of what the goals are for the class. These goals are:
  • Get everyone to understand how computers work
  • Get everyone to understand how to write a basic program

I also emphasized that the class will be working together to learn these things. We're not going to zip along and leave people behind, so it's in everyone's best interest to collaborate and help each other out.

My goal is to make all of this seem easy. Your goal is to work together and let me know if anything doesn't make sense.

(2) Roadmap - What we'll be covering in this class.

As a roadmap for the class, I drew (something like) the following on the whiteboard:

Java AppC# AppHTML/JavaScript
C/C++ AppJVMCLRBrowser
Operating System (Windows, Mac, Linux)
Kernel, device drivers
~~~~~~~~~~~~~~~~~~~~
CPU, Memory, I/O Devices...
Functional units
Logic gates
Transistors
Electricity

Everything above the squiggly-line is software and everything below it is hardware.

Most desktop applications (like Microsoft Office or Adobe Photoshop) that you buy today fall into the "C/C++ App" bucket in the above diagram (although there are many other languages that can be used as well). You can also find a lot of applications written in Java or C# as well, and many websites make use of JavaScript in addition to basic HTML.

Computer classes will typically spend all their time in one of the upper "programming language" boxes: C, C++, Java, C#, JavaScript or whichever language the class is built around. There's nothing particularly wrong with that - it's perfectly valid to choose a language and focus on the parts of programming that are "above" this diagram (like data structures and algorithms).

But notice how many layers there are between the programs you write and the underlying hardware. You have at least the OS and you might also have one or more virtual machines (like the Java Virtual Machine - JVM) or an application (like your web browser).  Rarely do programming classes attempt to describe what it going on in these lower layers, and rarer still are those that attempt to describe what's going on in the hardware layers.

But this class is different. In this class we will:
  • Start from the bottom and work our way up (for the most part)
  • Explore embedded systems (like the GBA, Nintendo DS and Arduino) so that we have fewer layers between the software we write and the hardware we use.
This will help us to actually answer the question: "How do computers work?"

We'll still do some work at these upper layers as well. Once we'll built the foundation, we'll start covering higher level languages and discuss more advanced programming concepts.

(3) So, How do computers work?

I asked the class, does anyone know? How would you describe it to a friend who was curious to know how they worked?

The answers to this question typically fall into one of three categories:
  • Magic gnomes
  • CPU + Memory + "other stuff"
  • '0's and '1's
What's interesting about these answers is that none of them really tell you anything useful about how a computer works.

Compare this to common answers for "how does a car work?" and you can see the difference. Yes, some people will simply say "I don't know" or have stop at an "engine + wheels" description, but a large number of people will be able to talk about "gasoline + pistons + tiny explosions + crankshaft to make rotary motion + wheels". It's not perfect, but there's enough information there to understand why you need put gasoline in a car and change your oil regularly.

Going back to the computer descriptions above, and you'll see that they are (at best) the "engine + wheels" variety. The last 2 (technically correct) descriptions are really not much better than the "magic gnomes" description - none of them make you feel like you understand what's going on.

This is why we'll be focusing (at least at the beginning) on "how computers work" rather than "how to use computers" or "how to program computers".

(4) Binary (review)

[This was a review from material covered at the end of last year, so we went pretty quickly over this.]

I took out a bunch of counters - I use glass counter beads because I like the feel - and dumped a bunch on the table in the front of the class.  How many glass beads do I have?

I forget the exact number, but it was something like 25. So I write '25' on the board.

What are some other ways of recoding this number?
  • Tally marks: using vertical lines or 正 (in China, Japan and Korea)
  • Roman numerals: XXV
  • Chinese/Japanese characters: 二五 or 二十五
  • Arabic (middle-eastern) numerals: ٢٥
  • Scientific notation: 2.5e1 or 2.5 x 101.

What are the advantages/disadvantages of each?
  • Tally marks: Good for counting, keeping score in a game (easy to add 1). Bad for numbers greater than ~50. No way to represent 0.
  • Roman numerals: Better than tally marks for numbers greater than 20. Still not good for numbers larger than ~10,000.
  • Scientific notation: Useful for very large and very small numbers.
  • Chinese/Japanese/Arabic: Note that the actual symbols don't matter, they're all valid for representing numbers.

The number system we commonly use is a "positional number system" called decimal or base-10. Key features of our number system:
  • Uses 10 distinct symbols, including a symbol to represent zero.
  • Positional: Symbols are arranged in positions based on powers of 10: ones, tens, hundreds, ...
  • Each symbol changes meaning based on its position. '3' in the ones position means 3, but in the tens position is means 30.

Why ten? We could have used any other number. In fact, some cultures have used 12 instead of 10 because 12 is 'more interesting' (evenly divisible by 2,3,4,6, whereas 10 is evenly divisible by only 2,5). We still have remnants of 12 in our culture (hours on a clock, dozen eggs, ...).

What about base-8 (for octal). That would have 8 symbols: 0,1,2,3,4,5,6,7.  Each position would be based on 8: ones, eights, sixty-fours (8x8), ...

How would we represent this number of counters (remember we had 25) in octal? 3 groups of 8 + 1 left over = 3 in the 'eights' position and 1 in the 'ones' position = 31.

What about base-2 (for binary). That would have 2 symbols: 0,1. Each position would be based on 2: ones, twos, fours (2x2), eights (2x2x2), sixteens (2x2x2x2), ...

We were running out of time, so we didn't have a lot of time to practice, but I gave each student a handful of counters and they each practiced counting in decimal and octal and binary. This was review from last year and most remembered how the process worked.

Key takeaways:
  • The positional number system was a key cultural advance. Requires a symbol for zero to work.
  • The choice of 10 was arbitrary - any number base could have been used.
  • Binary uses only 2 symbols 0,1, but it can represent any number that you can in decimal. It just requires more digits.
  • Computers do, in fact, use binary for everything. How this works will be covered later.

Ah, well. Out of time.... This is where we'll pick up next week as we do a bit more review of number systems...