04 December 2026

Why Does pH Change So Dramatically? The Chemistry of Indicators

 


Why Does pH Change So Dramatically? The Chemistry of Indicators

The first drop of sodium hydroxide can turn a little patch of an acid solution yellow. Swirl the flask and the yellow disappears. A few minutes later, a drop from the same burette produces a colour that survives swirling. What has changed since the first drop?

I like to pause a titration at that first flash of colour. Once a student has written down the final burette reading, it is easy to forget that the earlier flash happened at all. Yet those two observations lead to two different questions. What determines the pH of the liquid in the flask? And how does an indicator turn that pH into something our eyes can see?

Three indicators meet the same three solutions

Start with the red cabbage in the vegetable drawer. Chop a leaf, steep it in hot water until the water is deeply coloured, then cool and filter the extract. The purple liquid contains anthocyanins, a family of plant pigments whose molecular structures change with pH.

In the teaching lab, set out nine small tubes in three rows. Put equal volumes of colourless pH 4, 7 and 10 buffer solutions across each row. Buffers are useful here because their pH resists small additions of indicator. Give the first row a little cabbage extract, the second universal indicator and the third methyl orange. Use the same small amount across each row and a clean dropper for each indicator. Wear eye protection and use dilute, teacher-prepared reagents for the practical work.

IndicatorpH 4pH 7pH 10
Red cabbage extractPink to reddish purplePurple to bluish purpleBlue-green to green
Universal indicatorUsually orangeUsually greenUsually blue
Methyl orangeOrange to yellow-orangeYellowYellow

These are expected observations. Cabbage shades depend on the extract, and each universal indicator should be read against its own chart. Put white card behind the tubes and record the colours you actually see.

Now cover the labels on the last two methyl orange tubes. Can anyone recover the labels from their colours alone? Both tubes are yellow. A student who says “I can’t tell” has read the evidence correctly. Universal indicator contains several dyes with overlapping colour changes, so it gives an approximate pH across a broad range. Methyl orange answers a narrower question particularly well. Is the sample passing through roughly pH 3.1 to 4.4?

A small number on the pH scale can hide a large change

At GCSE, remember that a fall of one pH unit means a tenfold increase in hydrogen ion concentration. A solution at pH 3 has 100 times the hydrogen ion concentration of one at pH 5. At A level we can calculate that relationship for dilute aqueous solutions.

pH = -log10([H+])

Here [H+] is the hydrogen ion concentration in mol dm^-3. The H+ notation is shorthand for hydrated hydrogen ions in water. For 0.0010 mol dm^-3 hydrochloric acid, a strong acid that dissociates essentially completely, [H+] is approximately 0.0010 mol dm^-3, giving pH 3.00.

Try it backwards. If the meter reads pH 3.50, then [H+] = 10^(-3.50) = 3.2 x 10^-4 mol dm^-3. Half a pH unit corresponds to a factor of about 3.2. That gives us a better version of the opening question. How can a tiny volume from the burette produce such a large relative change in concentration?

Follow the alkali, one addition at a time

Pipette 25.00 cm³ of 0.100 mol dm^-3 hydrochloric acid into a conical flask, add two drops of methyl orange and stand it on a white tile. Add 0.100 mol dm^-3 sodium hydroxide from a burette. Swirl after each addition. Make a rough run first, then repeat with fresh acid, adding the alkali dropwise as you approach the colour change. Record the total volume added, the colour where each drop lands and the colour of the whole flask after swirling.

To plot the curve, repeat with a calibrated pH probe in a suitably sized beaker. Take more readings close to 25 cm³ and wait for each reading to settle. The following values are calculated predictions for ideal solutions at 25 °C. They give you something to test against your own readings.

NaOH added / cm³Predicted pHWhat controls the pH?
0.001.00The original strong acid
20.001.95Acid remaining after neutralisation
24.954.00A very small excess of acid
25.007.00Equal reacting amounts of strong acid and strong base
25.0510.00A very small excess of alkali

At the start, the flask contains 2.500 mmol of acid. After 24.95 cm³ of alkali, just 0.005 mmol of acid remains in 49.95 cm³ of solution. Dividing gives [H+] of about 0.00010 mol dm^-3, hence pH 4.00. After a further 0.10 cm³, the same small amount of hydroxide is in excess. Across that tenth of a cubic centimetre, [H+] has fallen by a factor of about a million.

That also explains the first flash of yellow. Where the drop lands, the indicator briefly experiences a high local pH. Swirling brings that pocket of alkali into contact with the surrounding acid. Early in the titration there is plenty of acid left, so the red colour returns. Near the end, the whole flask can enter the indicator’s transition range. Methyl orange passes through orange and can already look yellow while the liquid is still slightly acidic.

What changes inside an indicator molecule?

Imagine an indicator that behaves as a weak acid. Call its protonated form HIn and its deprotonated form In-. The equation is short enough to write on the board alongside the two colours.

HIn(aq) ⇌ H+(aq) + In-(aq)

HIn and In- are a conjugate acid–base pair. They differ by one proton. Gaining or losing that proton changes how electrons are distributed within the dye molecule. The two forms absorb different wavelengths of visible light, so the light reaching our eyes has a different colour.

Adding acid favours the protonated form. Adding alkali removes H+ as water forms, favouring the deprotonated form. With methyl orange, the acidic form is red and the basic form yellow. In the transition region both contribute to the colour we see.

For an idealised two-form indicator, the proportions follow a simple relationship.

pH = pKa + log10([In-]/[HIn])

At pH = pKa, the two concentrations are equal. One pH unit lower, the ratio of basic form to acidic form is 1 to 10. One unit higher, it is 10 to 1. This is the origin of the familiar approximate transition range of pKa ± 1. The visible limits depend on how strongly each form absorbs light and which colour change the eye can distinguish. A cabbage extract, with several pigments and several possible structures, makes a particularly interesting comparison with this simple model.

Why does the right indicator depend on the titration?

The equivalence point is where acid and base have reacted in the proportions given by their equation. The end point is the colour change you use to stop adding titrant. On a pH–volume graph, draw a horizontal band across the indicator’s transition range. Look at how much volume you add while the curve crosses that band. A narrow volume interval close to equivalence gives a sharp, useful end point.

Titration at typical school laboratory concentrationsWhat the curve tells youSuitable choice
Hydrochloric acid with sodium hydroxideA long, steep rise crosses both acidic and alkaline indicator rangesMethyl orange or phenolphthalein
Ethanoic acid with sodium hydroxideThe steep rise is centred above pH 7. Ethanoate ions react with water to produce some OH-.Phenolphthalein, approximately pH 8.3–10
Ammonia with hydrochloric acidThe steep fall is centred below pH 7. Ammonium ions act as a weak acid.Methyl orange
Ethanoic acid with ammoniaThe curve changes too gradually around equivalence for a reliable visual end pointNeither of these indicators gives a sharp end point

An A-level exam question worth trying. A student titrates ethanoic acid with sodium hydroxide and chooses methyl orange because its colour is easy to see. Will the titre be too large or too small?

