Hello, World!
Tags: programming, computerscience, history, c
Published: 2022-05-20 13:28:44

---
title: Hello, World!
published: true
description: “Hello, World” is a very simple and fast program to test if your application is running and compiling.
tags: #programming #computerscience #history #c
//cover_image: https://lh6.googleusercontent.com/pGMrrtotWmVEJxf7O2vTzKXpv2DxjMixR9jlPuRtLSG9-uIDQKg5n0CjnXjTQb-PWiAyP_OS65phm8qC09NcIkOOLQEUFRRfZx-7YtsEcByXEfsHcUduQsvMougXa1UVHVi0JmcgIulzIgIxbg
---


“Hello, World” is a very simple and fast program to test if your application is running and compiling. It is used by multiple students and is typically the first thing a new programmer learns in any language.

  

On my first day at college, my teacher told us that not starting a new programming language study with a “Hello, World” statement gives us bad luck. I don’t believe in superstitions but I kept his advice anyway. The first thing I ever programmed was a Java print statement using “Hello, World” and since then, every time I learn a new language I remember his advice.

  

![Java "Hello World" program inside a grey window, with a purple background.](https://lh3.googleusercontent.com/x4svx9o7SLFbIq14sUztxqwIKKU3wD1Wa0HsJtWv0LAErwWJ2V7kXmwC-kTHEVbiCQ1xPPd62MeKc9moWnCHF1K2gBX-HcyxeeamqgQ7vyxC3_w8Rpq27WMRBPjlifAk4x4ENSBG51P31pS0hQ)



From there on, I became very curious about the statement. I’m not trying to be philosophical but “Hello, World” could mean a lot of things.

  

I always think about the “My Computer Likes Me When I Speak in BASIC” (1972) book, written by Bob Albrecht, where the example used in the print statement is the sentence “my human understands me”. It’s like the machine knows it is a machine, knows that we are not a machine and we are the ones who understand. It's not us that are trying to translate our language to the machine, but the machine is trying to make us understand their language. For the first time, I thought about the communication between man and machine (Warning: Yes, I might have seen Ex-Machina and Wall-E too many times). Isn’t “Hello, World!” a greeting from the machine? Are they communicating with us? And “I’m here, I now exist and you can communicate with me”? Ever since then, I kept thinking about it and now is the time I search about it.

  

Historically, the “Hello, World” culture begins with Brian W. Kernighan’s book: A Tutorial to the Programming Language B (1972). (I didn't know that the Language B existed. Is there a whole alphabet of languages?) In the book, while illustrating external variables he uses, for the first time, the famous “Hello, World”.

  

![B "Hello World" program inside a grey window, with a purple background.](https://lh6.googleusercontent.com/pGMrrtotWmVEJxf7O2vTzKXpv2DxjMixR9jlPuRtLSG9-uIDQKg5n0CjnXjTQb-PWiAyP_OS65phm8qC09NcIkOOLQEUFRRfZx-7YtsEcByXEfsHcUduQsvMougXa1UVHVi0JmcgIulzIgIxbg)

  

When asked about why he chose this simple statement he said he didn’t quite remember it: “What I do remember is that I had seen a cartoon that showed an egg and a chick and the chick was saying, “Hello, World.”. So, that’s it… I guess the philosophy behind it is all about a chick. No big metaphysical response. It had to be something big, no? Why do we keep using it? How did it become so popular? I had to keep searching for it.

  

The thing is: Brian W. Kernighan was a friend and inspiration to Dennis M. Ritchie, the creator of C (and answering my question, there are a lot of programming languages with one letter in the name, but that may be a subject for another article). At the time, they were both working on AT&T and wrote the “The C Programming Language” (1978) book together. In it, they kept the “Hello, World” statement:

![C "Hello World" program inside a grey window, with a purple background.](https://lh3.googleusercontent.com/u_YW9CCjhSgiAwrs2xMBGXJcptYN_yuSLllDw52LG6UVL27K9_MXiwN8o9D0DyrK-TfWn1EcvUV5m6O3Lk0k8kYrXQwjcLCCKKA-RS6MBGh6G7_q22xjcUl--NLEU3Wem1zPcYgM2igpXiNffw)

  
  

It was the second appearance of “Hello, World” and since then, it has become a popular program to use as the first example of any language, appearing in almost every book and tutorial, making it a tradition in Computer Science.

 

Maybe, "Hello, World" it's just a welcoming way of starting a new journey into knowledge!