Haul: Waiting to die

22. January, 2010

The second scene of my story “Haul” is ready for you to enjoy: “Waiting to Die

Die zweite Szene meiner Geschichte “Haul” ist bereit von euch genossen zu werden: “Warten auf den Tod


16. January, 2010

After tweaking it for five years, I finally decided that I’ve dallied enough and should start to publish “Haul” or forget about it. It’s a science fiction story set in a galaxy far away where two races, the Rabit and the Haul are at war.

It’s a asymmetrical war. Whenever the Rabit manage to assemble a fleet and sent it somewhere, the Haul will be there. After short, hard fight, the Rabit will have to mourn their losses while the Haul will simply leave. Even after three major battles, the Rabit haven’t managed to capture even a single Haul or one of their ships or even a single piece of Haul equipment. The situation is growing more desperate every day and the Rabit are living in constant fear when the Haul will commence to attack their home worlds. Just like they attacked Pantero six months ago.

Without any warning, a Haul ship suddenly appeared in the orbit around the agricultural planet. It didn’t respond to radio or any other means of contact. After three hours, it left. Half an hour later, bombs took out the three major capitals of Pantero and the space port. Within minutes, 150 million Rabits died. No one knows why. Or when it will happen next.

The story starts here.

Nachdem ich fünf Jahre an der Geschichte “Haul” gearbeitet habe, habe ich beschlossen, dass es genug ist und ich sie entweder veröffentlichen oder vergessen sollte. Es ist eine Science Fiction Geschichte, die in einer weit entfernten Galaxis spielt, wo sich Rabit und Haul im Krieg befinden.

Es ist ein Asymmetrischer Krieg. Wann immer die Rabit es schaffen eine Flotte zusammenzustellen und diese irgendwohin schicken, sind die Haul schon da. Nach einem kurzen, harten Kampf bleibt den Rabit nur ihre Verluste zu betrauern während die Haul sich einfach zurückziehen. Selbst nach drei grossen Gefechten ist es nicht gelungen einen einzigen Haul gefangen zu nehmen oder eines ihrer Schiffe aufzubringen oder auch nur ein einziges Stück Ausrüstung zu erbeuten. Die Situation wird jeden Tag schlimmer für die Rabit, die in ständiger Angst leben, wann die Haul die Angriffe auf ihre Heimatwelten fortsetzen werden. Genau so, wie sie Pantero vor sechs Monaten angegriffen haben.

Ohne jede Vorwarnung erschien ein Schiff der Haul im Orbit um den Agrar-Planeten. Es antwortete weder auf Funk noch auf sonst irgendein Signal. Nach drei Stunden verschwand es so spurlos, wie es gekommen war. Eine halbe Stunde später explodierten Bomben in den drei grössten Städten des Planeten und über dem Raumhaufen. Innerhalb weniger Minuten starben 150 Millionen Rabits. Niemand weiss warum. Oder wann es das nächste Mal passieren wird.

Die Geschichte beginnt hier.

When you’re right, there is no middle ground

15. January, 2010

Yesterday, I attended a talk by Tom Schindl (he’s the guy behind UFaceKit and Qooxdoo, QxWT, etc.) And he’s working on e4.

During our little conversation after the talk, he stressed the fact many people aren’t willing to pay for bugfixes in Eclipse. He’d be willing to work on many of them but someone has to pay the bills. I nodded like everyone else. And we talked about Eugene Ostroukhov and his complaint ““Participate in community!” they said…“. And I immediately saw a parallel in my own history. I had a similar, painful experience with Ed Merks a while ago. That was about EMF and how badly it sucks. And that he didn’t listen to me.

I was mad because I was right and he just didn’t get it.

Yesterday, on the train home, I understood.

I’d like to introduce two new categories of programmers. Both are passionate and enthusiastic about software. The difference is that one group is pragmatic and the other idealistic.

Ed and Tom are pragmatics. They think: “Great feature, I like it, how much will it cost?” If it’s too expensive, they don’t get upset. They think about it, mull it around, consider their options. If there just is no viable way to do it, they can accept that. These people get money to write software.

I’m an idealistic programmer. I get money to stop writing software. That is, I get money to stop writing the software in my head and to start writing the software someone else wants. Not getting what I envision drives me up the wall.

Things can get pretty ugly when those two kinds meet. Because both are egoistic and both are right. It would make sense to make all the changes to EMF that I want. For me and probably a few others. It would cause quite a few problems for Ed, though (mostly because he’d get a lot of complaints by those people who are happy right now).

I’m asking for changes because I have problems. I’m not complaining about petty things. I need to bend EMF and SWT more than the API allows. To solve my problems, I just can’t accept the status quo. The API has to move. But my solution would cause problems for many other people.

Right now, I’m writing software which doesn’t have a lot of customers, so a stable, reliable API is not one of my goals. I can change my API at a whim and no one bothers. Eclipse has millions of customers and every change to any API will cause a tremendous amount of pain around the globe. Say 0.1% have a problem now? That would be at least 1’000 people complaining. One happy, 1’000 after your head. At least. How big is the pressure on Ed to make me happy?

So how to win? I think Linux has the best solution that you can get today. Linux has several release streams that strive in parallel. It’s not a bunch of forks, it’s a bunch of branches. People can hand in stuff that really isn’t ready for prime time. It can be incomplete. It can break other APIs. It can be an experiment. It can evolve. In Linux, there is the next tree.

In Eclipse, evolution is hard. You have to get new features and patches past people you don’t know, who have more experience in evolving APIs, little time and little incentive to hurt themselves. API in Eclipse is hard to evolve because IBM pays many of the core developers. If someone wants some obscure API and the Lotus Notes team will have a problem with that, who will win? The bug report (even with a patch) or your next pay check? There are only a few big commercial products on Linux. Eclipse, OTOH, was created to form the basis for commercial products (hence the EPL). Products that have life cycles between five and ten years. Ten years ago, we had Linux 2.2, KDE 1.0 and SuSE 6.3.

For IBM and SAP, the one year release cycle of Eclipse is way too fast. They have to spend a lot of money on developers just to keep up with all the changes going on in Eclipse and this is for things that can’t be sold to customer (i.e. which don’t earn any money).

So I agree with Bjorn Freeman-Benson that Eclipse needs a set of public git repositories and a low-barrier entry to these repositories (which means one-click install for the build system, no IP checking). It should be a playground, a place where ideas can grow. Not all of them will make it into the mainstream but at least, people can solve their problems without hurting too many others.

At the same time, I’m afraid what will happen when this comes true. But then, I’m an idealistic programmer. I believe that time will tell who was right and that we shouldn’t bother too much upfront.

The future of cinema

11. January, 2010

Everyone wants to predict the future and everyone knows that there’s a 100% chance to get it wrong. Here is my go.

Avatar is probably the movie which will be remembered as the one to turn 3D at the movies mainstream. To shoot the flic, Cameron used a new, ground-breaking technology: The virtual camera.

A virtual camera is like a real camera but it allows the director to look at the final render of the scene while the actors perform in front of the green screen. It’s a cave to carry around. The next step will be goggles.

And after that: Goggles for viewers of the movie. Avatar showed a limitation of 3D: You can’t look around. As soon as you focus on something different than the virtual camera, you get a headache. So the next generation of cinemas won’t get a pre-rendered movie but the 3D scene data. The big screen will go. Everyone in the room will wear goggles which allow to see anything. Wonder what’s inside the waste basket in the lab? You might get a peek.

From that, it’ll be a small step from one-source movies to mass-edited movies. Producers will spread the raw scene data to movie centers and fans will get a chance to fix bloopers or even rewrite certain scenes. Eventually, everyone on the floor might see the same movie but in a very personal way.

Probably won’t take long for teenagers to figure out a way to hack the cloth transparency. Virtual character don’t sue.

ePen 0.7 Status Update

9. January, 2010

I’ve pushed the code for ePen into a new set of Mercurial repositories: signal (a signal/event handling library, new BSD license), JaSpell (fork of the project jaspell.sourceforge.net; mainly a port to Java 5 and Maven 2, BSD-License) and ePen (the main editor, Eclipse Public License 1.0 since I had to copy code from the Eclipse code base).

The editor is pretty usable and I hope to wrap up 0.8 next week which should fix the following issues:

  1. Create new projects and open existing ones. The main problem here is that an ePen project is a directory and SWT doesn’t offer very good dialogs to select directories. Right now, the editor will create a demo project when you start it the first time.
  2. The translation mode is too slow
  3. Editing is sluggish.
  4. HTML export should support filtering by state (to allow to export only “final” scenes).
  5. Setting up the development environment is too complex. Especially the part where you need to copy the Eclipse plugins into the Maven repository. 0.8 will come as one huge JAR which you can start with a double click.

After that, I plan to resume work on my story “Haul” and post the first scenes in my old, desolate Philmann Dark site.

“Good” Game

7. January, 2010

Reading “The Problem of Good, in a Platform Game” got me thinking.

