Back to Programming Concepts

Oak National Academy

Lessons written by expert teachers in England, each with slides, a video and quizzes.

Their topic:
Programming: selection · Python programming project · Using fundamental programming constructs in a block-based language
For your topic:
Programming Concepts · Computer Science - 0478

Use these lessons alongside our lesson note, which covers your syllabus in full.

What this covers in your syllabus

3 lessons from Oak National Academy

Lesson 1 of 3 · GCSE level, ages 14 to 16

Good programming practices

By the end: I can explain what is meant by good programming practices and adopt these practices when writing my own code.

Key learning points

  1. Good programming practice involves taking steps to make your code easier to read and understand.
  2. Variables should always have meaningful identifiers so that the reader of the code understands how they are used.
  3. Comments are used in programs to help make it easier for a programmer to understand what it does.

Keywords

comment
text within source code that is ignored by the compiler or interpreter, used to help programmers understand the code
identifier
the name that a programmer gives to a variable, constant, or subroutine
maintainability
refers to the ease with which maintenance activities can be performed on code, such as correcting errors

A common mistake

Mistake: Comments are added to code to help you understand your program.

In fact: Comments are used to make the code more readable to a programmer who seeks to understand it. The comments should be written in a style that would help them make sense of the program.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

Why are good programming practices important?
What is the purpose of comments in programming?
What is snake case, and where is it commonly used?

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

Lesson 2 of 3 · GCSE level, ages 14 to 16

Refining code in a programming project

By the end: I can identify and make improvements to refine code.

Key learning points

  1. Reviewing code means checking how well it works, how readable it is and whether it meets the functional requirements.
  2. Improving code may involve simplifying logic, breaking large sections of code into subprograms or correcting any errors.
  3. Code should be readable and maintainable, so that others can understand and work with it easily.

Keywords

modularity
breaking software into independent, self-contained units or modules

A common mistake

Mistake: A function and a procedure are the same.

In fact: A function is different from a procedure because it returns a value or values to the main program.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What is the main reason for reviewing code?
Which of these is an example of improving code?
Which statement correctly explains the difference between a function and a procedure in programming?

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

Lesson 3 of 3 · Lower secondary, ages 11 to 14

Builds the basics this topic needs

Sequence

By the end: I can use subroutines to execute sequences of commands.

Take the full lesson on Oak National Academy The video, slides and quizzes for this lesson are on Oak National Academy's site.

Key learning points

  1. Computers only follow the commands they are given, so these need to be precise and accurate.
  2. Commands can be joined together to create sequences in Scratch to achieve a desired outcome.
  3. Sequences can be separated into individual subroutines.
  4. Programs should be written so that other people can easily understand them. Subroutines are used to do this.

Keywords

execute
to run or carry out the commands in a program
sequence
the order of commands in a program
subroutine
a sequence of instructions with an identifiable name that performs a specific task

A common mistake

Mistake: A sprite in Scratch can only have one sequence of code blocks.

In fact: Sequences of code can be separated into subroutines and these subroutines can be called multiple times.

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

The wording comes from each publisher. The layout and the links to your syllabus are ours.