Computational Thinking Explorer

Search and explore 79 computational thinking concepts

Browse 79 connected concepts covering algorithms, programming structures, data representation, software design, systems, networks, cybersecurity, and responsible computing. Each concept links to related computational-thinking pages so the subject forms a usable internal network.

Algorithm

An algorithm is like a recipe written for a robot cook: every amount is measured, every step is spelled out, and the last step says stop. A person can guess what 'a pinch' means; the robot cannot, so nothing is left to guess. Unlike most recipes, a good algorithm must also work for every input it is allowed to get, not just one.

Decomposition

Decomposition is how a pizza shop handles a big order: one person makes the dough, one adds sauce and toppings, one runs the oven, and one boxes the pizzas. Each job can be done well by itself, and the jobs fit together at the end. If the jobs get too tiny, like one person per topping, passing the pizza around takes longer than making it.

Pattern Recognition

Pattern recognition is like a detective comparing several crime scenes: the rooms and times are different, but the same muddy boot print shows up every time, so it points to one culprit. Like a good detective, check the next scene before you are sure, because a clue that matched three times can still be a coincidence.

Abstraction

Abstraction is like packing your school bag for one day. You check the timetable and pack only what today's lessons need, leaving the rest at home. Pack too little and your maths book is missing; pack everything and the bag is too heavy to carry. A different day, like a different question, means packing differently.

Sequence

Sequence is like a row of dominoes: each one falls only after the one before it, and you cannot make the fifth fall first. Move one domino to a later spot and everything after it happens differently. Unlike dominoes, a program can later jump back or skip ahead, but that takes selection or loops.

Selection

Selection works like a fork in a hiking trail with a sign: 'More than 2 hours of daylight left? Take the left path to the peak. Otherwise take the right path back to the car.' You read the sign once, take exactly one path, and never walk both. An else-if chain is a series of forks where you turn off at the first sign that applies to you.

Iteration

A loop is like running laps with a coach holding a clipboard. Before each lap the coach checks the rule, say 'fewer than 4 laps done?', and you run again only if the answer is yes. Each lap adds a tick to the clipboard. Forget the tick and the coach will keep you running forever.

Variable

A variable is like a whiteboard with a name written across the top. You can read what is on it, or wipe it and write something new, but there is room for only one thing at a time. Writing a new value erases the old one for good, unless you first copied it onto another whiteboard.

Data Types

Data types are like the units on a measuring jug and a ruler. Both show numbers, but adding 3 cups to 3 centimetres makes no sense, so you check what each number measures before combining them. A computer checks types the same way. The comparison stops at strings: text measures nothing, and joining two pieces of text just sets one after the other.

Boolean Logic

AND is like two switches in a row on one wire: the lamp lights only if both are on. OR is like two switches side by side on separate wires: either one alone lights the lamp. NOT is a push-button that cuts the power while it is pressed. The circuits inside computers are built from gates that work almost exactly this way.

Function (Programming)

A function is like a recipe card filed under a name. Writing the card cooks nothing; cooking happens only when someone pulls the card out and follows it (the call), using today's ingredients (the arguments), and hands over the finished dish (the return value). The same card works every day, with different ingredients each time.

Parameters

Parameters are the blank lines on a printed form, labelled 'Name' and 'Age'. The form is the same for everyone; each person fills in different answers, and the office reads each answer by which line it is on. Write your age on the name line and the office gets it wrong, just as swapped arguments do.

Array

An array behaves like the wall of numbered mailboxes in an apartment lobby: one building address, one box per apartment, and the mail carrier goes straight to box 4 without opening boxes 0 to 3. Two differences: an array's numbering starts at 0, and there is no box past the last one.

Debugging

A good doctor does not hand out random medicine. They ask what is wrong, guess a cause, run one test to check the guess, then treat the cause instead of only the cough. Debugging follows the same order. One difference helps you: a program can be run again in exactly the same way, so you can repeat a test as often as you like.

Input/Output

A program works like a restaurant kitchen behind a serving window: orders come in through the window (input), meals go out through it (output), and the cooking in between stays out of sight. Like a real order slip, input can be smudged or wrong, so the cook reads it carefully before starting.

Binary

Picture a balance with one weight each of 1, 2, 4, 8 and 16 grams. Each weight is either on the pan (1) or off it (0), and every whole number of grams from 0 to 31 can be made in exactly one way, just as every number has exactly one binary form. The picture stops at addition: binary sums need the carry rule.

Bits and Bytes

Bits behave like coin flips in a row: one flip has 2 outcomes, two flips have 4, ten flips have 1,024, because each new flip doubles every list of results so far. A byte is a row of 8 flips, 256 possible rows. The comparison stops at chance: a computer sets each bit on purpose.

Recursion

Looking up a word can be recursive: if the definition uses a word you do not know, you look that word up first, then come back to where you were. You stop at a definition made only of words you know, the base case. A dictionary that defines 'big' as 'large' and 'large' as 'big' is infinite recursion: the lookups never end.

Algorithm Efficiency

Big-O compares ways of running a party. Handing each guest an invitation takes time in proportion to the guest list: $O(n)$. Having every guest shake hands with every other guest grows with the square: $O(n^2)$. Big-O asks how the job grows as the party gets bigger, not how fast one particular helper walks.

Searching

Searching a sorted list is the game 'guess my number from 1 to 100' with 'higher' or 'lower' hints: guessing the middle every time finds any number in 7 guesses or fewer. Take the hints away and the only safe plan is guessing 1, 2, 3 and so on, which is linear search.

Sorting

Lining up a class by height for a photo is sorting. Neighbors can keep swapping until no pair is out of order (bubble sort), or the class can split in two, line up each half, and merge the two lines by sending forward the shorter front person each time (merge sort). A computer cannot see the whole line at once; it compares two people at a time.

Event

A doorbell works like an event: nobody checks the porch every minute; when a visitor presses the button, the chime (the handler) sounds. Wire the button to nothing and the press still happens but nobody hears it, just like an event with no handler attached. One difference: a single program event can trigger several handlers.

Data Representation

A representation is like a code shared by two friends: 1 means A, 2 means B, and so on. The numbers carry the message only because both use the same key; hand them to someone with a different key and the message comes out as nonsense. Computers fit this closely, except that their keys, such as ASCII and RGB, are published, not secret.

Simulation

A simulation is a flight simulator for any system: a cockpit where nothing can really crash, so you can try a storm, an engine failure or a bad landing as often as you like. What you learn carries over only if the simulator's physics match the real plane closely enough.

Testing

Testing a program is like a fire drill: you create the situation on purpose, with a plan for what should happen, and watch for anything that goes differently. A drill that only ever uses the main exit would never discover the blocked side door, just as tests with only normal inputs miss the edge-case bugs.

Modular Design

Modules are like the parts of a desktop computer: keyboard, mouse and monitor each do one job and plug in through standard ports. You can replace a broken keyboard without opening the monitor, because the port, the interface, stays the same. One way the picture falls short: a software module can be copied and reused in another program for free.

Binary Search

Binary search is how you find page 412 in a thick book: open near the middle, see whether the page number there is too high or too low, and keep only the half that must contain 412. It works because page numbers are in order; if the pages were shuffled, the number you opened to would tell you nothing.

Linear Search

Linear search is reading down a printed sign-up sheet to find a name: start at the top, read each name, stop when you see it. You never skip ahead, because the sheet gives no clue where the name might be. Reaching the bottom without seeing it is the only way to be sure the name is not there.

Merge Sort

Merge sort is like sorting a tall stack of exam papers with a group of friends: keep halving the stack and passing halves on until each person holds a single paper, which is already sorted. Then pairs of people combine their piles by repeatedly taking the lower-scoring of the two top papers, until one sorted stack is left. A program does the passing on with recursion.

Bubble Sort

Bubble sort is like tidying books by height on a shelf when you may only swap two neighboring books. Walking left to right, you swap whenever a taller book stands left of a shorter one, so the tallest book is carried to the right end in a single sweep. A short book stuck at the far right moves only one place per sweep, which is why the method is slow.

Generalization

Generalizing is like writing a recipe after making pancakes a few times. At first you just cook. After a few batches you notice the same steps each time and write them down with a blank: 'for each person, use 1 egg.' Now anyone can cook for any number of people. A recipe can still fail for a case nobody tried, like cooking for 100.

Divide and Conquer

