top of page

Hello, World!

One of the rites of passage for anyone learning a programming language is the creation of their first program. For many, the first program will be to display the message “Hello, World!”.

Small test programs are obviously useful, to confirm that the computer is working and the language is properly installed, but the use of “hello, world” (,_World!%22_program) apparently derives from the classic book “The C Programming Language”, written by Brian Kernighan and Dennis Ritchie in 1978.

I was first introduced to programming with the Turing ( programming language, which was used at University of Toronto in the 1980’s, but didn’t end up pursuing programming at that time. Later, I learned C – while I didn’t use the Kernighan / Ritchie text, the first exercise in the text I used (“C: A Software Engineering Approach”, by Darnell and Margolis, which I still have) was “Write a main() routine that prints Hello, world.”

So, obviously, now that I have installed the LAMP stack (, I wanted to get to the next step. Leaving aside mySQL for now, I did some basic configuration of the Apache web server, to set up a few test sites – this is the sort of thing that experienced people either automate or do without needing to think about it, but novices take quite a while to do. At any rate, I got it working.

Then, I built my “hello, world”, and decided to build in some variables, since I will want to connect to a database at some point.

Interestingly, as I discovered later, my program was an echo of a precursor to the C version, which appears in an earlier book by Kernighan, written about the B programming language.

main( ) {
    extern a, b, c;
    putchar(a); putchar(b); putchar(c); putchar('!*n');

a 'hell';
b 'o, w';
c 'orld';

I find the history of programming languages very interesting, and may do some research into them at some point, but I spent most of my time configuring Apache and PHP.

Shorter post than usual this week. We had a bit of excitement, when a jar fell (about 50 cm) from a cupboard onto our glass cutting-board, which shattered into tiny bits. No injuries, but it took a LONG time to clean the bits of glass from the counter, the floor, the stove, under the stove, and so on.



bottom of page