14 October 2011


Google Code-In is an open source development contest for 13-17 year old students. Similar to Google's Summer of Code, but targeted at younger programmers.

If you know any High School students who are interested in programming or curious to get involved in open-source projects, you might want to point them to the announcement on Google's Open Source blog.

The participating projects haven't been announced yet, but some of the tasks will include: coding, documenting, researching, training, translating and user interface design.

Timeline:
November 9: Announce participating open-source projects
November 21: Google Code-In begins
January 16: All tasks must be complete 

[Repost from: Google+]

13 September 2011

How to explain programming to young children

A recent article on Slashdot had an interesting comment titled Here's my way of explaining "programming" authored by "Sun" (or Shachar) [minor typos corrected]:

Caveat - I have never actually tried it, and I developed it for adults. I still think it might work with 2nd graders (probably too complex).
Ask for a volunteer. Write a bunch of numbers on the board, and tell the volunteer to sort them.
Explain that this is not programming.
Now, cover the volunteer's eyes, write some more numbers on the board, and tell him to tell you to sort them. Allow asking "what is the first number" and such.
Explain that this is, also, not programming.
Now, tell the volunteer to tell you how to sort the numbers before they are written on the board. Explain that once the numbers are written on the board, you will not hear any comment from him. Write the instructions down on the board. When they are done, write down numbers and carry the instructions out. Try to pick numbers that won't work with their instructions. Allow the class to fix the instructions, but any time they do, restart the whole thing.
This is programming.
Shachar

While I agree that it seems a bit involved for a 2nd grade classroom (where making a PB&J sandwich might be more appropriate), this seems like a good approach for middle school and up.

Technically, this is demonstrating how to create an algorithm, but creating an algorithm to solve a task is a big part of programming. Once the algorithm is done, the programmer must then implement it efficiently in a programming language.

A variant of this would be to pair up the students and give each group a set of cards to sort - cards should be a bit easier for the blindfolded student to work with. After each group has created their sorting algorithm, the algorithms can be shared with the class and you can run through examples to improve them collaboratively.

11 September 2011

K-8 curriculum overview for computer skills

From the If-I-Ran-The-World Dept...

So here is a rough outline of my ideal computer skills curriculum for K-8, with a focus on preparing students for programming in middle school. I'm assuming roughly 1.5-2 hours per week and ~32 weeks in a school year. For K-5, the items are more "computer literacy" than "computer science", but that changes in middle school (grades 6-8) where the focus switches to teaching how computers work and how to program.

Note that, when assigning a lesson to a grade/age, I tried to select a grade where the vast majority of students would be ready and able to understand the concepts. Thus, the grade-level specified is meant to be appropriate for a classroom setting.

When homeschooling or teaching an individual, you may find that the student is ready for this material at an earlier age (often 2-3 years earlier). The best learning environments are those that can adapt to the students' interests, so feel free to move things earlier as needed. But note that this request to move the lesson earlier needs to come from the student.

For classrooms, if you prefer to think in terms of Introduce/Reinforce/Master, then the grades listed here are a cross between Introduce and Reinforce.

I'm using US school grades so add 6 to get an approximate age (1st grade is roughly 7 yrs old).

Elementary School

The key lessons here are to learn how to use computers effectively and to be exposed to the underlying math/logic principles that will be used in middle school.

At the end of 5th grade, the students should have the following skills:
  • Know how to interact with a computer using mouse and keyboard
  • Be able to save/load files from an app, and to organize their files in directories
  • Understand non-decimal number systems, specifically binary numbers.
  • Understand basic boolean logic, specifically AND, OR, XOR and NOT
  • Have a general understanding of how things are stored on a computer
  • Be able to use a web browser and perform effective internet research
K - 2nd grade


During these years, the student should develop basic computer interaction skills.
  • Mouse: moving, pointing, clicking, selecting, double-clicking, dragging, ...
  • Keyboard: basic typing skills, 
  • Parts: name the various parts of a computer
3rd grade

Focus on using computers as tools.
  • Productivity apps: word processor, spreadsheet
  • Keyboard shortcuts for common operations: (cut/copy/paste/undo, find/search)
  • Understand file types: txt, doc, gif, png, mp3, avi, ...
  • Understand where files are stored: locally, on file server, in cloud
  • Maintaining an account: passwords, logging in/out, simple security
  • Web browser - using and navigating
4th grade