Too small. As alkali is added, the solution passes through pH 3.1–4.4 on the gently rising part of the curve, while appreciable ethanoic acid remains. Stopping at the methyl orange end point records too little sodium hydroxide. Phenolphthalein changes from colourless to a faint pink within the steep rise. A convincing exam answer links the indicator’s range, the shape of the curve and the direction of the error.

The question I would leave on the bench

My spectroscopy background makes me particularly fond of this experiment. A spectrometer could record how much light the dye absorbs at a chosen wavelength. In a tuition lesson, a white tile and a pair of eyes are enough to begin asking the same molecular question. Which form of the dye is present, and what evidence do we have for it?

I would finish by handing a student the yellow methyl orange tubes again. One contains a neutral solution and one an alkaline solution. Give them the cabbage extract, the universal indicator and a couple of clean tubes, and ask them to devise a test using fresh portions of the unknowns. This time they have a reason for choosing their instrument. The colour that looked like the answer at the start has taught them how to ask a better question.

Further reading


03 December 2026

Could You Reconstruct a Dinosaur Without Finding a Dinosaur?

 


Could You Reconstruct a Dinosaur Without Finding a Dinosaur?

Year 9 Dinosaur detective work at Hemel Private Tuition

Two trails cross a patch of mud. One is a line of broad, rounded impressions. The other has three long toes, and halfway across the patch its footprints get further apart. A predator caught sight of its lunch and broke into a run. Or did it?

Before I showed a student the model feet that made those marks, I’d give them a ruler and ask them to point to the exact spot where the supposed chase began. They could show me where the spacing changed. They might even be able to show me which animal passed first. The difficult bit would be finding a footprint that said anything about lunch.

That is the attraction of a dinosaur trackway. A skeleton can help us reconstruct a leg. A succession of footprints can show us where its owner put that leg down, several times in a row.

What survives when the animal has gone?

A fossil tooth or vertebra preserves part of the animal itself. Palaeontologists call these remains body fossils. A footprint is a trace fossil, evidence of something an animal did. A sequence of prints left by one animal as it moved is a trackway.

Imagine a dinosaur stepping onto wet sediment. Its toes sink in, its weight shifts and the foot lifts out. If the impression survives long enough to be buried, later sediment can fill the hollow. Millions of years later, erosion may expose the original depression or the raised cast formed by its filling. In either case, the shape owes something to the foot, something to its movement and something to the ground.

Try pressing your thumb into plasticine and lifting it straight out. Now press the same thumb down and roll it forwards as you lift. Which impression would you use to measure the length of your thumb? A palaeontologist inherits the impressions. The thumb is long gone.

Turn a tray of clay into a Jurassic crossing

You will need a shallow tray or board, a strip of soft clay or damp fine sand about 50–60 cm long, a ruler, paper, two model feet and a phone or camera. A pair of left and right three-toed stamps cut from firm foam works well. For a second animal, use a blunt oval object. Agree that one end of the tray is north so everyone can describe the route.

  1. Make a secret journey. One person smooths the surface and makes eight alternating left and right prints with the three-toed feet. Begin with short steps, leave a section with wider spacing, then curve towards the edge. Keep the toes pointing roughly along the direction of travel. Sketch the route privately.

  2. Add a visitor. Make an oval-print trail across the first route. Let one oval partly obliterate a three-toed print. Leave enough of each impression visible for someone else to inspect the edge.

  3. Preserve the scene. Photograph the tray from directly above, with the ruler lying flat beside the tracks and the north end marked. Take a second picture with a light low to one side. The overhead picture records spacing. The shadows help reveal which edge cuts across which.

  4. Swap detectives. Give your partner the tray or the photographs. Ask them to draw the route, mark any turn, identify the minimum number of track types and write down which trail they think came first. They must attach one observation to each claim.

  5. Reveal the route. Compare their reconstruction with your sketch. Which clue let them recover something you actually did? Which deliberate movement left too little evidence for them to recognise it?

For a younger detective, “Show me where it turned” is enough to get started. For a GCSE or A-level student, I’d ask a second question. “Which of your conclusions would survive if I covered up the crossing?”

Read the distance between the prints

On a two-footed animal’s trail, a step takes you from one foot to the other. A stride takes you from one foot to the next impression of that same foot. Put a pencil beside the first left print and count aloud, “Left, right, left.” One stride contains two steps. On the straight section, measure from the same landmark each time, such as the tip of the middle toe, and use several prints before deciding that a pattern has changed.

MeasurementExample from an invented classroom trailWhat the detective can say
Print length, back edge to middle toe tipAbout 3 cm throughoutThe visible prints are similar in length.
Three successive strides on a straight section8 cm, 8 cm, 12 cmThe last measured stride is half as long again as either earlier stride.
Direction near the tray edgeThe trail bends from north towards eastThe animal appears to have turned right.
Detail at the crossingAn oval rim cuts through a three-toed impressionThe oval print was made later at this spot.

A turn is easiest to see from several prints. An animal can angle a foot outwards while continuing straight ahead. Trace the route through the sequence before using a single toe as a compass.

Can you put a speed on a footprint?

Here’s the experiment I’d film. Make two identical lines of prints with a 12 cm stride. In the first take, move the same foot from one landing to its next landing in two seconds. In the second take, cover that stride in one second. The implied forward speeds are 6 cm per second and 12 cm per second. Pause on the two finished trackways. Which photograph shows the faster journey?

The answer lives in the film. Both photographs preserve distance. Neither records the time between footfalls.

Real trackways offer more to work with than a hand-operated stamp. Researchers can compare stride length with estimated hip height and draw on the relationships between body size, gait and speed in living animals. The resulting speed is an estimate. A long-legged animal can cover a fair distance in one ordinary walking stride. Even for the same individual, longer strides alone leave the timing open.

Gait is the pattern in which the feet move. In a four-footed trackway, repeated smaller forefoot impressions beside larger hindfoot impressions can help reveal where the legs were placed. If a hind foot lands on a forefoot mark, part of that pattern disappears. Try this with two different-sized stamps. Hand the tray to someone who hasn’t seen it being made and ask how many feet they can account for.

One foot, two very different dinosaurs?

Press the same model foot into firm clay and into much softer clay. Use the same stamp, the same downward load and the same contact time. Make three prints in each surface. Measure their lengths and widths, and note where toe tips or edges become hard to distinguish.

If a toe leaves only a faint mark in the firmer clay, would a detective looking at that print alone count the right number of toes? If the foot slides on the way out of softer clay, where should the ruler go? Have two people measure the same impression independently. Their disagreement gives you a practical reason to report a range.

I particularly like this variation for tuition because a blurred edge gives the student a decision to make. They have to say what they counted as the end of a toe and then defend that choice to someone holding the same ruler.

Oxfordshire’s real Jurassic crossing

At Dewars Farm Quarry in Oxfordshire, a 2024 excavation uncovered five extensive dinosaur trackways on a surface dating to about 166 million years ago. Four were attributed to long-necked sauropods. A fifth, with conspicuous three-toed prints, was attributed to the large meat-eating dinosaur Megalosaurus. At one point the two kinds of trackway cross. University of Oxford’s excavation report

Researchers studying the crossing reported that the theropod passed through first. That is a remarkable detail to recover from the Jurassic. Yet “first” leaves an important question open. How much time passed before the sauropod arrived? The order of two footprints by itself gives us no answer. Palaeontological Association 2025 meeting abstracts, “The global context of a new theropod trackway from Dewars Farm”

The same reasoning applies to herd behaviour. Several similar trackways running alongside one another, maintaining their spacing and turning together would make travelling in a group worth investigating. But picture a narrow strip of firm ground beside a river. Animals visiting hours apart might all take the same convenient route. Make both versions in the tray and see which clues, if any, allow a partner to distinguish them.

What would you put on the museum label?

At the end of the lesson, I’d give the student forty words for a museum label. My version for our clay tray would read:

A three-toed trackmaker travelled north, lengthened its stride and turned east. An oval print overlaps one of its tracks, so a second trackmaker crossed later. The prints preserve the order of passage. The interval between the two journeys remains unknown.

Could you reconstruct a dinosaur without finding a dinosaur? You could recover a few moments of its life with surprising precision. You might trace a right turn, recognise a change of stride or work out which of two animals reached a crossing first. As for whether one dinosaur ever saw the other, I’d leave that question on the label. It gives the next visitor a reason to bend down and look.

02 December 2026

The Brachistochrone — Why the Shortest Route Isn't Always the Fastest

 


The Brachistochrone — Why the Shortest Route Isn't Always the Fastest

Beyond the syllabus | A-level Maths and Further Maths | Optimisation and mechanics

Stretch a piece of string between the start and finish of a marble run. Pull it taut and you have found the shortest route. Now give the string a little slack and press down near the start. You have made the journey longer. Could you also have made it quicker?

In the lab at Hemel Private Tuition, I would give students the string before showing them the tracks. Once you have felt it pull tight, the straight line is a very persuasive answer. But the string has only answered a question about distance. The clock has a different question to settle.

Two beads arrive with the same speed. Which arrives first?

Imagine two small beads released from rest. Each slides along a smooth wire from the same starting point to the same lower finishing point. Gravity is uniform and we can ignore friction and air resistance.

One wire is straight. The other drops steeply, then levels out. Which bead has the greater speed at the finish? This is a good moment to commit to an answer before predicting which one wins the race.

A bead that has fallen a vertical distance h has lost gravitational potential energy mgh. That energy has become kinetic energy. This gives

m*g*h = (1/2)*m*v^2
v = sqrt(2*g*h)

Both beads finish at the same speed because both have fallen through the same height. Yet a bead that makes much of its descent early can spend a larger part of the journey moving quickly. Think of the first few centimetres of the straight track. The bead is using some of its slowest moments to cover horizontal ground. A steeper start lets gravity accelerate it more strongly along the wire.

Why not drop vertically and turn sharply towards the finish? That gives an excellent start, but leaves the whole horizontal distance still to cover. A curve can begin travelling sideways while the bead is still gaining speed. The question is how soon it should start to turn.

The shape hiding on a bicycle wheel

Put a white dot on the rim of a bicycle wheel, right where it touches the ground. Roll the wheel slowly along a straight line without letting it slip. Relative to the room, the dot rises, sweeps forwards and comes down to meet the ground again. Its path is a cycloid.

Turn that tracing upside down. Starting from one of its pointed ends, the curve dives vertically, bends smoothly and reaches a horizontal tangent at its lowest point. A suitably scaled section of this curve gives the quickest journey for our bead. The problem takes its name from the Greek for “shortest time” — the brachistochrone. Wolfram MathWorld — Brachistochrone Problem

Here is an unexpected consequence. Move the finishing point far enough sideways while keeping the same drop, and the fastest track dips below the finish before climbing back up. The bead uses some of its speed on the climb, but the time it gained earlier more than pays for it. That would be my second vote of the lesson. Who would put an uphill section in a downhill race?

Build the race on a tabletop

A convenient board has room for a 40 cm drop and a 62.8 cm horizontal run. These dimensions make the finish the lowest point of the chosen cycloid and give the track a horizontal exit. Make four interchangeable profiles, or mount four lanes side by side. Use the same smooth channel material and identical solid balls throughout.

Track How to shape it Question to ask before release
Straight Stretch the channel directly between the end marks. How much does the shortest distance save?
Circular arc Use a compass or a string and pencil to draw an arc through both marks. Place the centre directly above the finish for a horizontal exit. Is an ordinary circular bend close enough to win?
Steep then flat Give the first section a steep slope and blend it smoothly into a long, nearly level run. Can the head start pay for the extra distance?
Cycloid Plot the points below on the board and fair a flexible strip through them, starting as close to vertical as the apparatus allows. Where would you expect this lane to gain time?

Cycloid template. Measure rightwards and downwards from the start. Each pair below is (distance right, drop), in centimetres. The close spacing at the left is deliberate.

(0, 0)       (0.5, 2.7)    (3.6, 10.0)    (11.4, 20.0)
(24.6, 30.0) (42.4, 37.3)  (62.8, 40.0)

Plot these on squared paper, or enlarge the profile to full size on an A1 sheet. Check the start and finish using the centre of each ball. A ball riding in a channel runs slightly offset from the surface you have drawn.

Film the part your eyes miss

I would set my Canon R5 C on a tripod, square to the side of the apparatus, with the start, finish and a ruler all in frame. My favourite use for slow motion here would be to pause before anyone wins. Which ball is lowest? Which is furthest across? Are those the same ball?

  1. Ask everyone to write down a finishing order and one reason for their first choice. Lift a common release gate cleanly, without giving any ball a push.
  2. Record at a known capture rate, ideally 120 frames per second if available. Use the first frame of movement for each ball and the first frame its centre crosses the finish line. For a single interchangeable lane, use the same framing and release each time.
  3. Calculate elapsed time with time in seconds = frame difference / capture frame rate. Use the capture rate even if the replay is slowed down. At 120 frames per second, one frame represents about 0.0083 s.
  4. Run at least five trials. Swap the balls between lanes and keep the mean and range for each profile. If the circular arc and cycloid finish a frame apart and change places between runs, report what your camera could actually resolve.

A real ball puts some energy into spinning. For an ideal uniform solid sphere rolling without slipping on a single surface, its centre moves at v = sqrt(10gh/7). That is a constant fraction of the sliding bead's speed at every depth. For the same centre paths this stretches all the theoretical times by the same factor, so the ideal winning shape survives. A channel, a join that jolts the ball, or slipping on the steep start can all affect the recorded result. A close race gives students a reason to look at the apparatus again.

A-level challenge — put a number on the advantage

