An Introduction to General-Purpose Programming

In this session we will do a hands-on activity with Sonic Pi. Sonic Pi is a tool for writing music with Ruby (a text-based general-purpose programming language). This activity will introduce some core programming concepts: sequencing, loops and selection.

An Introduction to General-Purpose Programming, with Sonic Pi (Powerpoint Presentation)

Learning to Program

Visual Programming languages, such as Scratch, provide a beginner-friendly way of learning key programming concepts. After learning the basics of programming in a visual language, you (and your students) may want to progress to learning a general-purpose language. General-purpose languages will allow you to do more with programming than visual languages, however these can be more challenging to learn. In the Digital Technologies curriculum, students are expected to have some experience with general-purpose programming languages in Years 7 and 8.

Learning to program in a general-purpose language can be overwhelming: there are many different languages you can learn, and resources to learn from. There are a few general-purpose languages that are commonly recommended for beginners: Python, JavaScript and Ruby. Your choice of language should really be guided by what you (and your students) want to do, as each of the languages has its strengths and weaknesses for different applications. This website may help you find the language is suitable for the project you want to complete. We have also included some resources that we recommend for learning programming, in the Programming Resources section of this page.

The skills and concepts you learn when writing code (both in visual and general-purpose languages) are transferrable between different languages. Professional Software Engineers are usually expected to be very familiar with 2 or more programming languages and to be able to learn new ones quickly. They are often able to do this because they have learned the core concepts of programming, they focus on problem solving and are “computational thinkers”.

Sonic Pi

Sonic Pi is a program that allows you to write music with code. Like Scratch, it’s easy to get started with this tool, but you can also write quite complex programs (compositions) using it.

Sonic Pi was created by a Computer Science researcher, Dr Sam Aaron. Dr Aaron also worked with educators to develop lesson plans for Sonic Pi (see the Links section below) that map to the UK’s Computing curriculum (the equivalent of Australia’s Digital Technologies curriculum).

Activity

If you complete this activity, you may be interested in exploring some of the programming resources in the next section. You could also try building a musical instrument (for example a piano, guitar or drum kit), using a MaKey MaKey and Scratch.

Programming Resources

There are many resources available for learning programming. For some in-depth responses to some frequently asked questions about learning programming, see the Reddit learnprogramming community’s FAQ. In this section we have included resources for a few languages commonly recommended for beginners: Python, Ruby and JavaScript.

There are four free online books available for learning Python from Invent with Python.

Ruby is well known for being the language used in the web framework Ruby on Rails. If you (or your students) are interested in building web applications and know a little about web development already, Ruby on Rails is a great tool to use for this.

Eloquent JavaScript is a free online book for learning JavaScript. The Khan Academy Computing Platform teaches JavaScript as part of its Computer Science lessons.