[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

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.

 

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

  • 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.
  • 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.
  • 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.
  • 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.
  • 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.

 

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.

 


Classroom Activities and Games: Basic Resources

  • 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.
  • 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:

    1. Brainstorm with a group of students the steps they will need to perform everyday tasks such as below
    2. Change a broken light bulb
    3. Close the largest window in the room that has 3 windows of different sizes
    4. Unlock a cupboard using a bunch of keys
    5. Fetch mail from the letterbox outside the house

    Now disuss the following:

    1. Steps that were easily overlooked
    2. Decision statements
    3. Looping/Repetition for a number of times
    4. Looping until a rogue value is reached
    5. 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:

    1. Calculate the area of a rectangle
    2. Given the gross pay of an employee, calculate the income tax and net pay

    Now disuss the following:

    1. Operators and operands
    2. 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.

    1. 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.
    2. xComputer Lab 2: Assembly Language Programming: Covers assembly language programming for the xComputer, including labels and indirect addressing.
    3. 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.
  • 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.

 


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.

  • 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:
    1. DS - Instructions for Schools (PowerPoint, 4 MB)
    2. DS - Instructions for Schools (PDF, 3 MB)
  • 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

 

 

AttachmentSize
Computer Science Concepts AS 1.44 Unit Outline - 09.08.10.pdf275.44 KB