Virtualization

I just found an excellent article on the internals of virtualization (in software, paravirtualization and hardware virtualization). Check it out on AnandTech.

Enjoy!

Cool software

Sometimes vendors/products just stand out of the crowd. My personal top 5 coolest pieces of software at the moment:

  1. Intellij Idea for making my j2ee work efficient
  2. Ubuntu Linux Server for just being the easiest server distro out there (this site is served by version 6.06.2)
  3. Camtasia for making really nice webcasts
  4. Wordpress for running my blogs and home pages (despite the fact it’s written in php)
  5. All Atlassian products

Introducing Grails

It was Tim Bray, who in his predictions for 2008 mentioned that “Rails will continue to grow at a dizzying speed, and Ruby will in consequence inevitably become one of the top two or three strategic choices for software developers”. Indeed, in my eyes the rails paradigm which blends well-known best-practice patterns such as MVC web applications with the notions of Coding by Convention and Don’t Repeat Yourself doesn’t only speed up and simplify development, but also keeps your code base clean. There are no more tedious configurations files which all repeat themselves yet have the touching fingerprint of every developer’s e. Developers can focus on the most important issue at hand: the functionality. That’s why I’ve always been a huge proponent of Ruby and Rails.

But why Ruby?

With a fairly high adoption rate for Ruby on Rails, some problems have been discussed across the internet (follow this discussion, for example):

What other frameworks are out there that provide the same benefits? For today, let’s dive a little deeper into Grails.

Grails

The Grails project (formerly known as Groovy on Rails) started in July 2005 and the project just recently announced the long awaited 1.0 release on February 18, 2008. Grails is built on top of the J2EE stack and combines the best-of-breed tools Hibernate, the Spring Framework, Groovy Scripting, as well as support for my favorite IDE, Intellij Idea (no worries, Eclipse works too). All mature tools and languages that have been used in the Java community for a long time now. Consequently Grails provides:

Demo

Let’s dive straight into a demo in which we will create a few persistent domain classes and integrate an existing CMS backend.

Grails Demo Architecture
(Click to view the demo)

Features

The following features are included in the 1.0 release:

Caveat Emptor?

Yes, the Grails community just released version 1.0 in January 2008. Yet the framework has been in the works for about 2½ years now and I was quite impressed with the amount of features and finesse already contained. The foundation of the framework is built on top of well-established open source frameworks which should minimize the risk of using such a new library.

Would I recommend Grails for a huge enterprise project? Probably not. But I would wholeheartedly recommend every developer and architect to look at this great alternative to traditional web development.

This is a cross-post from the Avenue A|Razorfish technology blog.

Functional Language Aspects

There’s been an interesting influx of functional programming aspects into mainstream object-oriented languages such as C# and Java lately. Of course languages such as Groovy and Ruby have been featuring these language elements for years. Let’s look at a few of these features:

Closures

Closures are parameterized anonymous functions which are bound to variables and evaluated in a dynamic context. This construct is also referred to as lambda functions (e.g. C#, Ruby, Lisp). .NET introduced Lambda expressions with .NET 3.5, Java will most likely introduce them with JDK 1.7. I find them very useful, but a little hard to debug sometimes. Some examples:

Java

{int=>int} addOne = {int x => x+1};

C#

Func<int,int> addOne = d => d + 1;
 // or
 var addOne = d => d +1;

Type Inference

Let’s look at this C# example:

var x = 5;
 object y =  6;
 x = "foobar"; // leads to error as x's type is int
 y = "foobar"; // works just fine

The type of x is inferred upon assignment (note that C# still employs static typing, however).

Java 7 will introduce type inference as well, even though it seems to be mostly constructor type inference to simplify syntax:

Map<String, List<String>> anagrams = new HashMap<String, List<String>>();  
// can be written as 
Map<String, List<String>> anagrams = new HashMap<>();

Fun Links

C# is a functional language: http://sneezy.cs.nott.ac.uk/fun/nov-06/FunPm.ppt
JDK 1.7 Features http://tech.puredanger.com/java7/
Type Inference http://en.wikipedia.org/wiki/Type_inference
Closures http://en.wikipedia.org/wiki/Closures

Scary Landing

This is the scariest landing I’ve seen in a long time, especially since I went through a similar landing at the same airport (Hamburg) a few years ago. It’s a lot less scary when you’re in the plane..