Wednesday, September 10, 2008


Back in the last century when I started programming, you would create the canonical example program by opening an editor and creating a text file called 'hello.c' with these contents:
#include <stdio.h>

int main(
int argc,
char** argv
printf("Hello, world!\n");
You would feed this file to a compiler program, which would generate another file that you feed to a linker program, that would in turn generate the final executable program. Finally you would run the program from a command prompt and it would print:
Hello, world!
These days the same task might be accomplished with a single command:
ruby -e 'puts "Hello, world!"
This is an overly simple example of course, but I think it is an illustrative one.

Note for programmer types: The second example uses the Ruby programming language, which you can get a taste of without needing to install anything by using this nifty web site.

No comments: