Hello, World! — A Developer's First Lines of Code

There is a quiet ritual that unites programmers across generations, languages, and continents. It is not some sacred oath or secret handshake. It is a single line of code, typed into a terminal, that prints two words onto the screen: Hello, World.

I still remember mine. A dimly lit dorm room, a borrowed copy of JavaScript: The Good Parts, and a console.log("Hello, World") that felt less like a command and more like an introduction. The computer answered back. I had spoken to it, and it had spoken to me.

That moment never gets old.

Where It Came From

The Hello World tradition traces back to 1978, when Brian Kernighan and Dennis Ritchie published The C Programming Language. In Chapter 1, they introduced readers to their first C program:

#include <stdio.h>

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

The book became the gold standard for programming texts, and its opening example became the default first program for countless developers. There is something fitting about it. Hello World is not complicated. It does not try to be. It simply works, giving a beginner their first taste of what it means to write code that runs.

Hello World in Four Languages

Every language puts its own spin on the tradition. Here are a few variations.

JavaScript:

console.log("Hello, World!");

Python:

print("Hello, World!")

Go:

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

Each one reveals something about the language itself. C is verbose and explicit. Python is concise and forgiving. Go is structured and formal. JavaScript meets you right where you are, in the browser console.

The Emotional Arc of a First Program

Writing your first program is surprisingly emotional. There is the initial doubt — am I even capable of this? — followed by the fumbling with syntax, the missing semicolon, the stray bracket. You run the code. It errors. You fix it. You run it again.

And then, finally, those two words appear.

For a brief moment, the machine that has always felt foreign and opaque does exactly what you told it to do. That feeling is addictive in the best way. It is the reason people fall in love with programming. It is the hook that turns a curious beginner into a lifelong builder.

A Note for Beginners

If you are reading this and you have not written your first line of code yet, stop overthinking it. Open a browser, press F12, and type console.log("Hello, World!") into the console. That is all it takes to start.

The programming community has a well-earned reputation for being unwelcoming at times, but the Hello World tradition is the opposite of that. It is an invitation. It is every developer saying, "I started here too. You can do this."

The first step is the hardest. But it is also the simplest. Just say hello.

If you want to dive deeper into the history, Brian Kernighan gives a great account in this interview with Forbes.