Counting a national vote works like divide and conquer: each town counts its own ballots, each region adds up its towns' totals, and the country adds up its regions. Every level does the same job, counting, on a smaller piece, and the totals combine on the way up. All the towns can count at once, the same reason these algorithms split well across processors.

Error Types

Error types are like mistakes in a recipe. A smudged line nobody can read is a syntax error: the cook cannot use the recipe. 'Add the eggs' when there are no eggs is a runtime error: cooking stops partway. 'Bake at 400 °C' instead of 200 °C is a logic error: every step is done exactly as written, and the cake is ruined.

Image Representation

A digital image is a mosaic of tiny tiles, each one a single solid color. The whole picture lives in the list of tile colors and positions, and if you zoom in far enough you see the tiles. Unlike a real mosaic, the computer stores no tiles at all, only numbers: three for each tile, for red, green and blue.

Audio Representation

Sampled sound works like a flip-book: still drawings shown fast enough look like smooth motion. More pages per second (a higher sample rate) catch quicker movements, and more precise drawings (more bits per sample) show finer positions. Adding pages does not make the drawings any bigger, just as a higher sample rate does not make the sound louder.

Random Numbers

A pseudo-random generator is like a very long shuffled playlist: the songs seem to come in no order, but the order was fixed the moment the shuffle was made. Start the same playlist from the same point, the seed, and you hear exactly the same sequence. A truly random source, such as radioactive decay, has no playlist at all.

Modeling

A model works like a scale model of a bridge tested in a lab: it keeps the shape and strength that decide whether the bridge holds, and drops the paint and the lampposts. What it shows about loads predicts the real bridge, but only for the features it kept; it can tell you nothing about traffic noise.

Data Compression

Compression is packing a suitcase. Lossless is rolling and folding: everything you packed comes out again, just in less space. Lossy is leaving things at home that you probably will not miss; the bag gets much lighter, but those things are not there when you unpack.

Logical Operators

Two light switches wired one after the other light the bulb only when both are on: that is AND. Wired side by side, either switch alone lights it: that is OR. NOT is a switch mounted upside down. The picture predicts every two-input case, but it says nothing about the order a program follows in a long mix of operators.

Truth Tables

A truth table is like trying every setting of a lock whose wheels each have only two positions. Three wheels give 8 settings, few enough to try them all and know for certain which ones open it. The picture also shows why the method stops being practical: 30 wheels would mean more than a billion settings.

Pseudocode

Pseudocode works like a recipe written for any kitchen: 'bake until golden' instead of 'set oven model X3 to 190'. Any cook can follow it, whatever their oven. Unlike a recipe, though, every step must be exact enough to trace with real numbers, because the computer that eventually runs the code will not guess what you meant.

Flowchart

A flowchart is a board game track: you start on one square, follow the arrows, and some squares ask a question that sends you down one of two paths. Like a good game board, every path must lead to the finish or back into play. Unlike a game, nothing is left to chance: the same input always takes the same path.

Design Specification

A design spec is the order you give a custom cake baker: serves 20, chocolate, no nuts, ready by 3 pm, blue lettering. It says what you will accept and how you will check, and leaves the recipe to the baker. Software specs differ in one way: requirements often shift mid-project, so the spec gets revised rather than framed.

Software Development Life Cycle

Developing software resembles launching a new dish at a restaurant: ask diners what they want, write the recipe, cook a test batch, let staff taste it, add it to the menu, then tweak it from comments. Waterfall perfects the dish before serving anyone; agile serves small tasting plates every week. Unlike a dish, released software reaches every user at once, mistakes included.

Documentation

Documentation is the label on a medicine bottle: what it is for, how much to take, what not to mix it with. The pills work without the label, but nobody can use them safely. And like a label, it is only useful while it matches what is inside; a wrong label is more dangerous than a blank one.

Code Maintenance

Maintaining code is like looking after a house people live in: fix leaks, follow new building rules, add a room, clear the gutters before they overflow, all without moving the family out. You do not knock it down because one room is untidy. Where the comparison falls short: around software, the neighbourhood (operating systems, libraries) keeps changing on its own.

Version Control

A commit is a video-game save point that comes with a note saying why you saved, and a branch is a copy of your save file for trying a risky route while the original stays safe. The comparison breaks at merging: a game cannot combine two save files, but Git can join two branches' changes into one.

Interface

An interface works like a restaurant menu: it lists what you can order and what will arrive, and you never see the kitchen. The chef can change the oven or the recipe and your order still comes as described. Change the menu itself, though, and regulars who order their usual dish are suddenly stuck.

Edge Cases

Testing edge cases is like testing a bridge with the heaviest truck allowed, an empty road and a gale, not just a few cars on a calm day. Ordinary traffic shows the bridge works; the extremes show whether it holds. The difference is that code can fail at one exact value, such as 120, while 119 and 121 behave perfectly.

Unit Testing

Unit testing is like a cook tasting each component before plating: the sauce, the pasta, the cheese, one at a time. If the finished dish is wrong, the cook already knows which parts are fine. The comparison stops at speed: unit tests rerun every check in seconds after every change, which no cook could do.

User Interface

A good UI works like a well-signposted airport: you reach your gate without asking anyone, because signs sit where you look, use the same symbols throughout, and keep confirming you are heading the right way. A confusing airport and a confusing app fail the same way: people get lost even though everything they need is there.

Assignment

Each variable is a small whiteboard with its name written at the top. Assigning means erasing the board and writing the new value, so it only ever shows the latest one, and copying from one board to another copies what is written right now. The picture holds for numbers and text; for lists, many languages copy a link to the same list instead.

Integer

Whole eggs in a carton behave like integers: you can have 0, 1 or 12, never 2.5. Sharing 7 eggs between 2 people gives 3 each with 1 left in the carton, exactly what 7 // 2 and 7 % 2 report. The carton picture stops at negative numbers, which integers handle as easily as positive ones.

String

Beads on a necklace, one letter per bead and numbered from 0, behave like a string: you can count the beads, read any one by its number, clip two necklaces together or copy a stretch. The picture fails when you try to swap a single bead; in Python and Java you must thread a whole new necklace instead.

Boolean

A checkbox on a form is a boolean: ticked or empty, with no third state, and anyone can read it later without asking the question again. A comparison like age >= 13 is the person deciding whether to tick it; the if statement is the office that reads the box. The picture stops at Python's truthy values, where 0 or empty text also counts as an empty box.

Return Values

A return value is the receipt handed to you at a shop counter: the work happens behind the counter, but the receipt is the one thing you carry away and can use later, for example to add up your spending. Once it is handed over, that visit is finished. Unlike a shop, a function hands back exactly one value per call, though that value can be a list.

Scope

Each function is a room with one-way glass. From inside, you can look out and read the notices on the hallway board, the globals; from the hallway, nobody can see into the room. Writing a name inside the room pins a new note on the room's own wall rather than changing the hallway board, unless you declare global.

Nested Conditionals

Asking for directions inside a big building is a nested decision: is it on this floor? If yes, is it left or right of the elevator? If no, take the stairs and ask again upstairs. You only ask 'left or right' after the first answer is yes, just as an inner if runs only after its outer test passes.

While Loop

Stirring a sauce until it thickens is a while loop: check whether it has thickened, stir if not, check again, and stop the moment it has. If it was already thick, you would not stir once. The comparison breaks in one place: a cook eventually gives up, but a loop whose condition never changes keeps going forever.

For Loop

Dealing cards around a table is a for loop: one card to each player, and the round ends when every player has one, with nobody counting aloud. The players are the collection and dealing a card is the body. The picture also predicts the classic bug: if a player leaves mid-round, as when you remove items while looping, someone gets skipped.

Event Handler

A smoke alarm is an event handler for smoke: installed once, it waits silently and reacts only when smoke arrives, as many times as that happens. You never tell it when to sound; the event does. Unlike an alarm on the ceiling, a handler can be attached twice by mistake, and then one event sets it off twice.

File Operations

Files are a program's notebook, and the open mode is how you approach it: 'r' is reading without a pen, 'a' is turning to the first blank page, and 'w' is tearing out every page before you start. Closing is shutting the notebook so nothing is left half-written. Unlike torn paper, an emptied file cannot be fished out of the bin.

Function

A vending machine with a name on the front works like a function. You press a button with your choice (the argument), the same machinery inside does the work every time, and an item drops out (the return value); you never need to see inside to use it. The comparison stops at functions that only do a job, such as drawing a shape, and hand back nothing useful.

Hardware & Software

