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!