Nachdem ich heute mein M’era Luna T-shirt anhabe und wir schon länger über Karlsruher Diskos, DJ Mozart und schwarzgekleidete Leute geredet haben, habe ich soeben nochmal den alten Bericht über das M’era Luna 2004 gelesen. Ein wirklich denkwürdiges Festival und der Bericht hat ein Zweit Lesen durchaus verdient.

Dieses Jahr wirds wohl nix mit Festivals … das M’Era Luna ist am 9./10. August und ist noch nicht ausverkauft … ? Need Festival.

Is it friday?

wasting timeThis is what happens when somebody accidentally adds the complete company to some mailinglist and writes a “Test” mail to that list.

All in all it was about 60+ mails that everybody received until the wave of office spam was stopped. Of course it took a technical intervention to achieve this, once the trolls are out it is hard to stop them.

I am guessing that there are some more mails going out to those who are still on that list now.

To eat or not to eat – the couch

I found this funny quiz page (I recognized 11 out of 12 snippets of code and could name the correct programming language) and took a quiz:

How Long Could You Survive Trapped In Your Own Home?

I wonder if on the assumed 30kg of food we might have in the house which is a rough and probably incorrect estimate, we could really survive that long.

They ask if you have pets and count them as additional food source and they seem to assume that I will eat my leather jacket and the couch as well. I wonder if when they asked how many people lived in the home they meant everyone besides me to be an additional food source as well …

It’s late and I just watched the movie “Marie Antoinette”.

Update: they also have this nice test. So yes I kind of tend to think now that the survival test assumed that only the person who took the test would survive that long oO (I scored 11 on that last test). The most fun test though is the one I found the page through: the caffeine test. (I scored 148 = Very High – Productive Worker, Jittery)

I like me some compact code

Lately Groovy has been the language of choice for my scripting needs.

And slowly I am finding out how to do things in a groovy way instead of relying on shell commands that don’t always work as they would in a shell environment:

"scp user@host:*.java .".execute()

is just not the same as executing the same command in bash.

One of my pet peeves in Java is the way maps are handled. If you want to use a map to count occurrences of something you’ll have lots of fun doing so. It becomes even more hideous when you have multiple nested maps in your data structure:

if(!map.containsKey(keyA)){ map.put(key,new HashMap()); }
if(!map.get(keyA).containsKey(keyB)) { map.get(keyA).put(keyB,0); }
int counter = map.get(keyA).get(keyB)

Now for the same in groovy:

map[keyA][keyB] = map.get(keyA,new HashMap()).get(keyB,0)+1

I like it much better this way. I am sure many other languages allow for the same quick and easy way to accomplish this task. I just enjoy programming in a scripting language that is based on a language I know very well.

And by the way: I do not think that code written in scripting languages needs to be readable. If what you write is that important you should use a “real” programming language. Scripting languages are hazardous for code readability anyway as it is one of their defining features that they allow many shortcuts and are less strict on syntax than their grown-up counterparts.

PS: “Real Programmers Don’t Document If it was hard to write,it should be hard to understand”

What to do in NYC?

We have booked our flights, found a hotel and now I am looking for things to do in NYC. We’ll have 5 full days in New York before continuing to Detroit for a friend’s wedding.

So what are the most important things to do in NYC? I need some ideas and I don’t have a travel guide (yet).