Skip to content

Teaching computational thinking part 2

December 11, 2010

In order to teach computational and algorithmic thinking, I think you have to start, much as I hate to admit it, with a programming language. Since, if you can’t speak the language of a computer, you aren’t going to have much success in getting to do anything.

My criteria for a good teaching language:

  • It must be used by professionals to solve real world problems. This eliminates LOGO, my beloved Karel ++, and BASIC and all its variants. While some of these languages might be useful for very young children, I think once you get into middle/high school, you really should be able to take on a language that is going to have legs.
  • It must be reasonably easy to read. Bye bye C++ and your iostreams and overloaded operators.
  • It must be free. This axes mathematica, much as I love its no longer necessary arcane syntax.
  • It must be easy to set up. You shouldn’t have to spend hours installing an editing environment or complier, and you shouldn’t have to set up a webserver to test your code. So PHP is out, as much as I like it, and want to get better in this language.
  • It must be powerful and easy to use. You shouldn’t have to start off programming from the command line, or making ascii art. You should be able to hop right into executing programs with minimal hassle, you should be able to handle writing and reading from files and to the screen without calling a bunch libraries, and basic graphics should be as simple as writing sphere(). This loses JAVA in my view.

I’m not going to make a federal case for which language to go with, that’s against my point that we should be focusing on teaching computational and algorithmic thinking, not programming, but I think there’s a decent case to be made for learning python. Python meets all the criteria above, and really is a modern, powerful high level language used heavily in science and industry, but at the same time is very easy to read and user friendly.

The next thing is to find a good source of problems. When left to their own devices, Computer science textbooks, just like math textbooks, are likely to come with psudeocontext problems that don’t really inspire engagement. Luckily, most of our subjects are filled with deeply engaging problems. Here are just a few I’m thinking of:

  • How do you get to the moon? Plot a course of a flight for a spacecraft leaving the earth and landing on the moon. How much fuel is required to make this trip?
  • Shakespeare-How different was Shakespeare’s vocabulary from that of his contemporaries or modern day. Analyze the complete works of Shakespeare, works by contemporaries, and then some modern day authors, and compare and contrast their vocabularies.
    Similar work is being done by historians at George mason, who evaluated the frequency of words used in the titles of British Victorian novels, with surprising results—despite the era’s preoccupation on evil, the word hardly appears in book titles.
  • Plane tickets and gas prices. How is the price of a cross country flight correlated with jet fuel prices? Build a program to scrape price data from an airline website and a Jet Fuel Price monitor.
  • All those great project euler problems that seem to be keeping everyone on the twitterverse busy.

But again, as I saw with the synergy class, the real problems are the ones that students will come up with on their own.

If you want to see an example of how computational and algorithmic thinking can transform our subjects, the best example I’ve seen is the Matter and Interactions curriculum, which is hands down the best calculus based introductory physics curriculum I’ve ever seen. Here’s a curriculum that shows the power of computational thinking by allowing students to go beyond solving simple textbook problem—in what other class do you write a program to plot a the trajectory to the moon during the first month of class? Or have the kids build a model of a solid as a series of balls connected by springs, and then use that model to explore the transmission of sound through solids?

In my next post, I’ll discuss how I’m trying to do this specifically in my 9th grade honors physics class, with the help Danny Cabellero, a 5th year physics grad student at Georgia Tech, who has been instrumental in helping to bring some of the exercises they use with M&I students at tech down to a level appropriate for 9th graders (and if you happen to be at a university looking for an incredibly promising new physics faculty, Danny is graduating very soon, and you’ll have a hard time finding someone with a better understanding of physics teaching).

I’ll close with a couple of other articles I’ve stumbled across that further make the case for teaching computational and algorithmic thinking outside of computer science classes.

Kevin Carey wrote a fascinating commentary in the Chronicle of Higher ed about how his early exposure to programming has continued to help him throughout his life, even though he never pursued a major or career in computer science. Some quotes:

Coding taught me the shape of logic, the value of brevity, and the attention to detail that debugging requires. I learned that a beautiful program with a single misplaced semicolon is like a sports car with one piston out of line. Both are dead machines, functionally indistinguishable from junk. I learned that you are good enough to build things that do what they are supposed to do, or you are not.

Writing, in other words, is just coding by a different name. It’s like constructing a program that runs in the universal human operating system of narrative, because, as Joan Didion once said, we tell ourselves stories in order to live. Authors adhere to a set of principles as structured in their own way as any computer language. Publications worth writing for insist on Galilean standards of quality and concision.

At the same time, Mark Guzdial, a computer science professor at Georgia Tech, wrote this equally fascinating blog post, Computational Science needs CS Education‚ which explores a number of fascinating trends, including the statistic that for every 1 student in computer science, there will be four more who will need computer science in their careers, and a study that found that many of the people who are programming as part of their jobs, almost all of them are self taught and lack basic CS knowledge and terminology, like how to read code. An obvious solution would seem to be teaching computational and algorithmic thinking in classes outside of computer science, but Mark sees problems here, since many faculty are uncomfortable with teaching computational and algorithmic ideas, or not good at it. I think this is indeed a problem, and I don’t think I really have a solution yet, but I do see lots of hope in the work I’m doing in my own class, and some of the work being done by the fine folks at google, who have cooked up dozens of lessons in mathematics to that introduce students to computational thinking using python.

About these ads
4 Comments leave one →
  1. February 2, 2013 9:22 pm

    Good series of posts. Kudos.

    “It must be used by professionals to solve real world problems.”

    I don’t see why. As students get close to graduation, maybe, but in intro courses it may be better to use multiple languages.

    Gassy suggested Scratch. I agree. The nice thing is that the Scratch interface is so simple, that students don’t waste cognitive effort on mechanical detail.

    Then move to Python. That will help student generalize ideas like IF statements. Generalization is what leads to transfer.

  2. William Moates permalink
    April 18, 2013 2:05 am

    Last year, I taught some 13-year-olds how to program using Warren Sande’s great book, _Hello World!_, which is published by Manning. As a teen, I cut my teeth on BASIC in the early 80s, then went to college in Math & Physics before returning to Computer Science in a Master’s program several years ago. So, like you, I’ve learned several languages. I agree with your choice of Python, for the reasons you mentioned: scientists and real-world developers use it (Civ IV was written in Python), the Hello World program is as easy to read in Python as it is in BASIC, and with Python’s built-in interpreter, you can try out simple expressions without having to compile a program. And because of the interpreter, you can write code on an iPad–despite Apple’s walled garden policies–because the code isn’t executed by the OS, but by the Python coding app. On my iPad, I have written over a dozen Python files to solve the Project Euler problems, so I can attest to its usability as a coding platform.

    I have seen some demonstrations of Scratch, but I haven’t used it before, or tried to teach it, so I can’t effectively critique it, but it looks like a programming language aimed at middle-schoolers.

    I’m glad you’re thinking about this and working towards solutions. Keep up the good work!


  1. Teaching computational thinking part 3 « Quantum Progress

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 239 other followers

%d bloggers like this: