Thursday, September 25, 2014

Raspberry Pi for the Beginner

In some of my initial posts I talked about the growing movement to teach kids how to program.  As my own children get older I’ve begun considering how to introduce this skillset.  While researching possibilities, I came across the Raspberry Pi.  Small and inexpensive, credit-card sized computers like the Pi provide users with a powerful and versatile platform to tinker and explore.

Although there are a number of microcomputers on the market these days, arguable one of the most well known is the Raspberry Pi.  Created by University of Cambridge’s Eben Upton, the Pi was developed to help individuals (and more specifically kids) to learn about the basics of computing.  “The problem, they found, wasn't the curriculum but the computers themselves, which had become too advanced and too expensive to experiment with. Upton didn't want a computer programmed to work straight out of the box but, instead, a computer begging to be programmed” (Arndt, 2013).  As home PCs became more popular and replaced Amigas and Commodores, the need to understand programming and even basic computer skills was no longer a requirement.

While price is a definite selling point for the Pi, one of the greatest strengths of this device is it’s near limitless flexibility.  The micro-PC can be used for general purpose computing, learning how to program, or as a powerful project platform.  “Whether you just want to watch videos and surf the web, or you want to hack, learn, and make with the board, the Raspberry Pi is a flexible platform for fun, utility and experimentation” (Richardson & Wallace, 2012).  Given this wide array of possible uses, it was difficult to decide where to begin.  In the end I chose to simply hook up the board to a monitor and explore.  



Given the memory limitations inherent to a device of this size, Upton opted for a streamlined Linux distribution to run the system called Raspbian (Raspberry Pi + Debian Linux = Raspbian).  This decision meant the Pi Foundation could keep their prices low while maximizing the hackability of the platform.  It also meant I needed to dust off my Linux knowledge.  Luckily, Raspbian comes with the Lightweight X11 Desktop Environment (LXDE) GUI installed which meant an easy transition back into Linux.

With the system up and running, peripherals recognized and drivers loaded, my next stop was Python.  One of the preloaded features of Raspbian is an entry-level programming language created by Guido van Rossum.  Rossum is a kindred spirit of the Raspberry Pi creators in that he designed Python to be used as a gateway language for kids.  “In 1999, van Rossum put together a widely read proposal called ‘Computer Programming for Everybody’ that laid out a vision for an ambitious program to teach programming in the elementary and secondary grade schools using Python.”  Because Python is an interpreted language, users can write a program or script directly (sans any machine code compiling).  “The Python interpreter can be run in two ways; as an interactive shell to execute individual commands, or as a command line program to execute standalone scripts.  The integrated development environment (IDE) bundled with Python and the Raspberry Pi is called IDLE” (Richardson & Wallace, 2012).  

The other major program included with Raspbian is Scratch.  Developed by the MIT Media Lab’s Lifelong Kindergarten group, Scratch is billed as a “new way of teaching programming to young people.  Programs are constructed from colorful blocks, each of which performs an operation.  The self-contained blocks eliminate the syntax problems that stymie many first timers using text-based programming languages” (Richardson & Wallace, 2012).  This creates an interactive and fun programming environment where young programmers (and the young at heart) can see the effects from coding in real time.



Given the potential of this system I’m looking forward to seeing what my kids can do with it.  With the oldest only being 4, luckily I may have another year or two to learn it myself before they take over.

References
Arndt, R. Z. (2013). The $35 computer. Popular Mechanics. Retrieved from http://www.popularmechanics.com/technology/how-to/tips/35-computer-the-vast-possibilities-of-raspberry-pi-15294806

Richardson, M. & Wallace, S. (2012). Getting started with Raspberry Pi. Maker Media: Sebastopol, CA.