Into the Clouds

Forecast: Clouds ahead

It looks like the theme of today is going to be clouds. I have spent the week on cloud computing, dreaming in the clouds and word … (yes, you guessed it!) clouds …

MathMagicians do their first jump into the cloud

I have been looking around after a good solution for setting up tests servers in a painfree way. I found a great one!

Its called slicehosting.

Basically, you rent a virtual server – it lives somewhere in the cloud, fighting for CPU time on a real machine with a bunch of ther servers. The IP adress is real enough – you are the root and totally in charge – and the financial commitments are kind of ridiculously low – you can pay 20 usd/month for the smallest slice – no strings attached.

I think this is a perfert setup for small it-companies that would like to deliver great software, and need the infrastructure of version control, continuous integration, and testservers. In this way, you don’t have to invest a lot of money, can always expand and upgrade your slices as you go on.

Incredible – but its working. I feel it like if the world just changed.

Beaaaaaaautifull Word Clouds

Wordcloud generated by wordle for this blog.

Wordcloud generated by wordle for this blog.

I was searching the internet for a flex component to generate nice looking wordclouds. I am working on a prototype version of a job search engine – and among other tricks – we will use word clouds to categorize job offers. I stumbled upon a site, that takes a text or URL as input – and generates the most beautiful wordclouds. They have designed a layout algorithm, that utilizes the space in a way, that is aesthetically very pleasing.  Unfortunately, the wordle guys didn’t leak out the algorithm – I spent half of the night trying to compute a simple heuristic for doing similar things in Flex … I don’t think its actually needed by the project, but who can resist this beauty of words?

Wordle layouts the size of the word to be proportional to the frequency – I also spent some time wondering about other functions than linear for reflecting the frequency. I believe a normal distribution will also look quite nice.

All the computations reminded me of an old Calculus 101 problem:

Given a rectangle composed of other rectangles, each of which has at least one side of rational length, proove that the big rectangle also has at least one side of rational lengt.

My head in the clouds

I spent my previous weekend at what must be called the most cozy Java Conference in the world. Hanging out at the beautifull Hindsgavl Castle with the danish JUG (Javagruppen) at the annual conference was an amazing experience. We weren’t so many – mingled together and had lots of fun. I enjoyed Bruce Eckels “Hybridizing Java” talks – and was even lucky to get a copy of his book – with a sweet cartoon dedication. Neal Ford impressed me with his talk where he compared Ruby an Grails  – so similar and so fiercely hostile to each other. My own talk was about both DCI and Scala – and I decided afterwards that just one of the themes would be enough for a talk.   All to soon the conference was over, I was picked up by my family, and we enjoyed a stroll in the castle park.

Hindsgavl Castle - the place for the annual Danish JUG Conference

While I was at the conference, I got confirmed an exciting opportunity  – I have been hired by ITU to teach a course called Saas …  the short hand Saas does not stand for Software as a service … but it could.

It is a part time position, which suits me perfectly! I can still commit myself to all kind of exciting stuff in my company, and once a week I will be  doing my best to impress young, sensitive minds …  Since I stopped teaching at SDU, I have been missing the academia life, and – I am looking so much forward to teach my new students everything important there is to know about system design and security … actually I have always wanted to be given the opportunity to put my fingerprint on a course, that will teach about good software design. What happens with the .java file between the editor and a webapplications with real users. What good quality is, why that gives us good security, and what goals we as programmers should strive to achieve. Of course inspired by my favourite computer science book – Pragmatic Programmer.

Anyway – I will be spending some time in the clouds, trying to design the perfect course plan.

New Year starts with Scala

Slowly up to speed

New Year is here, smoke calming down after a couple of nights of excessess with fireworks (and some other stuff too).

I think tonight, the sky will be clear, and the air fresh again.

After lazying around with my family during the Christmas Break, its time to actually work again.

Preparing lecture for  JG.DKs annual conference

I am preparing my lecture for the Danish Java Groups Annual Conference, it will be held at Hindsgavl Castle on my Island (=Funen) in Denmark. The program is here.

My talk will be about a new language – Scala – which is bytecode compactible with Java, and runs smoothly on the JVM. I claim that Scala is going to give us back Object Oriented progamming – without having to do some of the awkward workarounds, that java is forcing us to do.

Out of the host of new languages that run on the JVM, like JRuby, Groovy and Jython – I really think Scala stands out.

What is so special about Scala?

It is a functional language. It is an object oriented language. It is a type strong language – exactly like Java.

It has traits – an ability to add methods to an interface – a language feature that we have been missing since

It is pure and well designed. Invented by Martin Odersky – who designed the Java generics.

Eventually, Java 7 or 8 will be patched with closures, and traits. But those will be patches. I am right now reading a book by Odersky, Spoon and Venners – Programming in Scala – highly recommendable.

Your hello world in Scala


Lets try Scala out.

First, lets get the convenient Eclipse plugin (you need Eclipse 3.4 + to make it work) from its update site:

Select New>Scala Project.

This gives you a … Scala project.

Now in the src folder, add a Scala Application (runnable):package application

object HelloWorld extends Application with FirstTrait{
override def main(args: Array[String]) {
println(“Hello, world from Scala!”)
println(“From trait ” + greet(“world”))
print(arg+” “)


Make your first trait:package application

trait FirstTrait {

def greet(name:String):String = “Hello “+name


Run the application (Run > Scala Application), to see the output:

Hello, world from Scala!
Now – hello from trait Hello world

Thats it – hello world in Scala.

Hello World in Scala

Screenshot from Eclipse: Hello World in Scala