“Hello, World” is the name given to the smallest useful program in almost any language: one that prints the greeting hello world and stops. It is the first thing most people run in a new language, the first thing most tutorials teach, and the quickest way to confirm that a compiler, interpreter, build chain, and terminal are all wired together correctly. Because it exercises the whole path from source text to visible output while requiring almost no logic, it functions as a universal smoke test.
The phrase enters the historical record in Brian Kernighan’s “A Tutorial Introduction to the Language B,” written at Bell Labs around 1972 and circulated as part of the documentation for B, the predecessor of C. The tutorial introduces character handling with a tiny program built around the word “hi!” and the putchar routine, the direct ancestor of the later greeting. Kernighan has described the choice of a friendly greeting as deliberate: a beginner’s program should produce something cheerful and unmistakable on the screen.
The version everyone remembers comes from “The C Programming Language” by Kernighan and Ritchie, published in 1978. There the very first example reads main() { printf(“hello, world\n”); }, and the book tells the reader that the only way to learn a new programming language is by writing programs in it, and that the first program to write is the same in all languages: print the words hello, world. That instruction, coming from the authors of C itself, fixed the convention for generations of programmers.
From C the ritual spread everywhere. Nearly every language reference, tutorial, and online course opens with its own hello world, and large collections now catalog the program in hundreds of languages. The exact punctuation and casing drift, lowercase in K&R, title case elsewhere, but the role stays constant.
Style guides treat that first line of output as a teaching surface, too. Python’s PEP 8, for example, frames its conventions around readable example code, and a hello world is usually where a learner first meets a language’s syntax for strings, statements, and output. The program is trivial as computation and load-bearing as culture.
Hello world also became a shared in-joke and a benchmark of friction: people compare languages by how much ceremony their hello world requires, a verbose enterprise version versus a one-liner. In that sense the humble greeting doubles as a running commentary on language design, which is part of why it has never been retired.