If you ever been in contact with programming, on any level, you’ve probably heard of “Hello, World!”. It’s since a long time famous to be the first thing you’ll learn to write. It’s often used as a introduction for beginners, to show the minimum syntax needed. “Hello, World!” also functions as the first program many writes when they are new to a language, to learn it’s functions. If you are learning a new language, “Hello, World!” is a good thing to start with.
Originally, “Hello, World!” was used as a test message in the first small test programs. The very first version of “Hello, World!” was first mentioned in a tutorial for the B programming language, written by Brian Kernighan. It was later described in the book The C Programming Language, and it was after this that it became widely spread. The example program from the book printed “hello, world” and it has since then become an iconic phrase. Today, the program for “Hello, World!” is used in many ways. Below, you see the original code, written for C.
Not only is “Hello, World!” for programmers learning a new language. It’s also frequently used as a sanity test. Well, for the computers, I may add. It’s used to check the language programmed in the computer, to make sure it’s correctly installed. It makes sure the computer knows what to do, and knows how to allow the user to operate it.
Even hackers use it frequently to show security flaws, among other things. Hackers use it as a proof of concept to show that the code can be executed through an exploit. It may not be harmful, but it shows the system designers where it needs more work.
Although, “Hello, World!” does not always look identical throughout the different languages. For example, the first non-trivial Malbolge program made it a bit different. Instead of two capitalised letters and the comma as well as the exclamation mark, it printer “HEllO WORld”. The programmers may be a bit disappointed, but they however found it good enough. Also, some programs are not allowed to write the exclamation mark and comma, as well as some prints everything in upper cased letters. With time comes more programs and the phrase has eventually come to be replaced in some contexts. Some devices may instead use a blinking LED light to indicate that it works as wished.
However, I can highly recommend to learn the “Hello, World!” program in whatever language you are currently working with. It’s easy to work with and while using it, you get to know the language very well.