For the board above, take g = 9.81 m/s^2. Model the moving object as a sliding bead. The straight route is about 0.745 m long, by Pythagoras. Its final speed is sqrt(29.810.40), or about 2.80 m/s. Its acceleration along the straight slope is constant, so its mean speed is half its final speed.

Time on straight track = 0.745 / 1.40 = about 0.532 s

The cycloid on this board is generated by a circle of radius 0.20 m rolling through half a revolution. Its arc length is 0.800 m and its predicted travel time is about 0.449 s. The bead takes a route 5.5 cm longer and arrives about 0.083 s earlier. That time difference would span roughly ten frames at 120 frames per second in the sliding-bead model.

There is a good exam-technique question tucked inside that calculation. Can we use half the final speed as the mean on the cycloid too? Look at the last few centimetres. The track is almost horizontal there, so gravity contributes very little acceleration along it. The constant-acceleration argument we used on the straight slope no longer applies.

Further Maths — what are we differentiating?

In a familiar optimisation problem, you might choose the radius of a tin that uses the least metal for a given volume. Each possible answer is a number. Here each possible answer is a whole track. Move one small section of the track and you alter both the distance travelled there and the speed at which it is covered.

Let x be the horizontal distance and y the vertical drop from the start. A short piece of track has length ds. The time spent on it is ds/v. Adding those contributions along a candidate curve gives:

T = integral from A to B of ds / sqrt(2*g*y)
ds = sqrt(1 + (dy/dx)^2) * dx

This is the entry point to the calculus of variations. The expression assigns a travel time to every admissible curve. The aim is to find the curve that makes the total smallest. You can actually see what the integral is weighing up. Near the top, y is tiny, so a centimetre of track costs a lot of time. Lower down, that same centimetre is cheaper.

We can check the time along the winning curve with ordinary parametric differentiation. Write r for the generating circle's radius and t for the angle it turns through, measured in radians. Here t is an angle, not elapsed time.

x = r*(t - sin(t))
y = r*(1 - cos(t))

Differentiate and use 1 - cos(t) = 2*sin(t/2)^2. On the descending half-arch, for 0 < t <= pi, the expressions simplify as follows.

ds/dt = 2*r*sin(t/2)
v = 2*sqrt(g*r)*sin(t/2)
(ds/dt)/v = sqrt(r/g)

The two sine factors cancel. Equal turns of the generating wheel correspond to equal intervals of bead travel time. Integrating from 0 to pi gives T = pisqrt(r/g). With r = 0.20 m, that is our 0.449 s. Integrating ds/dt over the same interval gives the track length 4r = 0.800 m. These calculations check this particular curve's performance. Establishing its optimality among all curves is the deeper variational problem. Wolfram MathWorld — Cycloid

The challenge that crossed Europe

In 1696 Johann Bernoulli publicly challenged other mathematicians to find the path of quickest descent. His brother Jacob Bernoulli, Gottfried Wilhelm Leibniz and Isaac Newton were among those who supplied solutions. Think about what the challenge demanded. Beating the straight line with one clever drawing would have taken them only part of the way. Someone could always arrive the next morning with a different drawing and a faster time. Their solutions had to account for that unseen rival too. Wolfram MathWorld — Cycloid

One last change to the track

At the end of the lesson I would leave the start gate where it is and slide the finishing mark further to the right. Then I would hand back the flexible strip. A student who picked the straight line at the beginning now has a much more interesting decision. How much extra track are they willing to add to gain speed early? Would they dare take their ball below the finish?

That is what I like about this problem for A-level students. Pythagoras can tell them how long the straight track is. Mechanics can tell them how fast the bead will finish. A camera can tell them who won. But the moment they ask, “Could any other shape beat mine?”, they have asked a question that needs a new kind of mathematics.

01 December 2026

Can you count electrons by watching a drop of oil?

 


Can you count electrons by watching a drop of oil?

Peel two strips of sticky tape, hold them by their ends and bring them towards one another. With a little preparation, you can make them bend apart. You can see the gap widen. Now imagine someone asking, “How many extra electrons are on that strip?”

I like that question because it changes what I want from the experiment. A visible movement is enough to convince me that a force is acting. To count electrons, I need a way to measure charge, and a reason to believe it comes in countable amounts. That was the attraction of Robert Millikan’s oil-drop experiment. A tiny speck drifting through air could tell us something about a particle far too small to see.

Here is how I would explore the idea at Hemel Private Tuition. The first investigation needs sticky tape. The second needs a pencil and six numbers. Between them lies a particularly good piece of A-level physics.

Start with two strips that push each other away

Take a roll of ordinary transparent sticky tape, a smooth bench and a pencil. Lay down a base strip about 15 cm long. Fold a short tab at the end of a second strip, mark it B for bottom and stick it onto the base. Put a third strip on top, with its own folded tab marked T. Make a second, identical stack alongside it.

  1. Lift each T-and-B pair from its base, keeping the pair together. Gently run your fingers over the outside of each joined pair to reduce the charge acquired in lifting it.

  2. Hold the tabs and peel T from B in each pair. Keep the freshly separated strips apart. Ask someone to help hold them, or hang them by their tabs from the edge of a shelf.

  3. Bring the two T strips slowly towards one another, with their free ends dangling. Record what happens before they touch. Repeat with B and B, then T and B.

  4. Start again with fresh strips. Approach from the other side and see whether the direction of bending changes with the position of the approaching strip. This helps distinguish the effect from a curling strip or a draught.

With suitable tape, T and T repel, B and B repel, and T and B attract. If the effect is weak, try freshly peeled strips, a different roll or a drier room. For a close-up film, a dark card behind the strips and light falling across their edges make the movement much easier to see.

Which observation tells you most? Try bringing one charged strip near a small scrap of ordinary paper. The paper can move towards it while remaining electrically neutral overall. Charge within the paper shifts slightly, bringing opposite charge closer to the strip. Attraction alone therefore leaves two explanations open. Repulsion between two similarly prepared strips gives much clearer evidence that both carry charge of the same sign. The letters T and B tell us how each strip was prepared. Assigning positive and negative would take a reference of known sign.

What could an oil drop tell us that the tape couldn’t?

Imagine looking through a microscope at a dark space between two horizontal metal plates. Side lighting picks out a drop as a bright point. With the field switched off, the point slowly crosses one mark in the eyepiece and then the next. The distance between the marks is known. A stopwatch gives you its speed.

Why bother timing the fall? Oil drops come in different sizes. A heavier drop needs a larger upward force to support it, so watching a drop hover tells you very little until you know something about that particular drop. At its steady falling speed, air resistance and buoyancy together balance its weight. Using the drag law for a small sphere, the falling speed gives an estimate of the radius, and hence of the drop’s effective weight after allowing for buoyancy. This is the ingenious part for me. The same speck that needs weighing supplies the evidence for weighing it. Oxford chemistry teaching notes on Millikan’s experiment