Hardware and software are like a piano and its sheet music. The piano is the part you can touch; the music tells it what to play. Without music the piano stays silent, and music with no piano makes no sound. The comparison stops at who plays: a piano needs a person, but a computer follows its instructions by itself.

Computing System

A computing system is like a kitchen making a sandwich. Ingredients go in (input), the cook follows a recipe (software) using knives and a toaster (hardware), and a sandwich comes out (output); the recipe card's list of amounts is data. Unlike a cook, a computer never improvises: it does exactly what the instructions say.

Operating System

The OS is like an air traffic controller at a busy airport. Planes (apps) cannot take off whenever they like; the controller gives each one a runway slot (processor time), a gate (memory) and permission to land. Pilots never steer the runway themselves. One difference: the OS switches between apps thousands of times a second, far faster than any airport.

Storage

Storage is the filing cabinet and RAM is the desk: you work at the desk, and anything you want to keep must go into the cabinet before you leave. That picture shows why saving matters. Where it bends: a computer moves papers between cabinet and desk in a flash, and its cabinet has a fixed size you can measure in gigabytes.

Network

A network is like the roads in a town. Houses (devices) are joined by streets (cables and Wi-Fi), and a roundabout in the middle (the router) sends each car the right way. A town's roads can stay local or join a motorway to other towns, which is like the internet. Unlike cars, messages arrive almost instantly.

Internet

The internet is like the world's road system: local streets (home networks) join town roads (internet providers), which join motorways that cross countries. Nobody owns all the roads, but everyone drives by the same rules, and if one road closes, traffic goes another way. Unlike a road trip, a message can cross the world in under a second.

Packet

Sending packets is like moving house with a fleet of small cars instead of one giant truck: each box is labelled with the new address and 'box 12 of 40', each car takes whatever road is clear, and you unpack in number order at the other end. Unlike a lost box, a lost packet costs almost nothing: the sender just makes another copy.

Protocol

A protocol is like the rules of a card game. Two players from different countries can play together if they agree on the rules: what a valid move is, whose turn it is, what happens after a mistake. Change the rules on one side only and the game falls apart. Unlike most games, network protocols are written down exactly, so machines can follow them without arguing.

Cybersecurity

Cybersecurity is like protecting a bank: locks on the vault (confidentiality), cameras and receipts so nobody can quietly change the records (integrity), and doors that open during business hours (availability). Banks rely on many layers, not one big lock. The difference: a digital burglar can try a million doors a minute from the other side of the world.

Privacy

Your personal data is like a copy of your house key: you might give one to a friend who waters your plants, but not to everyone who asks, and you would want to know who holds one. The comparison has a gap: a key can be handed back, while data, once copied, usually cannot be recalled.

Encryption

Encryption is like sending a message in a locked box that anyone can carry but only the key holder can open: the postman, a thief or a nosy neighbour can hold the box and learn nothing. The comparison fails in one useful way: a real box can be smashed open, while strong encryption cannot be forced in any practical amount of time.

Intellectual Property

A creator's work is like a house they own, and a licence is the note on the door saying who may come in and what they may do inside. An open door is not an invitation. The comparison breaks on one point: copying a work takes nothing away from the owner, which is exactly why copying feels harmless when it is not allowed.

Accessibility

Accessibility is the ramp beside the stairs. The stairs still work for most people, the ramp lets everyone else in, and strollers and delivery carts end up using it too. Like a ramp, it is far cheaper to draw into the plans than to add after the building is finished. Unlike a ramp, many digital fixes are invisible, such as alt-text only a screen reader speaks.

Parallel Computing

A kitchen with four cooks chops four piles of vegetables four times as fast, but it can't bake one cake four times faster: the batter must be mixed before it goes in the oven. Someone also has to hand out the piles and collect the bowls, and with too many cooks that handing-out takes longer than the chopping.

Artificial Intelligence

Training a model is like learning to read a friend's handwriting. After enough notes, you can read a word you have never seen them write, and nobody handed you a rulebook. If every note you saw was in neat capitals, though, their messy cursive will trip you up. Unlike you, the model has no idea what the words mean.

Ethics of Computing

An ethics review works like an environmental impact study for software. Before a highway is built, someone studies who gains the shortcut, whose homes get the noise, and which wetland floods. A new app deserves the same study of who gains and who pays. Unlike a highway, software keeps changing after launch, so the review never really ends.

79 concepts available