Cubic Pixel
GET IN TOUCH
PRODUCTS WORK PLAYGROUND BLOG ABOUT GET IN TOUCH
HOME / BLOG / ARTICLE

Hello, World

APRIL 25, 2026·8 MIN READ
Hello, World

Somewhere right now, a person who has never written a line of code in their life is sitting in front of a screen, has just installed their first programming language, and is about to type a sentence that, by some quiet international agreement, marks their initiation into the craft. They are about to ask a machine to greet the planet on their behalf.

It will work. The machine will say hello, world — usually with no comma, no exclamation mark, and a curiously lowercase h, because tradition was set by a man who could not be bothered to capitalise it in 1972 and the rest of us have respectfully kept the inconvenience alive ever since.

This is the story of how two words became the secret handshake of an entire profession.

The man, the memo, the chick

The phrase, in its programming sense, traces back to Brian Kernighan, working at Bell Labs in 1972 on an internal manual called A Tutorial Introduction to the Language B — the predecessor language to C, which Kernighan would go on to co-author with Dennis Ritchie a few years later.

There is a popular myth, repeated in enough places that it has acquired the texture of fact, that the program first appeared in Kernighan’s documentation for an even older language called BCPL. This is a charming origin story. It is also, according to Kernighan himself, not true. When asked directly by a researcher trying to settle the matter, he replied that he had never written a single line of BCPL in his life and that the original example was for the internal B manual he wrote at Bell Labs.

So that settles it: the program is fifty-something years old, its author is still around to correct the historical record, and most of the internet still gets it wrong. A useful lesson about secondary sources, if nothing else.

The actual reason Kernighan picked the phrase is, charmingly, almost nothing. He told Slate in an interview that he had recently seen a cartoon of a chick coming out of an egg saying Hello, World, and it tickled his fancy, so he used that.

That is the entire creative process behind the most-typed sentence in the history of computing. A cartoon chick. A small whim. A footnote in a technical manual that nobody outside Bell Labs was supposed to read.

The lesson, if you want one, is that almost nothing in technology was deliberately designed to become iconic. Most of it became iconic by surviving long enough that nobody could remember when it was not there.

The original program is delightfully weird

The first documented Hello, World does not look anything like the version you would write today. Kernighan was using it to demonstrate something called external variables, and the way the language handled strings at the time meant the message had to be assembled from four-character chunks. The actual code, faithfully preserved, looked roughly like this:

