Power of Eloquence

When saying “Hello World!” isn’t enough anymore

My First Hello World Post

| Comments

Beginining my first technical blog.

What better way to share my write up a few samples of my favourite programming languages I was exposed to learning years ago since building my first family computer 20 years ago.

Java

Hello World - helloworld.java
1
2
3
4
5
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World");
    }
}

C/C++

Hello World - helloworld.cc
1
2
3
4
5
#include <iostream.h>
main()
{
    printf("Hello, World!");
}

C#

Hello World - helloworld.cs
1
2
3
4
5
6
7
public class Hello1
{
   public static void Main()
   {
      System.Console.WriteLine("Hello, World!");
   }
}

Basic

Hello World - helloworld.bas
1
2
PRINT "Hello World!"
GOTO 10

Perl

Hello World - helloworld.prl
1
2
3
4
5
6
7
8
9
10
 #!/usr/bin/perl
  #
  # The traditional first program.

  # Strict and warnings are recommended.
  use strict;
  use warnings;

  # Print a message.
  print "Hello, World!\n";

PHP

Hello World - helloworld.php
1
<?php echo '<p>Hello World</p>'; ?>

Javascript

Hello World - helloworld.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE HTML>
<html>
<body>

  <p>Header...</p>

  <script>
    alert('Hello, World!')
  </script>

  <p>...Footer</p>

</body>
</html>

Ruby

Hello World - helloworld.rb
1
2
3
def say_hello
    puts 'Hello, world!'
end

What better way to start to get to know programming is to get acquainted with the world’s famous application.

Hello World!

This app is so famous that I decided to dig up further why it’s been famous for so long that every programmer has to know when comes to learning a new programming language.

I later learned that it’s invented by Brian Kernighan, a Canadian computer scientist, who used to work for Bell Labs in the Northern Hemisphere, who’s made a lot of serious contribution to the Unix commmunity. His computing background program spans over several old school languages such as C, Fortran, Basic, Pascal, etc, etc. All of that which lead to develop a first application built in B language - which I never heard of.

It is because of this language, he and other professor scientists want to spend time writing this tutorial to teach beginner should start learning the programming language such as its core syntax and language structure. And what better way to do that is create a simple Hello World app!

Since then, every new generation of programing languages take on Brian’s idea is making simple tutorials to get started in building simple apps by introducing its language constructs.

Which brings to my attention why an aspiring programmer of 4 years could rarely grab the opportunity in becoming conversant in a number of languages - just as any bilingual/polyglot language speaker could muster(my background is Malaysian so I speak four languages - Malay, English, Mandarin, Foochow).

Comments