A Funny Java Flavoured Look at the World

Sunday, April 16, 2006

What was the first Hello World program

What was the first hello world program? Actually I was wondering why all the examples in a programming language start with this seemingly pointless Hello World example or does the basic Hello World program hold more significance than I thought.

It's really a quite bizarre ritual continued in most programming languages, yet it does supply a comforting start off example, especially once you appreciate what the Hello World tutorial is all about.

My research lead me to this excellent definition of the hello world

"The classic 'Hello World!' program is a useful absolutely minimal exercise in how to use a particular programming language on a particular system"

This highlights the purpose, it's the smallest starting block to which you can start to build programs.

this is a beautiful parody of the evolution of a programmer

The evolution of a programmer

this site is fantastic, it's a page which shows Hello World examples in many different languages

http://www2.latech.edu/~acm/HelloWorld.shtml


I think in some ways we take the Hello World tutorial for granted but the real benefit is for people who are programming in any language for the first time. The hello world example compiling and working shows people that programming isn't really that hard and that anyone can compile and get a program to run and say the immortal words of "HELLO WORLD". It shows you are doing everything correctly and from that base you can then try other things. It also shows the underlying setup is correct, proven by compiling and running the Hello World example.

There is even knowledge of when the first the Punctuation was added!

The answer to my question stolen from the fountain of all knowledge Wikipedia is

the first known instance of the usage of the words "hello" and "world" together in computer literature occurred in A Tutorial Introduction to the Language B, by Brian Kernighan, 1973 [1], with the following code:
 main( ) {

extrn a, b, c;

putchar(a); putchar(b); putchar(c); putchar('!*n');

}

a 'hell';

b 'o, w';

c 'orld';

Who knows what language B was when it was at home but if you would
like to find out, here is the link.
http://en.wikipedia.org/wiki/Hello_world_program

2 Comments:

Post a Comment

<< Home