Archive for November, 2006

Java impressions

Saturday, 25th November, 2006

This was meant to be a lengthy comparison of the stumbling blocks I found learning Java having come from PHP. However learning Java is currently on the back burner so I thought I’d post what I have anyway.

Back in September I purchased Head First Java (I had to see what all the fuss was about with the Head First series). This book has a prerequisite of previous programming experience which I don’t think is necessary, the first few chapters cover very basic of programming concepts.

I’d recommend this book to other PHP developers looking to branch into OO, I think OO concepts are better learnt from the Java community than PHP at present.

Behaviour that stood out compared to PHP:

  1. Java is strong typed but you can do this:

    boolean a = true;
    boolean b = a;
    System.out.println("If a is true, b is " + b);

    Output: If a is true, b is true

    I thought being a strong typed language b would have to be cast as a string or explicitly have its type changed but this appears to be automatic. My initial thinking was __toString was being called on these variables but in hindsight these are primitives and not objects.

  2. Java is not a web centrict technology consequently there’s additional complexity to deal with the peripheral elements of it that aren’t of use to web programming.
  3. Java feels like it’s more complicated than it needs to be, the core language is fine (POJOs etc) but getting things like JSPs working on Tomcat was a headache.
  4. The deal breaker: learning Java isn’t as fun Ruby.

Tackling Concurrency

Saturday, 25th November, 2006

This is not something many web developers run up against, but for those with a spare hour, Channel9 has an insightful interview with some researchers from Microsoft Research Cambridge who explain their new solution for dealing with transactions and parallelism.

The recent introduction of multi-core processors this year has really pushed concurrency into the limelight of the software development community. With it attention has been drawn to functional programming, reasons for which are described here.

84 Top MySQL Performance Tips

Sunday, 19th November, 2006

A useful bookmark for any developer using MySQL: 84 tips on improving your query performance in MySQL.

Debian Quirks

Saturday, 11th November, 2006

Just a tip for anyone else Googling this, if you’re trying to install the DNS utility dig on Debian the obvious doesn’t work:

# dig
bash: dig: command not found
# apt-get install dig
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package dig

This is what you need:

# apt-get install dnsutils

You are currently browsing the Mostly PHP MySQL Javascript Linux, some Ruby Java frameworks agile methods but overall web programming and software development in general weblog archives for November, 2006.

Categories

My Bookshelf

PHP in Action: Modern software practices for PHP Agile Web Development with Rails
xhtml 1.1 compliant   xhtml 1.1 compliant