Now imagine adjusting the field until that drop hovers. In still air there is then no drag from motion through the air. The upward electric force balances the effective weight. In the central region between parallel plates, the calculation uses just three relationships, written here in terms of magnitudes.

  • E = V / d

  • F_electric = |q| * E

  • |q| = effective weight / E

Here V is the potential difference in volts, d is the plate separation in metres, E is field strength in newtons per coulomb, and q is charge in coulombs (C). A negative drop feels a force opposite to the field direction. In a common version of the experiment you time a steady rise as well as a steady fall, in which case drag matters on both journeys. University College Dublin oil-drop practical

Try one calculation. Suppose a hovering drop has an effective weight of 2.4 x 10^-14 N in a field of 5.0 x 10^4 N/C. Its charge magnitude is (2.4 x 10^-14) / (5.0 x 10^4) = 4.8 x 10^-19 C. That is a charge on one drop. How could we tell whether the drop carried one unit of charge, three units or thirty?

Six drops and a missing first rung

Here are six simulated classroom measurements, deliberately given a little scatter. They are charge magnitudes in units of 10^-19 C. For example, the reading for drop A means 6.43 x 10^-19 C. Take the illustrative uncertainty in each reading as +/-0.05 in the displayed units.

DropABCDEF
Charge magnitude6.433.189.584.8312.817.98

Before reading on, put six pencil marks on a number line running from 0 to 13. Where would you put evenly spaced tick marks so that every pencil mark lands close to a tick? You may leave ticks empty.

In ascending order the readings are 3.18, 4.83, 6.43, 7.98, 9.58 and 12.81. The first two are 1.65 apart. The next gap is 1.60, then 1.55, then 1.60. The last gap is 3.23. A student who spots that last gap has found something interesting. It is close to two of the earlier gaps. There may simply be an unoccupied tick around 11.2.

Try a spacing of 1.60. The six marks sit near ticks numbered 2, 3, 4, 5, 6 and 8. Drop A, for instance, lies 0.03 above tick 4 because 4 * 1.60 = 6.40. That difference fits inside the stated uncertainty. In fact, all six readings pass the same check. The smallest reading in our sample corresponds to two units. Taking the smallest measurement as the unit would have sent us astray.

At this point I would give the class an awkward suggestion. “My tick marks are 0.80 apart. Every one of your readings fits mine as well. How will you choose?” Both spacings fit these six numbers. The finer scale leaves every odd-numbered tick empty. A particularly revealing next observation would be to follow one drop as it gains or loses charge and measure how large its individual changes are. Repeated jumps of about 1.60, alongside a search for smaller jumps at adequate resolution, make a stronger case than six tidy dots on paper. The simulated figures let us rehearse that argument. The experimental evidence comes from measurements on real drops. Institute of Physics on the properties of the electron

Why a charged strip of tape looks perfectly ordinary

The name for the step size is the elementary charge, written e. Its exact value in today’s SI is e = 1.602176634 x 10^-19 C. An electron carries charge -e. An initially neutral oil drop that gains three electrons has Q = -3e, while one that loses three has Q = +3e. More generally, Q = n * e, where n is a signed whole number representing the net charge count. NIST value of the elementary charge

Why didn’t the tape twitch in little steps? Consider an object carrying a net charge of just -1.0 nanocoulomb. Divide 1.0 x 10^-9 C by 1.60 x 10^-19 C and you get about 6.2 billion excess electrons. Adding one more would scarcely change its deflection. The charge is quantised even when the movement looks smooth.

The question I would leave on the board

A student sees a strip of tape bend and writes, “This shows that charge comes in packets.” I would ask them to put a finger on the observation that shows the size of a packet. Then I would give them the number line and ask the same question again.

I would happily spend longer on those two answers than on memorising the value of e. The tape gives us a force we can see. The motion of an oil drop gives us a charge we can calculate. Several drops, and especially changes in charge on the same drop, let us ask whether a common step runs through the measurements. By the end, a student can explain how a stopwatch and a moving point of light could give physicists grounds for counting electrons. That is a remarkable amount to learn from watching something fall.

30 November 2026

Can Earthworms Detect Their Environment?

 


Can Earthworms Detect Their Environment?

An earthworm crosses a pencil line and comes to rest in the shade. A child watching says, “It likes the dark.” My first question would be, “If we put the shade on the other side, where do you think the next worm would go?”

That question gives us a whole biology practical. It costs little, fits into 30–60 minutes and works at several levels. A younger child can call out a position when the timer sounds. A GCSE student can design a fair comparison. An A-level student gets the trickiest job of all: deciding how much evidence we have for a preference.

Darwin noticed the worms that carried on feeding

Charles Darwin spent decades studying earthworms. In his 1881 book The Formation of Vegetable Mould, through the Action of Worms, he described watching worms at the mouths of their burrows. Sometimes illumination brought a swift retreat. On other occasions, a worm occupied with dragging a leaf carried on with its business. Darwin recorded the circumstances in which the response changed. Those exceptions are among the most interesting observations in the book. Read Darwin’s account, Chapter I

An earthworm has no eyes, yet it can detect light. Moisture also matters because oxygen and carbon dioxide pass through its moist skin. Lift a fallen leaf and you change several things in a moment. The worm beneath it encounters more light, moving air and a disturbance overhead. Which change caused it to move? A divided arena lets us investigate one at a time. Earthworm Society of Britain

Give the worm a choice you can measure

I would start with moisture. Both halves of the tray remain visible, and children can watch the whole animal cross the boundary. Ask everyone to write down a prediction before collecting a worm. A testable version might be, “Across several worms, we expect to record the body midpoint on the damper half more often.”

Gather a shallow tray, plain unperfumed absorbent paper, a dropper, water, a timer, a pencil and a ventilated pot containing damp material from the collection spot. Allow about ten minutes to prepare, 15–30 minutes for short observations and the rest for returning the animals and discussing the records.

  1. Make two equal halves. Mark the centre on the outside of the tray. Fit two identical pieces of paper edge to edge. Dampen both throughout, then add a few measured drops to one piece. Both should feel damp and neither should have standing water. Try this first in an empty tray. If water spreads across the join and both sides feel alike within three minutes, adjust the amounts before starting. Record the amounts that work.

  2. Check the tray itself. Set it level in diffuse light. For a control run, give both halves identical moisture and observe one worm using the timing below. Pool control runs if several groups take part. A repeated bias towards the window or the same edge gives you something to investigate.

  3. Introduce one worm. Collect locally from beneath loose leaf litter in your own garden. Let a worm crawl onto a damp leaf and use it for transfer. Place the midpoint over the centre line with the body lying along the line, giving neither side a head start. Step back and start the timer.

  4. Take six snapshots. Every 30 seconds for three minutes, record where the midpoint lies: damper, less damp or on the boundary. A worm can stretch its front end across the line while most of it stays put. Agreeing on the midpoint beforehand settles an argument before it starts. Record an obscured position as “unseen”.

  5. Reverse the conditions. Use fresh paper for each animal and alternate which side is damper. Observe each worm once. Four short trials make a manageable start. Write down anything that might affect an individual trial, such as someone knocking the table.

  6. Return each animal promptly. Keep waiting worms shaded in damp material, handle them as little as possible and stop a run early if the surface starts drying or the animal repeatedly tries to escape. Put each worm back where you found it, replace its leaf cover and wash hands after handling animals or soil. University of Edinburgh animal behaviour teacher guide