I doubt some of the assumptions on that page and I’d like to present my own here. It should be possible to model them into a simple agent for a game as well.

First, let’s assume that resources are finite and somewhat scarce. Changing your alignment (good/bad) need resources, so you won’t do it on a whim. I’d even say that there is a hysteresis, so you stay in your current alignment longer than in a perfect (linear) world.

So the question is: What changes you alignment?

My theory is that several forces influence your alignment (not necessarily in this order):

– Peer pressure
– Personal experience
– Prediction of the future
– Food/rest

Some comments on these forces:

1. If everyone around you is good, it’s hard to become evil, partly because they will fight this tendency, partly because you simply have no role model. We are all mimics. It’s hard to come up with something new on your own (again scarce resources: You don’t have all the time of the world nor can you change as often as you like).

You might argue that some people are born evil. I’d like to have proof of this, please.

2. Whenever you get into a situation X, you will rake your memory for similar situations to give you a guideline how to respond (again scarce resources). So if your experience tells you to be good in situation X (because that worked in the past), you will be good. Notice that only the outcome of the situation for *you* counts. So if you like to whine about being capitalized, the outcome of being abused is “good” for you – no need to get your lazy bum up and change.

3. If the situation is new, you have to come up with a plan. Again, you can’t think for years, there is some pressure on you. So the plan is never perfect and you will know that. So depending on your confidence of your plan, you will change your alignment or stay on safe (known) ground.

4. Most people are only civilized as long as they are fed and well rested. Just imagine to deprive someone from sleep for a day. They will get irritated much faster than a well rested person.


0 is neutal, > 0 is good, < 0 is selfish

1. is fairly easy to model: Just sum the influence of the people around you. Maybe multiply that with a factor depending on the psychological distance the people currently have to you. That is, your role models will feel pretty close even if they are on the other side of the globe while your neighbor could be on the other side of the moon, you couldn’t care less.

2. For every game situation, you need to calculate the net result. Use several standard games (prisoner dilemma and a couple more) and store the factors and the result in a memory per agent. When the next situation comes up, compare the setting with the memory and have the agent change its alignment according to the expected outcome of the game. When this is done, the agent is ready to play the game. Update the memory afterwards.

If the result is off the scale, change the alignment accordingly.

3. For every new game, have the agent play a few rounds against itself. Use the result as the alignment for the game. If the outcome is vastly different from what the agent expected, multiply this "unsureness" factor to the alignment change (if we’re more insecure, we are more susceptible for influence).

4. Give the agent a head and a stomach. Let them rest, eat (and work late and starve). 0 means "normal", 0 means rested/well fed. Scale this accordingly (maybe this is even logarithmic: If you are very hungry, you’ll even eat another agent) and add to the current alignment.

To map the linear alignment to the “good/selfish” alignment, use a hysteresis curve. The final result should show some “resistance” to change the current alignment and a preference to return to the current state (so if you’re currently selfish, being treated nice won’t count as much as being treated badly).


5. January, 2010

A lot has been said about this game (official website, 9.2 on IGN). I’ve played the demo and I liked it but the handling was a bit overwhelming in the demo, so I didn’t buy it right away. Now, it’s out in the platinums series and I must admit, the game is better than the demo. The handling is pretty good except when you try to rain death and pain on your enemies from the corner of a building: The corner is in the way too often. While it’s smart of the enemies to clump in your dead angle, in the real world, I’d just extend my arm over the edge and deal some blind damage.

But the other things work well. Cole jumps well, clings to edges, pipes and cables as if he was Spiderman. A 100m sheer drop is met with a tumble and Cole is on his feet again. Walking electric cables is fun and it’s great fun when you learn to glide them. Especially since they charge you up so you can really dish out. When you get to protect a box with medicine, the best place is on the cables above the area where you hail wrath and worse on the mortals below.

With time, you’ll learn several ways to deal damage which, used in strategic ways, will make the game a piece of cake. Taking enemies down will get you positive points, killing them (especially when they are already down) gives you negative score. Helping people gives you positive score, hurting them reduces your score. Just as in real life, your score doesn’t stop at 0 but can go bad. Really bad. Bad as in people running away from your shadow, gathering in mobs and throwing stones at you. Or they can become your fans, hurl stones at your enemies when they attack you and ask to you spend the night with them (an offer which you can’t accept).

Just like in Black and White, you decide to become a superhero or a supervillain. If you go the good route, your powers will be more controlled. If you go evil, mass destruction is your toy.

