Headcode: Lamps that spoke for locomotives
To most people a code is written or digital. On the railway, it was a visual language spelled out in oil lamps mounted on the front of the engine.
In ordinary English, a code is a system of symbols, usually letters or numbers, used to convey information. It lives on paper, on screen, in radio waves. It is abstract. A headcode, by contrast, was concrete and visible: a train's identity told by the physical position of lamps.
British railways used the headcode system from the mid-nineteenth century into the modern diesel era. Signalmen watching a locomotive approach in darkness or fog could not read a nameplate or a number. Instead, they read the lamp arrangement. Two white oil lamps on the left side of the smokebox meant one class of train; two on the right meant another; one at top centre meant a third. A passenger express, a freight train, an empty stock working, a light engine: each had its own fixed position or combination. The code was not in letters but in geometry, in the brackets and the spaces.
This was not unique to Britain. European railways used similar systems, and the logic was universal: the position of lamps could be read from a distance, in any weather, without requiring the signalman to interpret text. The lamps themselves were often white discs in daylight and replaced by oil lamps at night, so the system worked across the full day-night cycle. The headcode was redundant too: a signalman saw it repeatedly as the train approached, confirming its class before it reached his signals.
The term 'headcode' captures the fusion of 'head' (the front of the locomotive, where the lamps were mounted) and 'code' (the meaning encoded in their position). It is a compound that belongs to railways and would have no sense outside them. As colour-light signals and later electronic route setting replaced the older telegraph-and-signal-box system, headcodes became obsolete. Modern freight locomotives in Britain still carry headlamp arrangements that reflect the old code positions, a ghost of the lamp language, but few signalmen alive today can read them as a code.
The dictionary entry
headcode
(noun, rail equipment)
A code used to distinguish classes of train for the benefit of signalmen, formerly by using white oil lamps (or white discs) placed on brackets on the front of the locomotive. The various lamp positions defined the class of train.