Hello World – First Post

Hello world!

I am really excited to be writing my first blog post as part of setting up my online presence at bernardic.ca.

Since I work as a programmer, and have a Bachelors degree in Computer Scrience, I think it would be good to start with a hello world. Here it is in all the programming languages I use or have used. The constraint is of course that I don’t look it up on the Web or in other people’s source code, but rather either go by memory, or memory plus the help of a compiler/interpreter:

PHP

<?= 'Hello World!'?>

Ruby

puts 'Hello world!'

Python

print 'Hello world!n'

Java

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

LISP

(print "Hello, World!")

Perl

print "Hello World!n"

C

#include <stdio.h>
int main() {
  printf("Hello World!n");
}

bash

echo 'Hello World!'

Javascript

alert("Hello World!");

or

window.onload = function () { document.write("Hello World!"); }

C#

using System;
public class Hello {
 public static void Main() {
    Console.WriteLine("Hello World!");
 }
}

There it is. I also tried C++, but could not figure out the whole stdout << “Hello World!”, or however it would actually go. 🙂 Happy Coding!

Advertisements

Published by

Dan Bernardic

A Winnipeg Web programmer. Member of the FarmLink Marketing Solutions and Farm At Hand team. Experienced with Web technologies, e.g. HTML5, CSS, ( Server-side ) JS, PHP, WordPress, MVC, etc.

2 thoughts on “Hello World – First Post”

  1. OPL and Delphi? Wow, how did you come across those?

    I thought about HTML, but decided against it since it is not really a programming language in the way they are most commonly defined.

    I should have also done Spaghetti-code:

    10 GOTO 30
    20 PRINT ‘HELLO WORLD!’
    30 GOTO 20

    🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s