On top of that, we have a nice, complex background story which keeps things together. The side missions aren’t too thrilling but it’s a lot of fun to jump off and on buildings, scale walls, sheds, cars, train tracks. The enemies don’t just stand there but try to take cover, they disperse when you jump them from above like an angry thunder cloud. There are various parties involved, each trying to sell their own version of the truth. It’s moving when a group of policemen salute you after helping to arrest a gang member who killed one of them. To gain control over the city, the gangs turned off the power and your vision becomes blurred when you have to go into such an area.

Recommendation: Buy.

Making web development a bit more simple

3. January, 2010

When someone starts to make a path, most people tend to follow the trail. So when Sun introduced the Servlet API, most people were uneasy about the design problems:

  • Servlets are singletons (which are evil; this is due to performance problems in Java 1.2 which have been fixed about ten years ago).
  • The resulting code smells (feature envy since you call many methods of HttpServletRequest/Response, long method since you can’t call subdivide the doGet() without passing at least two parameters to each new method, duplicated code since you have to walk instance trees to get at a lot of information, …)

Whenever I see Java servlet code, I always wonder why people don’t solve this. It’s so simple:

public abstract class ServletRequestHandler {
    protected HttpServlet servlet;
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected String contentType = "text/html";

    public void init(
        HttpServlet servlet, 
        HttpServletRequest request, 
        HttpServletResponse response
    ) {
        this.servlet = servlet;
        this.request = request;
        this.response = response;

    public abstract void process();

    public PrintWriter out() {
        if( null == out ) {
            response.setContentType( contentType );
            try {
                out = response.getWriter();
            } catch( IOException e ) {
                throw new RuntimeException( 
                    "Can't get writer", e 
        return out;
    public ServletRequestHandler html( String html ) {
        out().print( html );
        return this;
    public ServletRequestHandler attribute( String value ) {
        out().print( escape( value ) );
        return this;
    public ServletRequestHandler attribute(
        String name,
        String value
    ) {
        if( StringUtils.isBlank( value ) ) {
            return this;
        PrintWriter out = out();
        out.print( ' ' );
        out.print( name );
        out.print( "=\"" );
        out.print( escape( value ) );
        out.print( "\"" );
        return this;
    public ServletRequestHandler text( String value ) {
        out().print( escape( value ) );
        return this;
    // Add more methods to support your favorite
    // web design patterns

Now, all your servlets look the same: They accept the request, create a new instance of the right implementation of ServletRequestHandler, and call init() plus process(). With a bit of glue code, you can even use Spring to manage all your servlets for you. No more dabbling with web.xml!

And the best part: This pattern allows you to test the servlet code from a unit test without any container. Just use Spring or Mockrunner to get mock-ups for the J2EE API classes.

Nation and the 6th part of the Hitchhiker

1. January, 2010

Just finished reading two books: “Nation” (Terry Pratchett) and “And Another Thing …” by Eoin Colfer.

When I browse through my favorite book store here in Zurich, I’m always looking for something new by Terry Pratchett. I’m a huge fan of his Diskworld series and always torn when there still isn’t another volume out. On one hand, I really miss his witty way to look at the world, on the other, a good thing takes time. So this time, I ambled into the other works of Pratchett but after the the carpet people and “Johnny and the bomb”, I wasn’t too thrilled. But I couldn’t walk away from “Just possibly the best book Pratchett has ever written” (Fantasy and Science Fiction).

And it is. It’s a hugely different setting than Diskworld but as witty and smart as you’d expect. It’s the story of a boy who sets out to become a man and becomes so much more. It’s about standing up against peril, evil and bullies. If you like Diskworld, you must read this, too.

Eoin Colfer was a similar issue: Part 6 of the THHGTTG? You’ve got to be kidding! I loved the stories around Artemis Fowl but The Hitchhiker? Is Eoin out of his mind? Luckily, he asked himself the same questions.

The net result: Definitely not a book by Douglas Adams but also definitely a book from the Hitchhiker series. Ever wondered where the animals come from that want to be eaten and can argue in their favor? There must be herds, right? There are. When Thor (the Norse god) needs some aiming practice, they “provide moo-ving targets”. Just like Adams, Eoin (pronounced Owen) likes to take things to the tip and I mean the utmost protruding electron. It’s a book about a world where all your wishes were granted. And you know the old saying. A fun read and at least one good laugh on every page. To put it another way: The worst thing about the book is its title.

If you’re still worrying whether you should dare to complete the trilogy with part 6, stop and buy.

Recommendation: Buy. Both. Now.

%d bloggers like this: