The Hello World of CGI

by Jonathan Wellons

We all know that Hello World is the first program many people write in a new language or to test that their development environment is properly configured.

But there's actually a family of domain and paradigm specific Hello Worlds, for instance, the factorial program could be the Hello World of functional programming.

I've been told that the Hello World of CGI is a page with a drop down menu of colors. On submitting, the page background is changed to the selected color. I used this in my entrance into Ruby CGI early today.

I'd love to make this list longer, but I don't know what the prototypical first program is for OO, or for Logic programming or database access. If I collect more I'll post them here. If you have ideas, please leave a comment.

5 Comments

will
2006-11-18 01:20:01
99% of prolog intros begin with a "family tree" program. google for "prolog parent child sibling".
Jonathan Wellons
2006-11-19 12:55:10
Dear will,


Thanks! For my future reference: The Google Search.

Nick Dixon
2006-11-20 02:42:49
When checking a new Apache setup, I usually begin with env.cgi:

#!/bin/sh


echo "Content-type: text/plain"
echo "\r\n"


env


Note the old-timer use of Bourne shell as the scripting language, because it's the simplest thing that could possibly work (and env is less typing than echo "Hello, World!").

Steffen
2006-11-24 06:28:26
Hi,


I daresay the prototypical start into OO is something like Cat and Dog classes inheriting from the Animal class. Usually, some method like "sound" is overridden in the subclasses.


Steffen

Jane, Caroline, Grandma, and Brenna
2006-12-28 11:16:00
Hi Jonathan,


We searched you on Google. Happy New Year! Today the weather is 70 degrees here in Gainesville. Grandma and Bill still have your old Apple, what should they do with it (please call or email!!!!!!!!!!)?