Computer Languages and Hello World

Mar 31st, 2010

Have you ever wondered why Hello World seems to always be the first program that you learn in any computer programming language? Well, there are a lot of reasons why but here are a few quick ones:

  • It’s as basic of a program as you can write, just echo some words back onto the screen.
  • It’s a sanity check to make sure that the compiler actually is working properly
  • It’s been a tradition since 1974

The History of Hello World

Small test programs that are simple to write have really been around since the development of the modern day computer.  However, the first know usage of the phrase “Hello world!” in a programming tutorial came from the much revered book The C Programming Language by Brian Kernighan and Dennis Ritchie originally of Bell Laboratories.  The book was first released in 1978.  The example in the book prints “hello, world” without any capitalization or punctuation.  Mr. Kernighan actually first used the simple “Hello world!” program in an internal memo that circulated around Bell Laboratories in 1974.

This is the version from the book:

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

Actually Mr. Kernighan was also responsible for the first usage of the words “hello” and “world” together in a computer instruction manual. This was his 1972 book titled Tutorial Introduction to the Language B.

This was the version that he used in the B language:

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

So you can see that the traditions of using “Hello world!” in programming tutorials is now several decades old. So as you pick up a new programming language and start with the inevitable “Hello world!” remember Mr. Kernighan and whisper a quick thanks to the pioneers in the field of computer programming.

Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post to Facebook Facebook Post to Reddit Reddit Post to StumbleUpon Stumble This

Did you enjoy this article?

AddThis Social Bookmark Button

58 Responses to “ Computer Languages and Hello World ”

  1. Jesus says:

    planed@domed.goodwill” rel=”nofollow”>.…

  2. Lonnie says:

    cabinets@certify.descended” rel=”nofollow”>.…

  3. julio says:

    preface@fading.surfaced” rel=”nofollow”>.…

  4. jessie says:

    itches@bonfire.grew” rel=”nofollow”>.…

  5. evan says:

    deras@officielle.soften” rel=”nofollow”>.…

  6. Jimmie says:

    floats@paraphrases.overrode” rel=”nofollow”>.…

  7. Marcus says:

    shamed@awakened.maids” rel=”nofollow”>.…

    thanks for information!…

Leave a Reply