main( ) {
  extrn a, b, c;
  putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';

The greeting, in other words, was not a string. It was three variables called a, b, and c, each containing a four-letter slab of text, glued together at runtime. To say hello, world in 1972, you had to literally cut the phrase into pieces and ask the computer to reassemble them.

There is something almost archaeological about it. The version we use today is a fossil — smoothed by half a century of evolving languages — but the bones underneath are still that strange little jigsaw puzzle from a Bell Labs memo.

The book that launched a thousand tutorials

The phrase did not really enter the bloodstream until 1978, when Kernighan and Ritchie published The C Programming Language — a book so foundational it is universally known by the initials of its authors, K&R, the way certain religious texts are known by their first words.

The book opens, on roughly its first page, with this:

#include <stdio.h>

main() {
  printf("hello, world\n");
}

That was it. The handshake. The here is the smallest possible thing that proves the whole apparatus works. Every C tutorial that followed copied the example. Every other language that wanted to feel familiar copied it from C. Java copied it. Python copied it. Rust copied it. Even languages that exist mostly as a joke, designed to be as hostile to the programmer as possible, copied it — and then made writing it a cruel and unusual punishment, which is its own kind of homage.

By the late 1980s, the convention was so entrenched that not opening a programming tutorial with Hello, World would have felt like beginning a wedding without the music. The pattern had outgrown its inventor.

Why it stuck

On the surface, the program is trivial. It prints a string. A child could write it. A particularly motivated cat could probably write it.

But that is exactly the point.

Hello, World is not really a demonstration of a programming language. It is a demonstration that the programmer’s environment is alive — that the compiler exists, the runtime is configured, the standard library is reachable, the terminal is listening, and the long, fragile chain of moving parts between thought and output is, against all odds, intact. It is the ping of software development. It is the reason why, when nothing else is working, an engineer will type out the smallest possible program in the world and run it just to confirm that the universe still has the basic decency to respond.

There is also the emotional weight, which is harder to name. Most people remember their first Hello, World the way they remember learning to ride a bicycle. The machine does what you told it to. It does it instantly, perfectly, and without complaint. The person who wrote it, however briefly, has the unnerving experience of being listened to by a thing that does not normally care.

A developer once told a journalist for Slate that coding gives you “a little universe to control, that you create”, and that this feeling never quite goes away. That, more than any technical merit, is why Hello, World survived. It is the moment the door opens.

Variations on a theme

Once a tradition is old enough, it starts to mutate. Hello, World has been ported to almost every programming language ever invented, and a few that nobody asked for. There is an entire collection website cataloguing the variants, which sounds like a parody and is in fact a sincere archive.

Some communities have politely substituted their own version. Functional programming languages like Lisp, ML, and Haskell tend to substitute a factorial program for Hello, World, because functional programming emphasises recursive techniques and the original example produces side effects, which violates the spirit of pure functional programming. This is, in its way, a deeply on-brand reaction from the functional programming community.

In hardware, where there is often no screen to print to, the equivalent is the blinking LED — a small light that turns on, then off, then on again. It does the same job: proves the toolchain works, proves the chip is alive, proves the human at the keyboard has, against meaningful odds, communicated with the silicon.

In computer graphics, the convention is the Hello Triangle — a single triangle rendered to the screen, which is genuinely difficult the first time you do it and explains why graphics programmers have a particular look in their eyes.

And then there is Malbolge, an esoteric programming language designed to be deliberately, almost philosophically unusable. The first working Hello, World in Malbolge took two years to be announced, and it was not produced by a human at all — it was generated by a program written in Common Lisp. It is a small, beautiful monument to the idea that any sufficiently committed community will eventually build something terrible on purpose.

Time to Hello World

Somewhere along the way, the program also became a unit of measurement. It is called Time to Hello World, abbreviated TTHW — literally, how long it takes a new developer to install a language and produce its first running greeting.

It is a useful metric in a way that more rigorous benchmarks often are not. A language with a long TTHW is telling you something honest about itself: that the on-ramp is steep, the tooling is fussy, and the first hour of the relationship is going to be a slog. A language with a short TTHW — Python is the canonical example, where the entire program is one line — is making a quieter claim about its values.

Languages, like people, reveal a lot about themselves in how they say hello.

A small, persistent ritual

What is striking about Hello, World, half a century in, is how stubbornly the ritual has refused to evolve. The languages have changed. The hardware has changed. The screens are sharper. The tooling is unrecognisable. But the first program a person writes, in almost any language, is still those same two words — usually lowercase, often without punctuation, lifted faithfully from a man’s whim about a cartoon chick in 1972.

Most professions do not have a shared first sentence. Doctors do not all begin their first patient consultation with the same words. Lawyers do not have an opening line they all say to their first client. Programmers do.

It is, when you stop and think about it, one of the few genuine pieces of folk culture in a field that mostly invents itself from scratch every five years. A small, deliberate echo across generations of practitioners who have never met. A handshake between every developer who has ever written code and every one who is about to.

Hello, world.

Still working. Still listening.

Welcome in.

Ghassan
WRITTEN BY
Ghassan

Builder behind Cubic Pixel. I spend my days on large digital platforms and my nights making things of my own — apps, tools, music, experiments. I write about digital systems, product craft, and the stories behind the technology we take for granted, mostly as a way of understanding it properly myself

ABOUT ME

Comments

NO COMMENTS YET
Be kind — comments are moderated.
Thanks — your comment is awaiting moderation.
No comments yet.

Be the first to share your thoughts — I read and reply to every comment.

← PREVIOUS The Cube and the Pixel NEXT → The Moth in the Machine
← BACK TO THE BLOG