What can six snapshots tell us?

Here are invented teaching data. D means damper, L means less damp and B means the midpoint was on the boundary.

WormDamper half30 s60 s90 s120 s150 s180 s
1LeftBLDDDD
2RightDDDDDD
3LeftLLLBDL
4RightBDDLDD

Look first at worm 1. At one minute you could have written that it preferred the less damp half. By the end, four of its six records were on the damper paper. Which account would you give a reader who had missed the experiment?

Across the four worms, 15 of the 24 snapshots were on the damper half, six on the less damp half and three on the boundary. Keeping boundary observations in the total gives:

Percentage of all observations on damper paper = (15 / 24) x 100 = 62.5%

Three of the four worms were recorded more often on the damper half. Worm 3 spent most of its observations on the less damp paper. I would ask a student to include that individual in the conclusion. “Three out of four” tells the reader something that disappears when we give only the percentage.

Did chance produce the pattern? It could have. Imagine a worm crossing the line by chance, then pausing there for three minutes. The timer would register six entries on the same side from a single movement. The experiment involved four animals. Counting every snapshot as a fresh choice would exaggerate the evidence. A stronger follow-up combines results from more independently observed worms, retains the equal-moisture controls and checks whether the pattern follows the damp paper when its position changes.

Three more questions for the same tray

QuestionHow to try itWhat to watch for
Does an earthworm spend longer in shade?Use equally damp paper throughout. Cast a shadow over one half using a card raised well above the tray in cool, diffuse light. Watch from the side and swap the shadow between trials.A low cover adds shelter. A lamp can add warmth and dry the paper. Describe this as a test of light and shade. True darkness needs a way of recording position in the dark.
Does leaf type influence where it settles?Lay equal-sized pieces of two locally fallen leaves, such as oak and sycamore, flat on equally damp paper. Match their stage of decay as closely as possible. Score contact with each leaf separately from time spent on bare paper.Resting against oak is evidence of contact. To claim that the worm ate oak, you would need to observe feeding. Darwin himself distinguished leaves drawn into burrows from those being consumed.
Does surface texture affect movement?Use the same type of damp paper on both halves. Leave one piece smooth and press shallow ridges into the other. Match the moisture and avoid sharp or abrasive materials. Record midpoint positions and count crossings.Watch how long the body takes to cross each surface. A worm may appear more often on the ridged paper simply because it moves across it more slowly.

Choose one question per session. For A-level students, the texture trial raises a particularly good puzzle. Can they use a short overhead video to distinguish a worm repeatedly turning towards one surface from a worm slowing down whenever it reaches it? Replay makes it possible to time a crossing and check where the turn began. In my video studio I would lock the camera above the tray and leave it running. I would keep the extra filming lights switched off for this one.

The worm that went the other way

My favourite question in this practical comes after the results are on the page: “What would have made you change your mind?” If the answer is “nothing”, we have some work to do on the prediction. If a student says, “I’d change my mind if the worms kept going left after we moved the damp paper to the right”, they have understood what the side swap was for.

Yes, earthworms can detect features of their surroundings. The achievement in a home laboratory is to say precisely what these animals did, under conditions a reader can picture. Give me a notebook that records the worm that went the other way, the damp paper that needed adjusting and the observation that changed a student's mind. That is an afternoon of biology worth sharing.


29 November 2026

Are Schools Teaching Knowledge — or Teaching Us Our Place?

 


Are Schools Teaching Knowledge — or Teaching Us Our Place?

The timetable lists the subjects. What does school teach that never appears on it?

A Level Sociology.
It is 8.44 on Monday morning. Two pupils are halfway down the corridor when the bell goes. One hurries into registration. The other stops to help a new pupil find the right room and arrives a minute late. The register has a box for lateness. Where does the helpfulness go?

In an earlier article, One Society, Four Different Explanations, I used school uniform to explore why sociologists looking at the same classroom might disagree. This time, imagine following a pupil through one ordinary, fictional school day. Listen for the bell, watch who gets to hold the apparatus and, at lunchtime, pay attention to who gets the laugh. Each tells us something about the hidden curriculum.

The formal curriculum includes the chemistry of acids and the causes of the First World War. The hidden curriculum consists of the expectations, values and habits pupils learn through the way school life is organised. A punctuality rule can be printed in the planner. The unwritten lesson is what a pupil comes to understand about whose time matters, what counts as a good reason and who gets to decide. Different pupils can draw different conclusions from the same minute in the corridor.

8.45 am | Registration and the value of a minute

Start with the strongest case for a common start time. If half a class misses the opening instructions for a practical, somebody has to explain them again. Arriving together makes it possible for thirty people to do something that none could organise alone. Punctuality can be an act of consideration towards the person waiting for you.

A functionalist asks how such habits help a society hold together. Talcott Parsons described the classroom as a bridge between family life and the wider world. A family can make allowances based on intimate knowledge of one child. A school introduces universalistic standards, criteria intended to apply to everyone. Learning to act under shared expectations is part of secondary socialisation, the learning of social norms in institutions beyond the family.

Now bring back the pupil who stopped to help. Does the teacher quietly amend the mark after hearing the explanation? Give a late mark and thank the pupil publicly? Each response teaches something about the relationship between rules and judgement. Even a school wholeheartedly committed to cooperation has to decide what to do when two of its values collide.

9.05 am | Who gets to hold the burette?

In my teaching lab, a titration makes me think carefully about what I mean by “taking part”. Picture two students working together. One reads the scale, controls the tap and decides when to add the final drop. The other writes down every reading. Both leave with a complete results table. Only one has felt how little you need to turn that tap.

From a functionalist perspective, this is a promising example of the division of labour. Accurate work depends on people carrying out different tasks and trusting each other. Yet look at the next trial. Do the students swap? Does the recorder get to say, “Hang on, I think you’ve gone past the end point”? If they do, they are practising both cooperation and the confidence to question someone else’s judgement. If the same pupil always handles the apparatus, the pair may quietly learn who is entitled to call themselves “good at chemistry”.

As a tutor, that makes me want to ask two questions when I look at a beautiful set of results. Who produced the figures? Who would feel able to repeat the experiment tomorrow? A single tick at the bottom of the page cannot answer both.

10.30 am | The bell goes halfway through an idea

A pupil has just thought of a better way to organise the experiment. The teacher is interested. The bell goes. Books close, stools go under benches and everyone moves to English. Yesterday’s lesson ended the same way. After a term, nobody needs to give the instruction.

