A lot of the Ludum Dare games are written in Java. Much to my surprise, I did have a JRE installed on my machine. So most of the games worked out of the box, but sometimes the JRE died with a peculiar error:

Exception in thread "main"
    java.lang.UnsupportedClassVersionError: $file
    (Unsupported major.minor version 51.0)

Let’s try and understand this error, shall we?

Can you image that Java didn’t exist until 1995? It was completely made up from scratch less than 20 years ago! How could they accumulate this kind of cruft in less than two decades? How will this ecosystem look like when it reaches the age of C, or Lisp?

But it’s not only that - the error message itself also reminds me why I dislike Java.

“We can send toString() to basically everything. So, for error messages, let’s just send toString() to the Exception. Wow, how elegant. How object-oriented. Oh, look how much we don’t care about the implementation. What a great application of encapsulation and separation of concerns!

And everyone gets the same message - users, developers, log files, API consumers! And they all get a stack trace! Because users love stack traces!”

What a Wrong And Stupid Thing To Do.

See Also

Previously: Ludum Dare 26 - Timelapse

Next up: Overwriting Dynamically Linked Stuff

The machine thinks that the Web-Log entries Javahaha, 26th Ludum Dare - Postmortem, and Purely Functional Games might be related to the topic so eloquently discussed above. The machine is sometimes right.