GCSE · Computer Science · AQA · Spec 8525
Advantages of subroutines
Your quiz game's menu says 'Qiut'. How many places must you fix? If the answer is 'just one', you've already met the big idea of this lesson.
Computer Science · Subroutines
Which advantage is it?
Pick a situation, then put it under the advantage it shows. Each placement comes with the reason, right or wrong.
Still to sort
Code reuse (0)
Written once, called as many times as needed, so no repeated lines.
Where the line is: Reuse means not writing the same lines again. If the story is about changing code later, that's Maintenance.
Decomposition (0)
A big problem broken into smaller sub-problems, one subroutine each.
Where the line is: Decomposition is breaking the problem down to design it. Sharing those parts out between people is Teamwork.
Testing and debugging (0)
One part checked on its own, so an error has fewer places to hide.
Where the line is: This is about finding errors. A correction then reaching every call is Maintenance.
Maintenance (0)
A correction or improvement made once takes effect at every call.
Where the line is: Maintenance is a change made later. Not having to type the lines in the first place is Code reuse.
Readability (0)
The main program reads like a list of clearly named steps.
Where the line is: Readability is about a person reading the program. Breaking the problem down to plan it is Decomposition.
Teamwork and libraries (0)
Programmers share out the work, or a tested subroutine goes on to other programs.
Where the line is: Calling a subroutine many times in ONE program is Code reuse. Using it in OTHER programs, from a library, belongs here.
Six advantages, eight situations. Some advantages get two situations and some get one, so don't expect the columns to fill evenly.
Maintenance
Reason it through
Why does one fix inside show_menu correct the menu everywhere in the program?
First link · your turn
Where does the code for showing the menu actually live?
Decomposition, teamwork and libraries
View
Layers
Explore
step through the views →
One big problem: a whole quiz game. Designing it in one go would mean holding every detail in your head at once.
Step through the four views, then tap any box to see what it shows.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Write a task once, in one named place, and a whole list of problems goes away.
What you need to know
- A subroutine is a named, self-contained block of code that performs one task. It runs only when another part of the program calls it.
- Almost every advantage comes from one fact: the task is written once, in one named place.
- The six advantages are code reuse, decomposition, testing and debugging, maintenance, readability, and teamwork and libraries.
- The benefits are to how a program is written, tested and maintained, not to how fast it runs.
The big picture
A subroutine is a named, self-contained block of code that does one task and runs when it is called. Because each task is written once, in one place, subroutines bring six advantages: code reuse, decomposition, testing and debugging, maintenance, readability, and teamwork and libraries. They make a program easier to write, test and maintain, not faster to run, and they help even when a subroutine is called only once.
Key points
Worked example
Problem
A cinema-booking program checks that a seat number typed in is valid, and it does this in five different places. Explain two advantages of putting the seat check in a subroutine.
⚠ Watch out
Saying subroutines make a program "easier" or "faster". "Easier" doesn't name an advantage: say which one, and what it makes easier. "Faster" isn't the reason at all. The advantages are about writing, testing and maintaining code, and they apply even to a subroutine that is called only once.
Memory hook
Really Determined Testers Maintain Readable Libraries: Reuse, Decomposition, Testing, Maintenance, Readability, Libraries (and teamwork). Underneath all six: one task, written once, in one named place.
Check yourself
Cover the page. Name all six advantages of subroutines and give a one-line reason for each. Then explain why a subroutine that is called only once can still be worth writing.
Flashcards
(11)What is a subroutine?
The one fact behind almost every advantage of subroutines
Code reuse
Decomposition
Testing and debugging
Maintenance
Readability
Teamwork
Libraries
Do subroutines make a program run faster?
Is a subroutine worth writing if it's called only once?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 29 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.