Samuel Bowles and Herbert Gintis offered a Marxist account of education in Schooling in Capitalist America (1976). Their correspondence principle proposes that relationships within school resemble relationships in a hierarchical workplace. Think of a pupil whose tasks, pace and rewards are decided by someone else. A worker whose supervisor sets the task and judges the result occupies a comparable position. Repeated experience of that relationship may make working under another person’s direction feel ordinary.

The bell makes the argument easy to remember, but its sound tells us very little on its own. A hospital team also needs agreed handover times. A more revealing question is who has discretion. Can the teacher keep talking after the bell while a pupil needs permission to finish a sentence? Do some groups regularly design investigations while others spend most lessons following instructions? Those observations would help us distinguish the practical need to coordinate time from the unequal power to control it.

11.20 am | What does a test reward?

Imagine a teacher returning a marked test. A pupil who scored 62 per cent looks pleased until the neighbour at the next desk whispers, “I got 74.” No one has announced a competition. In the space of a few seconds, both pupils know who has won.

For Parsons, assessment is part of role allocation, the process through which people are selected for different educational and occupational positions. An engineering course might reasonably ask for mathematical competence. A common assessment can give a talented pupil the chance to demonstrate it, including a pupil whose family has never sent anyone to university.

Bowles and Gintis invite us to examine the reward itself. If the first question after every task is “Does it count towards my grade?”, pupils may learn to work for a judgement delivered from above. And if pupils have unequal access to quiet study space, equipment or individual help, the resulting order of marks can make unequal preparation look like a straightforward ranking of talent. Identical marking criteria and equal chances to meet them are two separate claims. A sociologist would want evidence about both.

12.40 pm | Whose approval matters at lunch?

A pupil describes answering a difficult question in class. At one table, friends ask how she worked it out. At another, somebody does an impression of the teacher praising her. Everyone laughs. Next time she knows the answer, she might think twice about raising her hand. To understand that decision, we need to know what earns respect at her table.

Paul Willis pursued this question in Learning to Labour (1977). His ethnographic research followed a group of twelve working-class boys in an English industrial town, observing and talking with them at school and following their transition into work. The “lads” built a counter-school culture. Having a laugh, defying teachers and valuing manual work offered ways to earn standing among friends. They made judgements of their own about the future the school held out to them.

Here is the puzzle Willis helps students grasp. Rejecting school authority gave the lads a sense of independence. Their rejection of qualifications, alongside their pride in a masculine culture of manual work, also helped steer them towards jobs like those of the generation before them. Social reproduction means the continuation of social patterns, including class inequalities, across generations. In this case, resistance itself helped carry the pattern forward.

Willis could hear the meanings behind a joke that a register of sanctions would miss. Twelve boys in a particular industrial setting, however, give us little basis for estimating how common this response is among pupils today. Even in our imagined lunchroom, the next table treats academic success differently.

2.15 pm | The careers meeting and the option nobody mentions

At a careers afternoon, two pupils say they enjoy solving mechanical problems. One leaves with information about an engineering degree. The other leaves with details of an engineering apprenticeship. Both routes could lead to skilled, rewarding work. The sociological question is how each conversation began. Were both pupils offered both possibilities? Who asked about the cost of travel, the appeal of earning a wage or the pupil’s preferred way of learning?

A functionalist explanation is persuasive where advisers discover different interests and help pupils find a suitable route. A social reproduction explanation gains weight if equally qualified pupils repeatedly hear about different possibilities according to assumptions about their families. To investigate, compare the advice given to pupils with similar interests and results, then ask the pupils what they actually wanted. Looking only at their eventual destinations would hide the most interesting part of the process.

Try it | Write the missing lines on your timetable

Take yesterday’s timetable, or reconstruct a day from your own school years. Add registration, break and lunch. Choose three moments you remember clearly. For each, record what happened, what someone might learn from it, which perspective best explains it and one detail that could change your mind. Describe an action you could have seen or heard before giving it a theoretical label.

Timetable entryWhat happenedPossible unwritten lesson and best fitDetail worth checking
RegistrationThe class waited while a late arrival collected the shared kit.My timing affects other people. Functionalist socialisation fits because pupils depend on one another.Would the delay matter in the same way during private reading?
ScienceOnly the highest set chose the question for its investigation.Some pupils practise directing work while others practise carrying it out. Bowles and Gintis help explain the uneven experience of authority.Is this a recurring difference, and who gets access to each set?
LunchA pupil tucked away a revision card when friends started teasing.Peer approval can shape how openly someone engages with schoolwork. Willis helps explain the audience for the gesture.Did the pupil reject revision or simply prefer to revise in private?

For a family version, have two generations annotate the same entry independently. Try “assembly”. One person may remember the first time their music was applauded. Another may remember practising how to stand perfectly still. Ask what happened in the room that made each memory stick.

A-level essay skill | Make the example earn its place

Consider the question “How far does the hidden curriculum prepare pupils for working life?” It is tempting to write, “Schools have bells and factories have bells, so Bowles and Gintis are right.” The missing step is an explanation of what pupils might learn through repetition. Try this paragraph instead.

Bowles and Gintis suggest that schools can prepare pupils to accept workplace hierarchies. Suppose a class regularly has to abandon unfinished work at the bell, while teachers can decide when an exception is justified. Over time, pupils may learn that control over the working day belongs to the person supervising them. That expectation could carry over into a job where a manager sets the pace. A functionalist could explain the timetable as a way to coordinate shared rooms and equipment. The correspondence argument therefore rests more convincingly on the persistent difference in who may vary the rule than on the existence of the bell itself.

Cover the first sentence. Can you still identify the theory from the reasoning? Now cover the last two. What has the answer lost? This is a useful revision check at Hemel Private Tuition. A named sociologist earns their place in a paragraph when their idea helps the reader understand something the example alone could never establish.

What stayed with you after the last bell?

Think back to the pupil who arrived late after giving directions. Years later, that pupil may have forgotten the date, the classroom and which subject came next. They may still remember whether the adult at the door said, “You’re late,” or asked, “What happened?”

Schools teach knowledge. They also give children thousands of small experiences of being heard, being ranked, taking responsibility and deciding when to speak. Some of those experiences help people work together. Some make unequal authority feel natural. Pupils bring their own loyalties and ambitions through the gate, and sometimes the lesson they take home surprises everyone who planned the day.

If you are a parent, try a different question tonight. “Who got to make a decision at school today?” Ask your child for one example, then give them one from your own school days. Somewhere between those two stories, the hidden curriculum becomes something you can actually discuss.

Further reading

  • Talcott Parsons (1959), “The School Class as a Social System”. The original account of socialisation and allocation in the American classroom. Read the paper.

  • Samuel Bowles and Herbert Gintis, “Schooling in Capitalist America Revisited”. The authors return to their 1976 argument about schooling and workplace hierarchy. Read the authors’ paper.

  • Paul Willis (1977), Learning to Labour. An ethnographic account of how the lads understood school and work. Publisher’s book page.

28 November 2026

Ports Aren’t Physical Sockets — So What Are They?

 


Ports Aren’t Physical Sockets — So What Are They?

Change one digit in a web address and the sailing club’s race results disappear. In their place is the camera running order. Both pages come from the same computer. How did the browser choose between them?

On the back of my studio equipment, a port is something I can point to. Follow an HDMI cable and I can show you exactly where a camera is plugged in. Ask me to point to port 443 on my Linux computer and I’d bring up a terminal on the screen.

It’s a question worth asking after building a web server. We’ve seen how DNS finds an IP address and how packets travel across a network. But suppose the packets have arrived. The Linux machine runs a website, answers DNS queries and accepts remote logins. Which program should receive the next piece of data?

One address can have several things to say

A port is a number carried in a TCP or UDP header. When a new TCP connection arrives, the operating system uses the transport protocol, local IP address and destination port to find the software socket waiting for it. A socket, in this sense, is a communication endpoint that a program asks the operating system to create.

Take the address http://127.0.0.1:8000/ apart. The http tells the browser to speak HTTP. The 127.0.0.1 is the IPv4 loopback address, meaning this very computer. The 8000 after the colon tells the browser which TCP port to contact. The final slash asks for the root of that website.

In the TCP/IP stack, those jobs sit at different layers. IP handles addressing and delivery to the host. TCP carries an ordered stream of bytes between endpoints. HTTP gives those bytes meaning as a request for a page and the server’s response. We can watch all three at work without sending anything down a cable.

Why browsers usually leave the port number out

Imagine having to ask for the port number of every website you visited. Protocol defaults save us that conversation.

ServiceUsual server port and transportWhat a client asks for
HTTP80/TCPA browser requests a web page.
HTTPS443/TCP for HTTP/1.1 or HTTP/2, usually 443/UDP for HTTP/3 over QUICA browser requests a page over an encrypted connection.
SSH (Secure Shell)22/TCPAn SSH client opens an encrypted terminal session on another machine.
DNS (Domain Name System)53/UDP or 53/TCPA resolver asks for a record, such as the IP address associated with a name.
NTP (Network Time Protocol)123/UDPA computer obtains timing information to synchronise its clock.

Type an HTTPS address without a port and the browser has a default of 443. Give it http://127.0.0.1:8000/ and you have explicitly chosen HTTP on 8000. The Python servers below do exactly that. Equally, moving a plain HTTP service to 443 would do nothing to encrypt its traffic. Encryption depends on what the client and server actually do.

Notice that DNS appears against both UDP and TCP. Each transport has its own set of port numbers. Linux can have a UDP socket and a TCP socket bound to port 53 at the same address.

Linux practical — give one computer two front pages

You’ll need a Linux machine with Python 3.7 or later, the ss command, and a browser on that machine. Allow about ten minutes. Two terminal tabs will run the servers and a third will let you observe them.

1. Take a reading before you start. In the third terminal, run the following command.

ss -lntu

Read the switches as a sentence. Show sockets waiting for traffic (-l), keep the ports numeric (-n), and include TCP (-t) and UDP (-u). Concentrate on State and Local Address:Port. A TCP row marked LISTEN means a program is ready to accept a connection. UDP is connectionless, so a bound UDP socket waiting for datagrams commonly appears as UNCONN. A short list is a perfectly good starting point.

Look for 8000 and 8001. If either TCP port is already in use, choose two unused high-numbered ports, such as 8100 and 8101, and substitute them throughout.

2. Put the race results on port 8000. In the first terminal, enter these commands.

race_dir=$(mktemp -d)
echo '<h1>Race results</h1>' > "$race_dir/index.html"
python3 -m http.server 8000 --bind 127.0.0.1 --directory "$race_dir"

Leave that terminal running. The first two lines create a fresh temporary folder with a single page in it. The third starts a small web server and binds it to the loopback address. Open http://127.0.0.1:8000/ in the browser. You should see Race results. Look back at the terminal to see the server log the browser’s request.

3. Put the camera running order on port 8001. In the second terminal, enter these commands.

camera_dir=$(mktemp -d)
echo '<h1>Camera running order</h1>' > "$camera_dir/index.html"
python3 -m http.server 8001 --bind 127.0.0.1 --directory "$camera_dir"

Open a second browser tab and change the last digit of the port to make http://127.0.0.1:8001/. The heading now reads Camera running order. Both servers received a request for the same path, /, at the same IP address. The destination port determined which Python process received each connection.

4. Find the evidence on the Linux machine. In the third terminal, run the following command.

ss -ltn

Among the other sockets, look for these two rows. Here are the relevant columns from the test run.

State    Local Address:Port
LISTEN   127.0.0.1:8000
LISTEN   127.0.0.1:8001

Try ss -ltnp to add the process name and process ID where your account can see them. The two Python processes can have the same name. Their process IDs distinguish them.

The address column matters. A listener on 127.0.0.1 accepts connections from this machine. A TCP listener showing 0.0.0.0 is bound to all local IPv4 interfaces. Whether another machine can reach it also depends on the network and firewall. If you type our loopback address on an iPad, the iPad will look for a server on the iPad.

The client has a port of its own

So far we have chosen the server ports. Who chooses the client’s port? When a browser opens a fresh TCP connection, its operating system normally assigns a temporary source port, also called an ephemeral port. You can catch it in the act using the command-line web client curl. With the race-results server running, use the third terminal for this command.

curl -sS -o /dev/null -w 'Client port %{local_port}, server port %{remote_port}\n' http://127.0.0.1:8000/

One run gave Client port 42348, server port 8000. Your client number will probably differ. For the request, TCP’s source port was 42348 and its destination port was 8000. For the reply, the numbers swapped roles.

Here is the answer to another good A-level question. How can thirty pupils use the same web server on port 443 at once? Each TCP connection is identified by both ends — the client IP address and port together with the server IP address and port. A server can accept many distinct connections on 443 while it continues listening there for the next pupil.

This gives a practical route into OCR A Level Computer Science H446, section 1.3.3, which brings together protocols, the TCP/IP stack, layering and client–server networks. On a Windows PC, students can compare TCP listeners by running Get-NetTCPConnection -State Listen in PowerShell and finding the LocalAddress and LocalPort columns.

The question I’d finish the lesson with

Before touching the keyboard, I’d ask a student to point to the page they expect to survive when we stop the race-results server. Then press Ctrl+C in its terminal, run ss -ltn again, and make a fresh request to each address. A page already displayed can remain on screen, so use a hard refresh or request each URL with curl.

The 8000 listener disappears. A fresh connection to it fails. The camera running order on 8001 still loads. Press Ctrl+C in the camera server’s terminal when you’ve finished.

That’s the moment I like in a practical. A student who started with “HTTP is port 80” can now explain why HTTP worked on 8000, why the other page survived and why the same computer could play both client and server. Next time they see a number after a colon in a web address, they have a better question to ask. What is listening there, and what does it expect me to say?

Why Does pH Change So Dramatically? The Chemistry of Indicators

  Why Does pH Change So Dramatically? The Chemistry of Indicators The first drop of sodium hydroxide can turn a little patch of an acid solu...