[Level 1] Computer Science Concepts: Programming Languages
What is this Resource?
This document was prepared by Sumant Murugesh, Tim Bell and Vanja Venrooy at the University of Canterbury. It is not an official document, but is offered as an evolving guide to the resources that are available for teaching the new material in NCEA Digital Technologies (currently focussed on the Programming and Computer Science strand). The structure has been based on various versions of the Body of Knowledge, proposed Standards, and Teaching and Learning guide; the material comes from an extensive search for relevant resources. It is our hope that this resource will evolve based on feedback from teachers, and ultimately end up as teaching plans that are built on the resources. Feedback can be sent to tim.bell [at] canterbury.ac.nz.
Achievement Standard
The resources on this page relate mostly to the Digital Technologies Achievement Standard 1.44/AS91074 (Demonstrate understanding of basic concepts from computer science)
Objectives
Demonstrate an understanding of the distinguishing concepts of algorithms and programming languages from Computer Science and Software Engineering
- Understand what a programming language is and the role and characteristics of programming languages
- Understand programming language concepts such as high level languages, machine languages, interpretation and compilation
- Explain the need for programs to translate between high and low level languages
- Compare and contrast programming languages, natural languages and high and low level languages
- Explain the ways in which high level languages are translated into machine languages
- Understand the concept that programming languages are precise
Context
The key thing at this level is to be able to understand the need for programming languages to be able to communicate with a computer and program a task. An introduction could be done by looking at the history of programming languages (e.g. How did we get here? A brief history of OOP). Students can try to write simple programs using some form of structured English (Deb Sweeney's Peanut Butter and Jelly Programming). To demonstrate the concept that programming languages are precise, try lesson plans such as Computers only do what they are told or the CS Unplugged activity in programming languages. For introducing low level languages, try Low Level Languages as a guide.
Ideas for Teaching and Learning Activities
- Compare the speed of the same program being run on compiled and interpreted systems
- Download and install an open source application from a web repository, compare the different versions provided (source vs various precompiled versions), and explore the differences between high level languages, low level languages, and machine language, including issues such as size, portability and ease of installation.
- If students are concurrently working on programming, a discussion of the programming environment they are using can lead to a discussion of compiling, interpreting, and the different kinds of languages.
Our Picks
Here is a list of resources we have picked from the comprehensive list below that were either developed for high school use or can be easily adapted for the purpose.
- Samuel Williams compares Basic, C++, Haskell, Python, Ruby, PHP and many others at programmingdojo.net.nz
- Samuel Williams has a collection of Programming Language Posters
- David Bolton's explains a Programming Language, Compiler, & the difference between Compilers and Interpreters
- Computer World has a great article on The A to Z of Programming Languages
- doit Information Technology Course offers an excellent online course in Computer Languages
- Al Lukaszewski from About.com compares Python with Ruby, Java, PERL, PHP in his arctile What is Python?
- Wolfram Rösler has compiled The Hello World Collection, the simple "Hello World" in all known languages!
- 99 Bottles of Beer is the song programmed in different programming languages
- TeachICT's has a complete mini website dedicated to programming languages.
- TeachICT's poster activity to guess which programming language called What am I?
- Richard Bowles has a section dedicated to explaining Compilers and Interpreters
- CS Unplugged Activity 12 – Programming Languages
- Richard Buckland has a greatly entertaining video lecture in Machine Code
-
mystoreful's presentation on What a Compiler is?
- saylor Computer Science course: CS404: Programming Languages offers unit plans with useful readings
Unit Plan
A Unit Plan for teaching that uses some of the above resources that relates to this standard is attached as a PDF at the bottom of this resource page.
Comprehensive list of resources that relate to this standard
The resources below are a mixture that were developed for a varied audience ranging from high school students to university undergraduates, therefore we have attempted to classify the resources in terms of their readiness to be used by teachers. There are those that aim to convey a Basic understanding of the concepts and those that are Advanced and therefore might assist teachers with their professional development activities.
Online Guides: Basic Resources
- Wikipedia: Educational Programming Language: For a comprehensive list of languages used in Education
-
Wikipedia: Programming languages, High-level Programming Language, Low-level Programming Language
-
Wikibook Entries: Machine Level Structure, Machine Operation and Assembly Language
- Google Directory: Computers > Programming > Languages > Comparison and Review provides various comparisons of different programming languages
-
Teach ICT has the following resources:
- doit Information Technology Course offers an excellent online course in Computer Languages
- programmingdojo.net.nz developed by Samuel Williams is a comprehensive website that compares different programming lanugage such as Basic, C++, Haskell, Python, Ruby, PHP and many others.
- Brian Shelburne has a short section on Programming Languages discussing levels, types and language translation
- Samuel Williams has a collection of posters at Programming Language Posters. Here the same program has been written in many languages for easy comparison of aspects like Lines of Code (LOC), Syntax, Semantics and Features.
- Trevor Gosbell (at PC Update Online) has two excellent articles:
- Eight Things Programming Languages Can Do Part 1 (April 2004): This article illustrates eight basic programming concepts with examples in five programming languages: Java, Perl, Python, REBOL and Scheme. It will enable the reader to make comparisons and generalisations. Part one addresses the first five ideas: output, variables, expressions, input, and selection. Part two covers lists, subroutines, and repetition.
- Eight Things Programming Languages Can Do Part 2 (May 2004): The above ideas will be extended further in looking at lists, subroutines, and repetition.
- Wolfram Rösler has compiled a large collection of the very simple "Hello World" program in almost all known programming languages on the planet (428 languages at the time of this publication) in The Hello World Collection.
- 99 Bottles of Beer website is a collection of the Song 99 Bottles of Beer programmed in different programming languages. Actually the song is represented in 1348 different programming languages and variations.
- Trabb Pardo–Knuth Algorithm (TPK Algorithm) is a program introduced by Donald Knuth and Luis Trabb Pardo to illustrate the evolution of computer programming languages. Note: The TPK algorithm reads in an array of 11 values, applies a particular function to each value, and then writes the result in reverse order.
- Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another. Rosetta Code currently has 413 tasks, and covers numerous languages, though we do not (and cannot) have solutions to every task in every language.
- Mitch Fincher has the Rosetta Stone for a Few Languages. This is another great site with code samples of languages such as Ruby,C#, Java, JavaScript, Perl, PowerShell, Tcl/Tk, C++, Lisp, PHP.
- Ryan Stansifer's TPK Algorithm in Different Programming Languages site shows this simple algorithm written in several modern languages. Note: The Trabb Pardo–Knuth Algorithm (TPK Algorithm) reads in an array of 11 values, applies a particular function to each value, and then writes the result in reverse order.
- Patrick Jordan has a A Very Quick Comparison of Popular Languages for Teaching Computer Programming, where he looked at what was involved in writing simple programs using languages such as BASIC, C, Java and Python. For additional comments on the above article with regard to writing programs in other languages such as Ruby, C++, Smalltalk, Pascal and LISP, see also comments 1, and comments 2.
- Richard Holowczak has a website dedicated to A Brief Tutorial for New Programmers, that compares the most common features and funcionality of a handful of programming langauges.
- Computer World has a great article: The A to Z of Programming Languages
- Dr Lisa N. Michaud has a useful handout explaining Programming Languages
- eHow has the following sections that might be helpful:
- Richard Bowles has a section dedicated to explaining Compilers and Interpreters. See also his Course Notes from Systems Software.
- saylor Computer Science course: CS404: Programming Languages offers unit plans with useful readings.
- Charles Dyer at the Early Teacher Project has a section on Introduction to Computers that covers The Text Editor, The Interpreter and Compiler, The Operating System and other topics.
-
A good introduction to machine code operations and instructions can be found in Chapter 7.3 of textbook ‘AQA Computing’ by Kevin Bond and Sylvia Langfield.
This book costs can be purchased for $62 from fishpond.co.nz at http://www.fishpond.co.nz/Books/Computers/General/9780748782963 - James Iry's has a blog article called One Div Zero: A Brief, Incomplete, and Mostly Wrong History of Programming Languages gives a complete run down of the history of programming languages with some humor added in for ease of reading.
- David Bolton from About.com has quite a few articles that are helpful below:
- Al Lukaszewski from About.com compares Python with Ruby, Java, PERL, PHP in his arctile What is Python?
- Sameer Shrestha has a few articles at computersight of relevance below:
- Computer Languages History site has a poster showing the history of programming languages. This poster will make a nice addition to the classroom to start discussions and students can explore the languages from any year/decade as a project.
- Programming Language Naming Patterns offers explanations of how programming languages are named and how the names were abbreviated to form these names.
- DigiBarn Computer Museum offers a poster called Mother Tongues of Computer Languages that gives us a peek at the strongest branches of computer languages. You can also find a more exhaustive text based compilation at The Language List at the University of Freiburg.
- The University of Michigan offers The Language Guide which is a very nice collection of information about influential and popular programming languages. Many of the entries have code examples.
- Annales Mathematicae et Informaticae has an interesting research paper is ICT teaching methods – Programming languages that discusses the fact that the methods used in teaching programming languages, as “languages”, are far from being near to those of natural languages with respect to their elaborateness, quality and, unfortunately, efficiency.
- GCSE in Computing (a support site for the new GCSE Computing course offered by the OCR Examination Board UK) has a section on Instructions, a concise explanation of how instructions are coded as bit patterns and how the computer distinguishes between instructions and data.
- Sam Cefai has Programming Languages and Translators explaining briefly High-Level Languages, Low-Level Languages and Language Translator with exercises students can complete in their understanding of the topics
- Robert L. Oakman has the following explained briefly with examples that could be useful:
- National Kaoshiung University, Taiwan has some informative presentation in Programming Languages, discussing the various aspects of machine and high level languages
- Zafar Ali Khan's Google site has the following useful resources:
- Hartismere School has a simple animation of the CPU Fetch / Execute / Decode Cycle
Online Guides: Advanced Resources
- Computer Language Benchmarks Game is a comprehensive site that compares the performance of 30 programming languages using 12 flawed benchmarks and 1100 programs. This site goes into great details that many not be required at this level. See the Help page for more details on the units used for measurement.
- www.theteacher.info has a few free chapters from their textbook in A Level Computing with some online tests for the modules at locations below:
Low Level Languages
Available tests: Test 1, Test 2, Test 3, Test 4, Test 5, Test 6, Test 7
-
A complete free version of the textbook ‘Machine Language for Beginners’ by Richard Mansfield can be obtained from http://www.atariarchives.org/mlb/
- Gary Pollice has a complete Course in Compiler Construction. This is an advanced course, but some materials may be used for teacher PD purposes
- Pasteur Institute has a course in Python, and a section is on Program Execution: Interpreter and Compiler.
- Computer Organisation and Design textbook has a free companion CD with a section on How Compilers Work: An Introduction. This resource is quite advanced in terms of depth, but some basic concepts are also explained well.
- LAYNETWORKS has a comprehensive Assembly Langauge Tutorial. This tutorial goes way beyond the levels required for high schools, but is a good reference material.
- Academic Tutorials has the following tutorial and quiz available:
Classroom Activities and Games: Basic Resources
-
CS Unplugged Activity 12 – Programming Languages
- An engaging extension of the Marching Orders activity, developed by the PINY team in Seoul, Korea. As well as introducing programming, it exposes students to the idea of open-source development, and also programming language design.
-
Teach ICT UK has a poster that can used as a simple activity to guess which programming language called ‘What am I’ in the classroom.
- Paul Gray has developed a kinesthetic activity called Square Chicken Dance to illustrate the idea of the single-instruction, multiple data style of parallelism using message passing. It is one of several exercises that illustrates parallel programming principles using students.
- Deb Sweeney's lesson on developing an algorithm for making a sandwich. Students will learn the importance of written communication skills and sequential thinking while trying to write a computer program on how to make a peanut butter and jelly sandwich.
- Daniel Swomley from Hanover School, Colorado Springs, USA has a lesson plan Computers only do what they are told, an exercise on giving directions precisely.
- ideone is an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages. The site gives sample code for users to look at and compile or debug. Students can get a feel of many languages, their syntax and the concept of debugging.
- Sumant Murugesh has some ideas on how to bring across the idea that computers only do what they are told.
To demonstrate the need to formalise everyday language, do some exercises for everyday tasks as a precursor to learning Pseudocode later. These activities would demonstrate that programming languages are precise and a wrong instruction can lead to bugs:
- Brainstorm with a group of students the steps they will need to perform everyday tasks such as below
- Change a broken light bulb
- Close the largest window in the room that has 3 windows of different sizes
- Unlock a cupboard using a bunch of keys
- Fetch mail from the letterbox outside the house
Now disuss the following:
- Steps that were easily overlooked
- Decision statements
- Looping/Repetition for a number of times
- Looping until a rogue value is reached
- Need to formalise the language to have some consistency
Now is a good time to emphasize the need for more precision particularly in Mathematical tasks. Try these exercises for a start:
- Calculate the area of a rectangle
- Given the gross pay of an employee, calculate the income tax and net pay
Now disuss the following:
- Operators and operands
-
Syntax for writing these tasks so everyone can follow
Classroom Activities and Games: Advanced Resources
- Paul A. G. Sivilotti has a Kinaesthetic Learning Activity (KLA) activity developed to introduce CS concepts to high school girls is Software Engineering: "Mars Pathfinder". This activity illustrates the fact that a program is a series of instructions that tells a computer exactly what to do. So, a computer scientist must design the program carefully, to be sure that the computer will do the right thing. Please note: The above activity requires the use of a Lego Rover robot.
-
Karel the Robot website with fundamentals and activities is an excellent method for introducing students to computer programming is described by Richard E. Pattis in his book titled Karel the Robot. By initially limiting the student's language repertoire to easily grasped imperative commands whose actions are visually displayed, the Karel approach quickly introduces students to such concepts as procedures and the major control structures. Although originally based on Pascal, the Karel approach has been used successfully with several different computer programming languages. These pages describe a version of Karel that uses the C / C++ language.
- Hobart and William Smith Colleges has the xComputer Lab which uses the xComputer applet, which simulates a simple model computer (which is also called xComputer). The xComputer applet that you will use in this lab lets you load programs and data into the memory of the simulated xComputer. You can then watch while those programs are executed, and you can observe how numbers stored in the computer change as a program runs. The applet displays only the registers and main memory. You have to take the control circuit, ALU, and clock on faith.
- xComputer Lab 1: Introduction to xComputer: Introduces the xComputer, a simple model computer, and investigates how it operates in a fetch-and-execute cycle to carry out machine language instructions stored in its memory.
- xComputer Lab 2: Assembly Language Programming: Covers assembly language programming for the xComputer, including labels and indirect addressing.
- xComputer Lab 3: Subroutines: Introduces the idea of a subroutine and shows how subroutines can be implemented "by hand" in the assembly language of xComputer, even though that language does not offer direct support for subroutines.
- Matthew Eastaugh has a great website called Computer Tutorial that features a Microprocessor Tutorial (quite a good resource if you are doing this standard alongside hardware ones). Some resources of interest here are:
- Eric Poll has a downloadable Windows version of The Little Man Computer. Excellent for introducing the fetch/execute cycle as an introduction to Assembly Language.
- Dr. Stuart Madnick has the Little Man Computer(LMC) that models a simple von Neumann architecture computer, so it has all of the basic features of a modern computer. The LMC can be programmed in machine or assembly code, and the following simulator will allow you to run your programs.
Note: Requires Java installed on your computer:
- LMC Simulator Applet
- LMC Instructions
- LMC Example 1: Input and Output
- LMC Example 2: Using Memory
- LMC Example 3: Adding and Substracting
- LMC Example 4: Making Decisions
- LMC Example 5: Looping
- LMC Example 6: Full Program
- ITEC1000 instructions
- Programming Tasks for Little Man Computer(LMC) that can be administered in the classroom using the applet
Downloads: Basic Resources
Here we have provided a list of links to beginner programming lanuages with their download locations. Even though programming is not required for achieving this standard, the following websites will provide explanation on the workings of these languages such if they are interpreted, compiled etc.
-
BASIC: A list of free downloadable BASIC compilers and interpreters can be found at http://www.thefreecountry.com/compilers/basic.shtml
- Scratch: can be downloaded at http://scratch.mit.edu/download
-
Alice: can be downloaded at http://www.alice.org/index.php?page=downloads/download_alice
Alice does not need any installation. As long as you download the program and unzip the contents to a folder, you can run the Alice application (Alice.exe). You may create a shortcut to the application in your start menu or desktop. - StarLogo: StarLogo is a specialized version of the Logo programming language. With traditional versions of Logo, you can create drawings and animations by giving commands to graphic "turtles" on the computer screen. StarLogo extends this idea by allowing you to control thousands of graphic turtles in parallel. Download StarLogo at http://education.mit.edu/starlogo/
StarLogo TNG is The Next Generation of StarLogo modeling and simulation software. While this version holds true to the premise of StarLogo as a tool to create and understand simulations of complex systems, it also brings with it several advances. Download StarLogo TNG at http://education.mit.edu/drupal/starlogo-tng
- Greenfoot: Consider greenfoot as a combination between a framework for creating two-dimensional grid assignments in Java and an integrated development environment (class browser, editor, compiler, execution, etc.) suitable for novice programmers. While greenfoot supports the full Java language, it is especially useful for programming exercises that has a visual element. In greenfoot object visualisation and object interaction are the key elements. Download is at http://www.greenfoot.org/download/
The Greenroom is a community site for teachers using the Greenfoot software. Its purpose is to share experiences and material, and to offer a platform for discussion and support. The goal is to help all of us to find inspiration, help each other, find interesting material, and ultimately to improve our teaching. If you are a teacher, you can apply easily to join and use the resources there.
-
Microsoft Small Basic: Small Basic is a project that's aimed at bringing "fun" back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming. Download is at http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx
-
Squeak Smalltalk: Squeak is a modern, open source, full-featured implementation of the powerful Smalltalk programming language and environment. Squeak is highly-portable - even its virtual machine is written entirely in Smalltalk making it easy to debug, analyze, and change. Squeak is the vehicle for a wide range of projects from multimedia applications, educational platforms to commercial web application development. Download is at http://www.squeak.org/
- LOLCODE: LOLCODE provides community documentation of the emergent LOLCODE language. It was the creator's original hope that the examples could grow in a way that is both internally consistent and suggest a real, feasible computing language.
-
Hiccup: an IDE for kids.
-
Logo: the classic educational programming environment
-
Robocode: IDE activities, code, and forum.
-
Jeroo: IDE activities and teacher notes.
Downloads: Advanced Resources
Here we have provided a list of links to more advanced programming lanuages with their download locations. Even though programming is not required for achieving this standard, the following websites will provide explanation on the workings of these languages such if they are interpreted, compiled etc.
- Microsoft Visual Basic: To download and install Microsoft Visual Basic programming environment, you can apply for a Microsoft Dreamspark account which is given out to students and teachers of Microsoft products. After getting the above account activated, you can then download Visual Basic 2008 Express Edition and install it following the onscreen instructions. Digital Technologies Guidelines resources page has information on how a New Zealand teacher can get hold of Dreamspark account for school. Please see below:
- DS - Instructions for Schools (PowerPoint, 4 MB)
- DS - Instructions for Schools (PDF, 3 MB)
-
Java: can be downloaded at http://java.sun.com/javase/downloads/index.jsp
Since downloading and installing Java can be quite complex, please follow this YouTube video tutorial ‘Java Programming Tutorial - 1 - Installing the JDK’
- Python: can be downloaded at http://www.python.org/download/ To assist in downloading and installing Python, please see the YouTube video tutorial ‘Python Programming Tutorial - 1 - Installing Python’ to follow step-by-step instructions on doing this. Please be advised that the operating system used in this video is Windows Vista.
-
Shoes: Shoes is a a cross-platform toolkit for writing graphical apps easily and artfully using the language Ruby. For details on downloading Shoes, please go to downloads and choose your OS. The Shoebox with tons of little demos and apps for you to look at and try out. Also see tutorials and a Wiki on using Shoes.
Videos
- Watch a video lecture in Machine Code by Richard Buckland
- YouTube user mystoreful has a presentation on What a Compiler is? that explains the difference between compilers and interpreters.
- Neil Dickson has video tutorials in Assembly Language below:
- Assembly Language Tutorial: Episode 0: Some Background: This video introduces the tutorial and some basic concepts about the CPU and RAM before actually looking at any assembly language. It also explains what assembly language is and when one might want to use it.
- Assembly Language Tutorial: Episode 1: Jumping in Head First: This video covers the very basics of assembly language, just enough to write a simple loop that fills an image with colour. It is quite lengthy because a lot of information is needed to get started and understand what's going on.
- See more videos in this series which might be quite advanced for high school.
| Attachment | Size |
|---|---|
| Computer Science Concepts AS 1.44 Unit Outline - 09.08.10.pdf | 275.44 KB |
- Login to post comments
