coding, web development

Hello, World!

Is there a better first statement than “Hello, World!”?

It carries the same powerful message as “Greetings, Planet! I’m here. Deal with it!” in a compact, pithy package.

Many programming students wrote “Hello World” as their first output.  (The original such use is widely attributed to Brian Kernighan of Bell Labs.)

Ways to Say It

The syntax required to produce “Hello World!” gives you a flavor of the language.

In Java one would type the following:

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!");

In JavaScript, one would code the following:

document.write('Hello, World!');

A PHP programmer’s first line is typically something like this:

echo "Hello, world!";

This syntax hints that it’s a lot easier to get up and running in JavaScript or PHP than in Java (The further implications of that suggest a subject for another day).

It’s fairly easy to get started with WordPress — the platform does the actual coding for you.

Ways to Say It, Part 2

But what is in between the quotes?  Doesn’t that say something about the programmer’s (human) language?

Shouldn’t there be a comma in “Hello World”?  In English, commas are used to set off words of direct address, and you’re directly addressing the World.  Speaking of which, “World” should be capitalized – you’re not addressing any world, you’re addressing THE World — by name!  And an exclamation point, for that matter — First impressions count – don’t you want to be seen as enthusiastic about your very first output!

So, “Hello to you, World — hello!”


%d bloggers like this: