A decade ago, I switched from Windows to the Apple Mac. Fortunately, my employer knows that developers need good hardware, and was happy to buy us top-of-the-line MacBook Pros.
Not everything is perfect on the Mac, but it’s still a joy to use such excellent hardware and software (fast, beautiful, high quality). And I love working on a Unix-powered machine. I can’t see myself going back to Windows for another decade.
My first MacBook Pro 17" (photo from 2008) and Dell 21" monitor in portrait mode:

Read the full article…
Thu, 18 May 2017 06:24:00 +0000
Read the full article…
Tue, 09 May 2017 21:26:00 +0000
Despite my almost 20 years of professional software development, I haven’t learnt a lot of programming languages (see my honest résumé). So far, it’s just been PHP and JavaScript (plus SQL, XSLT, and – back in the day – Object Pascal and Visual Basic).
Now I’m trying to teach myself some Java. This blog post lists differences between PHP and Java, from the perspective of a PHP developer just getting started with Java. (Please let me know if I got something wrong!)
Running “Hello World”
In PHP, you create a hello.php
file:
<?php
echo "Hello World\n";
… and simply run it:
$ php hello.php
In Java, almost everything is an object – even “Hello World” requires defining a class with a main()
method. Here’s a hello.java
file:
class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World");
}
}
And you need to run it in two steps:
$ javac hello.java && java HelloWorld
Java code must be compiled to bytecode first. That’s what the javac
invocation does, creating a .class
file for each class definition. The java
command runs the main classes’ file. (You should name the .java
file after the class – I didn’t do this to make that point.)
Read the full article…
Wed, 03 May 2017 20:56:00 +0000