More work with using computers as tools, but start building the foundation for
computer lessons in later years.
  • Email - etiquette, subject lines, spam & chain-mail, attachments, privacy, To/Cc/Bcc
  • How to perform internet research. How to evaluate a website's reputable.
  • Ethics: copyright, fair use and giving appropriate credit
  • Web browser - uploading/downloading/sharing files
  • Security: viruses, worms, trojan horses
  • Security: passwords, privacy
  • Number systems: roman numerals, tally marks, zero
  • Number systems: positional number systems (decimal, octal, binary, hexadecimal)
  • Curriculum-Link (Math): number systems
  • Curriculum-Link (Math): plotting x-y values
5th grade

Less focus on how to use computers, and more focus on what's going on behind the
scenes.
  • How data is encoded on computers (text/char-sets/unicode, colors/rgb/hsl, digitizing analog/digital, audio, video, ...)
  • Compression/decompression of computer files (zip)
  • Security: encryption
  • Difference between text editors and word processors.
  • Privacy: browser history, cookies, caches
  • Privacy: what happens when personal info (or password) is comprimised
  • HTML/CSS: create a set of linked webpages (on local machine) using a text editor.
  • Learn how to structure a project with many (HTML/CSS) files.
  • Boolean logic: AND, OR, XOR, NOT
  • Curriculum-Link (Science): colors and light, additive/subtractive color models
  • Curriculum-Link (Math): prime numbers (encryption)
Middle School

During middle school, the students should be introduced to programming and learn how computers work. Optionally, they should learn about electronics and robotics (although these lessons tend to require extra equipment, so it's not always possible to include them).

At the end of 8th grade, students should:

  • Understand why computers use binary
  • Have been exposed to the "big ideas" that de-mystify how computers work:
    • How computers perform computation
    • How computers remember things
    • How computers perform actions in sequence
  • Know how to write simple programs in at least 2 different programming languages
  • Be able to construct a small electronic project on a breadboard

6th grade

In 6th grade, the students should be introduced to all the basic programming concepts: variables, flow control, functions, arrays, and so on.

  • Visual programming: Scratch or variant - variables, flow control
  • Choose two languages from: [Python, Javascript, Processing] - functions, arrays
  • Interact with the computer using the shell/cmd-prompt
  • Wildcards and simple regular expressions
  • Internet: How the internet works (to route traffic, overview of DNS)
  • Privacy: where your internet 'footsteps' are logged (routers, ISPs)
  • Security: botnets and why you should apply security patches
  • Algorithms: searching, sorting
  • Curriculum-Link (Science): Write spreadsheet functions for data analysis

7th grade

Continue building programming skills by expanding into more languages. Introduce basic electronics and explain how computers work.

  • Choose remaining language from: [Python, Javascript, Processing]
  • Electricity: very simplified - focus on Voltage - just enough to understand transistors
  • Transistors: what they are and how they work (CMOS)
  • Logic gates: built from transistors (NOT, NAND, NOR)
  • How computers calculate (addition using logic gates)
  • How computers remember (memory latches using logic gates)
  • Negative numbers in binary (2's complement)
  • Basic digital electronics with Arduino (breadboards, LEDs, servos, ...)
  • Optional: Robotics (if you have the resources)
  • Curriculum-Link (Science): Electricity (done properly with V=IR, ...)

8th grade

More advanced programming and managing larger projects.

  • Java (using Greenfoot or BlueJ)
  • Do at least one "large" programming project
  • Project management: divide large task in to smaller subtasks
  • How memory is allocated (stacks, heaps, fragmentation)
  • How functions are called (call stack, recursion)
  • Data encapsulation, classes and inheritance
  • Regular expressions: grouping and matching, greedy vs. non-greedy
  • Floating-point numbers: representation and implication for scientific calculations
  • More data structures and algorithms: stacks, linked lists, hash-tables, trees, graphs, ...
  • Curriculum-Link (Math): Trigonometry
  • Curriculum-Link (Science): Using regexps to process data files
  • Curriculum-Link (Science): Gravity, acceleration (for jumping in a game)


05 June 2011

A Computer Scientist's Lament

Here are a couple of recent articles on learning CS that I found interesting because, rather than focusing on the classroom setting or enrollment numbers, they talked about the challenges facing a motivated self-study student.

In Andrew Binstock's "Lax Language Tutorials", he discusses the current state of programming language tutorials. In summary, most books being published appear to be confused between an introductory tutorial and a treatise on every feature of the language. This leads to absurdly large volumes that may be a bargain in terms of dollars-per-page, but are overwhelming for anyone who just wants to get started and learn the basics.

To paraphrase Messrs. Twain and Pascal:
"I didn't have time to write a concise programming language tutorial, so I wrote this bloated monstrosity instead."
James Somers' article in The Atlantic, "How I Failed, Failed, and Finally Succeeded at Learning How to Code", describes the issues he had with these language tutorials:
For a while I thought I didn't have the right kind of brain for programming. Maybe I needed to be better at math. Maybe I needed to be smarter.

But it turns out that the people trying to teach me were just doing a bad job. Those books that dragged me through a series of structured principles were just bad books. I should have ignored them. I should have just played.
And then continues with an indictment of the AP's CS curriculum:
Nobody misses that fact more egregiously than the American College Board, the folks responsible for setting the AP Computer Science high school curriculum. The AP curriculum ought to be a model for how to teach people to program. Instead it's an example of how something intrinsically amusing can be made into a lifeless slog.
He also makes reference to Paul Lockhart's A Mathematician's Lament (which comments on how uninspiring most math instruction has become) and draws comparisons between math and CS instruction.

Somers persevered with his attempts at programming and found inspiration in the programming website Project Euler, but it's easy to imagine that many of these motivated students simply give up, thinking that programming is too hard for them.

22 May 2011

Minibloq ≈ Visual Programming + Arduino

Minibloq is a Kickstarter project to create a freely-available visual programming environment for the Arduino - something like Scratch for Arduino programming.


The good news is that they've already reached their funding goal so they can go ahead with this project. I'm looking forward to playing with this later this year.

13 April 2011

Arduinos in Museums


Over the past few years, museums have switched from expensive general-purpose computers to cheap (~$30) Arduino microcontrollers to run the exhibits:
 “Hackers and geeks have been doing this for years, building all sorts of cool robots and interactive experiences, but now it’s become so simple and inexpensive that artists and designers have adopted it, too.”
...and students.
“The two most important introductions for art in the past 20 years have been the Arduino and Processing,” explained Paola Antonelli, senior curator in the Department of Architecture and Design at the Museum of Modern Art.
Sounds like an endorsement of Processing for Intro to CS classes.

03 April 2011

How to publish your teaching materials

During this past SIGCSE, I was involved in a couple of discussions about how one finds CS teaching materials on the web. At one point, the conversation turned to how one goes about publishing these materials.

The background for this discussion was base-sixteen.org - a website that I'm working on to catalog (and organize, somewhat) the CS teaching resources that are available on the internet. The question was whether or not this should be a "catalog" (with links to resources that were hosted elsewhere) or a "repository" (which hosts the material on the same site).

There are pros and cons to each approach:

  • Because a repository keeps a local copy, the resource will still be available even if the original site goes away. However, this local copy will be out-of-date if the original site is updated (unless the repository is updated as well).
  • A catalog has the opposite problem. It will always point to the most recent version, but if the site goes away then the resource will no longer be available (unless it was cached elsewhere).

There are other issues as well, such as whether or not a repository has the legal right to host some material, but the main concern in this discussion was for dealing with materials that are here-today, gone-tomorrow.

This is a particular problem for things like syllabuses and lesson plans because these materials are often hosted on a university (or college, or high school) website which is managed by someone other than the instructor creating the materials.  When the new school year rolls along, the webmaster might decide to clean out all the old "outdated" files. Even if the teacher is in control of their part of the website, when they move on or switch schools the materials will go away with the person (hopefully to reappear somewhere else, but the link is still dead).

There are a number of different approaches for dealing with this, but I was interested primarily in the "webmaster deleted my files" problem because this is something that can usually be avoided by simply publishing the documents on the web yourself.

Of course, creating a website to host a few documents is way too much money and work, but there are far easier (and free!) ways to be in control of your published documents. Companies like DropBox and SpiderOak allow you to host and share documents in the cloud, or you could publish directly from web-document editors like Google Docs.

I created a small document that summarizes some of the ways you can publish your documents on the web:

https://docs.google.com/document/pub?id=1QRBBrU9ac8A0SSkhx0HKTtvj21Ja-ynMetY2rj_0hcQ
(Isn't that a great URL? Well, that's one of the downsides of having someone else host your material ^_^)

It's published as a Google Doc (rather than in this blog post) so that I can edit and update it as I discover new services. If you have a preferred way of publishing that I don't mention, please let me know so that I can update the document.