System application generation (1.2.2)
Navigate to resources by choosing units within one of the unit groups shown below.
a) The nature of applications, justifying suitable applications for a specific purpose.
c) Open source vs Closed source.
d) Translators: Interpreters, compilers and assemblers.
e) Stages of compilation (Lexical Analysis, Syntax Analysis, Code Generation and Optimisation).
f) Linkers and loaders and use of libraries.
Approaches to teaching the content
Much of what students need to understand about this area of the specification can make good use of discussion, although the later sections about compilers and interpreters won’t necessarily be things that students have come across before.
The nature of applications, justifying suitable applications for a specific purpose
Students should be familiar with applications but may have not considered that there are alternatives and if so, what the differences are. This could provide the basis for an interesting discussion about apps on smartphone vs traditional applications on PCs, Free vs Paid, advertising and alternative pieces of software such as Microsoft Word vs Libre Office, Google Docs, Pages (Mac) and Evernote, just to name a few. What categories do these pieces of software fall under?
Are some categories newer than others? Which pieces of software need certain hardware to function (e.g. speed, memory, cameras etc)?
The website Download.com can be used by students to get inspiration.
Who would use different categories of software?
Utilities differ from general applications as they are usually focused on system maintenance such as firewalls, antivirus, backup, data compression or defragmentation, for example. The same sort of teaching methods as above can be used for utilities.
A video that covers most utility software can be found on YouTube.
Open source vs Closed source
Open source software is that for which the source code is free and the user can edit the source code and can potentially contribute to the community to improve the piece of software. Linux is an example of this, since it is free and open source. Closed source is where the company that owns the source code keeps it to itself. The software might be free or need to be paid for. Microsoft works in this way.
You could watch some of the videos below before having a class discussion on which type of software students think is better in the long run – closed or open source? You could get students into groups and let them prepare their argument for or against.
Some engaging videos that cover the basics using practical examples are:
Translators: Interpreters, compilers and assemblers
A translator is a program that translates a computer program written in one language into another which functions exactly the same. This is commonly used since computers don’t understand programs written in high level languages like Java and Python and so something is needed to translate these into machine code that the computer understands and can run.
Assemblers are programs that translate an assembly language program into machine code so that a computer can understand it. Assemblers do not ‘make’ any executable files.
Compilers do the same sort of basic thing as assemblers, except they are more advanced as they can perform operations such as code optimisation and they compile straight from the source language (e.g. Java) into the target language (machine code).
Interpreters are different from compilers because instead of compiling all of a program into machine code at once it does so one statement at a time.
Video – What is Compiler and Interpreter (in easiest way) (Scott Barron)
Stages of compilation (Lexical Analysis, Syntax Analysis, Code Generation and Optimisation)
Lexical analysis is responsible for gathering all the source code and ‘tokenising’ it. This means that it will be able to understand which are variables, which are keywords (such as if, else etc.) and also remove comments.
Syntax analysis ensures that the code makes logical sense. For instance, if a bracket has been missed out, this is usually the stage where it would warn the user after processing its checks.
Code generation is where the computer converts the high level code that has been written by the user into code that is understood by the computer (machine code). This process may also contain some optimisation.
An activity here may be to write the different stages on the board jumbled up and students have to put them into the right order and explain what each one does.
Linkers and loaders and use of libraries
Linkers take object files and required libraries and combine them into a single executable file.
Loaders place programs and libraries into memory and so prepare a program for execution.
A good overview of Assembler, Compiler, Interpreter, Linker, Loader.
Common misconceptions or difficulties students may have
There are quite a few different terms that students may not have encountered before in this topic. A student glossary is an excellent idea; students can add terms that are unfamiliar to them and define them in their own words.
Keywords: Open source, Closed source, Translator, Interpreter, Compiler, Assembler, Lexical analysis, Tokenisation, Syntax analysis, Code generation, Optimisation, Linker, Loader, Library
Conceptual links to other areas of the specification – useful ways to approach this topic to set students up for topics later in the course
This section of the specification is probably best taught before moving onto 1.2.4 Types of Programming Language since it covers what happens during compilation or interpretation of different languages. This would make it easier for students to understand some of the differences and similarities between languages, and also how these languages are understood by the computer.
Students should use the set of cards in Learner Resource 1 to try and find different pieces of software that fit into those categories, using the table to record their findings. This should expand students’ ideas about what software is out there and how they are categorised.
Taboo is a fun game where one person has to sit at the front of their group and they have a set of things that they must get the rest of their group to guess without using any of the words in the answer. For example, for Microsoft Word you might say “Bill Gates letter writing software”. You could divide students up into teams, and if anyone is a bit reluctant they could always be the judge/scorekeeper.
Using the terms on the cards in Learner Resource 2, make a PowerPoint presentation with a word per slide about what each of the terms means. You could get students to work in groups, and then you have the choice of getting them to present it. Students could rate presentations and choose parts of the best ones to feed into Part 2.
Make a mindmap that uses all the words from the cards in Learner Resource 2, trying to reduce the explanation of the terms used to the bare minimum. This could be done as a class or in groups so that each student has to come up with a picture and short description for each word, which should make the process much faster.
An interesting activity based on the idea of the United Nations to help students understand the differences between compilers and interpreters.
You will need to print out the 12 role cards given on the document from the website (see Resource) and students will have to arrange themselves into countries A, B and C and read their cards out in order from 1–12.
Questions are provided to help students draw out reasonings as to how interpreters differ from compilers.
OCR’s resources are provided to support the teaching of OCR specifications, but in no way constitute an endorsed teaching method that is required by the Board and the decision to use them lies with the individual teacher. Whilst every effort is made to ensure the accuracy of the content, OCR cannot be held responsible for any errors or omissions within these resources. We update our resources on a regular basis, so please check the OCR website to ensure you have the most up to date version.
© OCR 2015 - This resource may be freely copied and distributed, as long as the OCR logo and this message remain intact and OCR is acknowledged as the originator of this work.