Autumn 2026 | Topic: Variables, Types & State


1. Lecture Overview & Roadmap

This is Week 2 of Programming 1 (41039). Week 1 provided a general subject introduction. Week 2 begins the core programming content, starting with state. The roadmap for the next few weeks covers three foundational components every programming language must provide:


2. Programming Language Paradigms

2.1 Imperative Languages (What This Subject Uses)

Imperative languages work by specifying the steps the computer must perform to reach the desired outcome. The programmer describes how to compute the result — a sequence of instructions. Both Java and Python are imperative languages.

The broader Algol family of languages are all imperative: C, C++, C#, Swift, Java, Python. They share the same fundamental design of giving the computer a recipe to follow.

2.2 Declarative Languages (Not Covered in This Subject)

Declarative languages describe what result is desired rather than how to compute it. The main practical subcategory is functional programming languages. Other declarative types exist but are rare and specialised.

This subject does not focus on declarative or functional programming. There is a small section on functional concepts in Java/Python near the end of the course materials, but it is not a focus.


3. Memory Layout: Context for Understanding Variables

A running program’s memory is divided into several regions. You do not directly interact with all of these as a programmer, but understanding them helps you understand why variables behave as they do.