Ventures of an ex indie game developer

I hate browsers

I really do not like them at all. I use them because they fill a purpose. I don't like telephones particularly either. But I use them from time to time nonetheless. So my surprise was even bigger when I found BrowserQuest to be entertaining for half an hour. In a year or two I'll probably do a small MMOG of sorts, and then I'll draw inspiration from this simple game.

When you've used a good programming language or two you're always a bit astounded to find basic flaws in another. But the worst part in Java is not the bad performance, the lack of typedeffing, the lengthy syntax, the freaky configuration files (.xml, .properties, etc) or the excruciating log files. It's of course the frameworks that sucks the worst, by far.

The most commonly used IDE for Java is Eclipse. Eclipse is slow, general-purpose and has no edge. It has no general design goal, being design-by-committee or probably worse, and I've seen Eclipse development threads stating things like "I'll give you Ctrl-Alt-F4 and Ctrl-Alt-F5 for your plugin if you let me have Shift-Alt-3 in mine". Well, you can imagine what that does to usability. As a result, each key combination means a different thing in a different context. Also, optimizing an application which it totally built on plugins is a nightmare, since the time consumption is very distributed (and my guess is a lot of it is workspace configuration file access). Xcode is better, but still not good, and Visual Studio, of course, is the grand master and still going strong (despite .NET bloat).

Java is used for Enterprise building since it has a lot of open frameworks "ready to use". JPA is a framework for running against a relational database "without seeing it". We use a particular implementation of JPA (this also seems typical for Java) called OpenJPA which supposedly has some optimization for Oracle platforms (which I doubt add any performance at all comparing to running your own SQL statements). Unlike Python's standard ORM, JPA requires a whole lot of glue. In fact, in my day job, we have many thousands of lines of code and configuration for a still small project with say ten tables. But that would be ok in any enterprise solution, since it's such a small part of the cost compared to maintenance for ten years+. Unless it did such a lousy job of hiding the database logic or simplifying tasks. Or working.

The last few weeks we've spent almost as much time circumventing bugs in JPA, Eclipse and JPA+Eclipse as we have developing. Literally. 3h+ per day. You see, there's a so-called JPA enhancer that does some post-Java-compile steps. But this does not work well with Eclipse's post-compile steps (through a Maven plugin). Nor with the publishing of web apps on Tomcat on our local machines.

These frameworks are just the top of the iceberg. We also (have to?) use JTA for transactions, Spring Remoting for RPC's, JMS for message passing/buffering, WebSphere for running our web services in test/QA/production and so on and on. All of these require attention and constant fiddling to keep happy. So no, I don't believe in frameworks. (I'm an advocate of components. Toolkits are ok too.) Especially I don't believe in Java frameworks. Just to show you the difference, I want to show you how to setup a basic web service in

import web
urls = (
    '/(.*)', 'hello'
class hello:        
    def GET(self, name):
        if not name: 
            name = 'World'
        return 'Hello, ' + name + '!'
web.application(urls, globals()).run()

That's all it takes, no configuration, no extras, no nothing more at all ever. That's symptomatic for Python and more like it. By the way, you can upload the Python code above to GAE and it would run right out of the box.

The only comfort in the 1980-ies tech of my day-job is that we're building a fat client using Java Swing. Although Swing hasn't developed in ten years, it still works fine, it is small (for being Java), it's all code (not shitty xml configs) and you're usually able to circumvent stuff. And most of all, it's not browser code! And although I loath browsers, I hate JavaScript more. Keeping track of memory resources in IE8 and jQuery is ten steps back from a) static typing; b) almost working IDE; and c) tooling. But still:

Fuck Java!

PS. I know MineCraft is written in Java. And porriage consists of carbohydrates. That does not make coal suitable for eating.

About the author

Mitt foto
Gothenburg, Sweden