Why every programmer starts their journey by saying hello to the entire world
In short: The tradition of the Hello, world program is a rite of passage for coders, serving as both a syntax introduction and a vital sanity check. While it seems simple, this humble greeting has a surprisingly deep history, evolving from 1960s mainframe experiments to a modern benchmark for software accessibility.
The origins of the phrase are older than the C programming language. While often associated with the 1978 book The C Programming Language, the tradition likely traces back to the BCPL language in 1967. Before it became a computing staple, the phrase was already a popular catchphrase used by New York radio disc jockey William B. Williams throughout the 1950s. Brian Kernighan, who popularized the example in his 1974 Bell Laboratories memorandum, had previously used a version of the greeting in his 1972 tutorial for the B language, where character limits forced the phrase to be broken into multiple variables.
Today, the program serves as a metric for language design. Developers often measure the 'Time to hello world' (TTHW) to gauge how approachable a new language or API is. In scripting languages like Python, the task requires only a single line of code. Conversely, low-level languages like C++ demand more complex setup, including library imports and explicit entry point declarations. In some functional languages, the tradition is even subverted; because printing text creates side effects, developers may instead write a factorial program to demonstrate the language's core logic.
The concept has adapted to the hardware it runs on. For embedded systems like microcontrollers, where text output is difficult to implement, a blinking light-emitting diode often replaces the traditional text string. In the realm of graphics, rendering a triangle—the 'Hello Triangle'—has become the modern equivalent for testing new libraries. Some experts, such as Mark Guzdial and Elliot Soloway, argue that the text-based test is becoming outdated, suggesting that modern developers should focus on manipulating graphics and sound as their first meaningful interaction with a new system.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: Hello, world
To cite this card, link to https://intellectplus.co.uk/app/technology-hello-world.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in UK & Ireland: inventions · More in Technology · Latest · A–Z · All topics