Using the Raspberry Pi in introductory programming

The problem with computer science is that while the computing field has moved in leaps and bounds over the past 30 years, many institutions are still approaching introductory programming in the same way that it was tackled 30 years ago. Or maybe worse. For years good programming languages designed for teaching programming were forsaken for the latest and greatest languages. Languages like Java and C were never meant to be used to teach programming concepts – but that rant is for another post. While programming languages became bloated, computers themselves have come to resemble black boxes, with students having little notion of what really happens in the “guts” of a system. The realm of the command line, the use of shell scripts, and processing languages such as awk have drifted off into the mists of time. In a matter of a decade society has become mobile-centric with respect to computing devices. Traditional introductory programming courses have focused on the use of desktop to teach students the art of programming. The problem with such traditional approaches is that they do not invite exploration, or motivate interest. What has been lost in the last 20 years? – the art of tinkering with machines. Yet the idea of exploration cannot be readily achieved by trying to develop “apps” in an introductory curricula either – such a process requires a broad understanding of the process of software development. Introductory programming is about learning the basic tenets of programming: problem solving, algorithm design, programming language constructs, syntax, debugging, testing, usability, etc. Is there a happy medium? Maybe – the Raspberry Pi.

Rpi

The Raspberry Pi

A credit-card sized computer (well marginally bigger – it won’t fit in your wallet), is inexpensive and provides a platform for students to start exploring the “machine” – it’s basically a processor board with a bunch of peripheral connections – if students want a case they have to buy one – or make one themselves. They have to learn how to interact with the device, both through physically connecting it to I/O devices and through building simple devices which can be controlled through the GPIO interface. Students also have to explore the lower level of the machine – the command line interface. By tinkering with the Pi, they gain a better understanding of the inner working of the machine.

rpi_chip

The heart of the Pi

We have introduced the Raspberry Pi as the system used in both of our first year programming classes at the School of Computer Science at the University of Guelph. The first programming course, has an enrolment of over 700 students, and may be one of the largest applications of the Raspberry Pi in an introductory class in all of North America.

rpi_gpio

The GPIO interface

Here’s a preliminary version of a paper we recently published: Making Programs With The Raspberry Pi

Citation information: Wirth, M., McCuaig, J., “Making programs with the Raspberry Pi“, in Western Canadian Conference Computing Education, May 2–3, 2014, Richmond, BC, Canada (published by ACM).

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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