Blog

Die Ostdeutschlanderklärer

Es gibt eine neue Art von Lieblingsartikel in der deutschen Zeitungslandschaft: Wessis machen eine Rundreise durch die neuen Bundesländer und berichten dann den anderen Wessis, wie „die da drüben“ so ticken und wieso „der Osten“ immer noch nicht im vereinten Deutschland angekommen ist. Es gibt viele dieser Artikel, und der Fokus variiert - mal sind drei Statistiken dabei, mal dürfen ein paar „echte Ossis“ ihre Meinung kundtun, aber das Grundprinzip ist immer gleich. (Der, der mich gerade aufgeregt hat ist hier zu finden - hinter einer Paywall, aber letztlich nicht wirklich Geld wert). Man schreibt über gute Straßen auf denen schlecht gelaunte Leute laufen, über sozialistische Sozialstrukturen die jetzt fehlen, und natürlich immer über die AfD, ohne die man sich ja die ganze Mühe, mal „rüber“ zu fahren, nie machen würde. Nur für eine Erkenntnis ist nie genug Platz: Das solche Artikel ein massives Teil des Problems sind.

Eines der grundlegenden Probleme des vereinten Deutschlands ist, dass die Einheit nie in den Köpfen der Westdeutschen angekommen ist, und dass man auch nie den Versuch unternommen hat. Diese Artikel sind dafür ein wunderbarer Beleg. Bis heute gilt in den deutschen Medien die Westdeutschlandsvermutung: Die Geschichte und Erfahrung der BRD ist der Standard; die ehemalige DDR ist eine Anomalie die man extra erklären muss. Wenn man zum Beispiel auf der „einstiges“-Seite von Spiegel Online die wichtigsten oder interessantesten Punkte der deutsche Nachkriegsgeschichte ansieht, dann sieht man Bundesliga, RAF, Privatfernsehen, derzeit sehr viel über Seenotretter, und natürlich den ersten Supermarkt Deutschlands in Köln. Immerhin wird da kurz erwähnt dass es so was auch in der DDR gab.

Wenn die DDR vorkommt, dann als die Ausnahmeerscheinung. Beispielsweise gibt es in der Serie über Seenotrettung genau einen Artikel der sich damit beschäftigt und klar macht dass es heldenhafte Rettungen nur im Westen gab, im Osten war natürliches alles Stasi. Denn wenn die DDR erwähnt wird, dann kann das nur im Kontext der Stasi passieren.

Bundesdeutsche Kultur ist und bleibt westdeutsche Kultur, egal woher die Kanzlerin kommt und wie viel in den Filmstudios Babelsberg produziert wird. Geschichten wie die DEFA-Winnetou-Filme oder Urlaub am Plattensee sind es nicht wert erzählt zu werden, so lange man noch nicht den ersten Versprecher im ZDF erwähnt hat. Das westdeutsche Wirtschaftswunder wird gefeiert; die ostdeutsche Wirtschaft ist stets ein großer Haufen von Ineffizienz in denen allen Arbeitern alles egal ist. Dass die DDR in vielen Bereichen im Ostblock technologisch führend war, die zweitgrößte Wirtschaftsmacht und den höchsten Lebensstandard pro Kopf hatte, wird ignoriert. Dass die meisten Leute dort hart gearbeitet hatten und Stolz auf das Erreichte waren passt nichts ins Bild oder ist vielleicht auch nicht bekannt. Und das ganze Themengebiet Treuhand sieht man anscheinend nicht als relevant, obwohl man doch angeblich verstehen will, wie es den neuen Bundesländern heute geht.

Hier wäre mal eine These: Könnte es sein, dass die Menschen in den neuen Bundesländern, die sich so abgehängt fühlen, vielleicht auch in mancher Hinsicht abgehängt sind? Dass die Ostalgie lebt und blüht, weil es immer noch keine gesamtdeutsche Geschichtsschreibung und damit kein gesamtdeutsches Identitätsgefühl gibt? Und könnte es vielleicht sein, dass man über solche Themen reden muss, nicht nur wenn die AfD in den Nachrichten ist oder am dritten Oktober? Ich persönlich denke, dass so was sinnvoller sein könnte, als der nächste Artikel mit dem Grundauftrag: „Echte deutsche (Wessis) erklären dem echten Deutschland (Westdeutschland) wie die Ossis so ticken“.

Eclipse E4: A Critique

At work, I’m developing on a large internal application based on the Eclipse Rich Client Platform, which is basically the foundations of the Eclipse IDE made available for everyone else, too. As platforms go, it’s alright, I guess, but it does have its share of weirdness. For example, why do I have to dispose colors once I’m done with them!?[^1](#) But with a healthy amount of helper functions, it’s all manageable.

[^1](#): For compatibility with 8-bit indexed displays. Since this is nowhere near a target for our app, I generally don’t dispose colors.

We’ve recently finished porting the application from Eclipse 3.7 to the 4.x line (specifically 4.5, planning to upgrade to 4.6 once it’s out). This may seem a bit late, considering that the first official release of that line, Eclipse 4.2, came out four years ago. After working with the new code, though, I’m starting to think that maybe we’re still too early. Eclipse 4, or e4 for friends, features a massive rewrite of some of the core parts of the platform. And I think that it’s unfinished and in parts rather misguided.

Unfinished Business

Editors are gone, as are views, replaced with generic parts. I could get behind that, but gone as well are editor inputs objects. So telling an editor what file to open and making that decision persistent requires custom logic - and possibly a lot of that if you relied on the flexibility editor inputs gave you. You might see the MInputPart in the documentation, but apparently that was never implemented and is now deprecated. I think the only reason it’s still in the documentation is to taunt people. Of course, even if it did work, an URI based scheme only brings you so far if you have an editor that is supposed to receive objects from many different sources.

Many classic services have no e3 equivalent. For example, the IFocusService lingers around, but it’s very unclear whether I can rely on it once we’re e4 only.

No documentation

The documentation for new e4 specific stuff is largely missing or automatically generated and not helpful at all. I dare you to find any information in the documentation of MToolItem that isn’t obvious from the method names. What’s particularly missing is overview information: What do the different parts in the application model actually mean? What’s the difference between a MPart and a MPartDescriptor, and which one do I need? What’s the lifecycle of a MPart exactly? What is the point of context activation?

The best source of information are the rather terse Vogella tutorials, but these are task-oriented, not concept-oriented. If you want to do something that no Vogella employee wanted to do yet, you’re largely on your own.

Loose coupling. Like Spaghetti

I like the idea of dependency injection in theory, but I’m not sure about the practice. And I have no idea whether that is an Eclipse thing or not, but it still irks me.

The basic idea suffers from two problems: You want all dependencies passed in externally instead of getting them from some global nebulous set of singletons and what not. That’s valid. But you also don’t want gigantic constructors with 200+ arguments for complex classes. Not that you should have classes like that anyway, but a complex editor implementation can reasonably require access to most services Eclipse provides, even if it is just passes them on to helper objects.

The solution is more or less to put all that global state in a map, then pass that map as the argument to every constructor, and allow it to create new versions of the same map internally. Only they chose a more complex version that also has a lot of syntactic sugar, to make sure it runs really slowly. Eclipse has a reputation to maintain, after all.

As a result, you still have no clear idea what part of the application needs access to what unless you search for type names, and now you also have no idea where it’s coming from. It’s not so much that it’s bad per se, but it definitely does not realize the advantages that dependency injection was meant to provide.

And while we’re here already: The way event handling is done via dependency injection is just insane.

Horribly bad ideas

I honestly don’t get the application model, and not just because there is no real documentation on it. I have no idea why it’s here at all, what problems it’s meant to solve, and how it thinks it has solved them. And most of all, I don’t get why so many Eclipse developers are so damn happy about it. “Look at this”, they go, “I change the window’s title in the application model, and the window’s title actually changes! And I can even do that… at runtime!” And then they’re surprised when I don’t applaud.

But hey, whatever, I’ve been able to write helper methods and helper classes to get around any problem in e4 yet. The real problem of the application model is that it seamlessly merges user state and declarative application code into one giant ball of mud. And then it makes that mud persistent, which is just as unpleasant as it sounds.

Because suddenly, changes in user state get the opportunity to conflict with changes to declarative application code. Will my new context menu show up if the user has moved any editors around? For that matter, will my old context menu continue to show up? Surprisingly often, the answer is no, and never for any good reason I could discern. By merging what absolutely had to stay separate, they built a giant bug-producing machine.

And they know it. The closest thing to an official recommendation is to simply disable persistent user state. Only during development, in theory, but they sure don’t provide a better way to deal with the problem once I release an update of my app. In my opinion, this wins the very highly contested price for least user-friendly thing ever done in Eclipse.

Oh, there’s a workaround, but it’s one that nobody will tell you about, and it’s the most WTFy thing I ever implemented, to the point that I still can’t quite believe that this is what it takes. But I’m doing it anyway: I wrote my own code for serializing the application model to an XML file and back, making 100% sure that I only touch the parts that the user can change (i.e. what editor is where), but not the parts that are declarative program code. It’s been a few months since I implemented this thing, and I still sometimes wake up in the night and shout “There must be something better! Some simple flag I missed somewhere!” Do drop me a line if you found it.

Handlers

Finally, command handlers. The new way of writing them is good. Having the validation logic in the handler itself as opposed to an XML file somewhere is better. Good choices all around.

Less good: Why can I have only one handler per command per part? I kind of need several different “delete” handlers for different parts of some more complex editors, thank you very much, and I have only limited interest in creating one giant monster handler that contains the delete logic for absolutely everything. Of course it’s possible to work around that; I’ve managed to work around every little thing in e4 except the application model weirdness so far. In this case, write one handler that creates an internal list of other handlers, then asks each whether it can execute and the first one to shout yes gets to do the job. But I don’t get the logic that says I have to write stuff like that.

I also don’t quite get why some handlers exist and others don’t, but that’s less of an issue.

No tool support

Why is it that so many new things are released without good tool support? Do people somehow think that’s optional? I don’t see it. For example, to port from e3 to e4, there is an awful lot of getting information out of one XML file, translating it, and putting it into a different XML file. It’s boring, tedious and straightforward. And the one and only tool I found for that is one I wrote myself (No; you can’t have it. Nothing personal, but I have no idea what hoops I’d have to jump through to get something developed internally released as Open Source here).

The tools that do exist regularly stop accepting copy and paste and have no useful search. Most of them aren’t part of the platform proper, but require a separate download. It all feels very experimental. I went back to editing the XML files by hand.

Overall

Overall, e4 is still very far from done, and that’s frustrating. But in a few places, even the core is wrong or at least questionable. And while it looks like Eclipse 4.6 will solve a few issues I’ve been having (Generics for Databindings! Hooray!), they don’t seem even interested in solving the big ones.

Agents of SHIELD retrospective

So I wrote this a while back, posted it elsewhere, then forgot about it, until I was reminded the day before yesterday that this wouldn’t be all out of place here, either. So let’s talk about a TV show that I found really disappointing once more: Agents of SHIELD.

At the start, I was really excited about it. Then I was disappointed. Then I got angry. Then it got better again, so by now my feeling is mostly “meh”. And what a big “meh” it is; I’ve been putting this off for more than a week after the final episode of season 1 aired and I still barely have the energy to get through this post.

The show certainly means well, although it really tries more to be a Joss Whedon show than a Marvel property. I guess the writers had prepared a checklist pretty much like the one I posted above and were trying their best to fast-track through it. This became very apparent later on when the characters basically outright stated “That bonding over a common enemy thing? Might as well do that now, nothing else interesting going on this episode”. And never forget that “the Bus”, their plane, is for all points and purposes the Serenity from Firefly. Similar looks, capabilities, identical internal layout including which character owns what space.

What it lacks is the depth and complexity that real Whedon shows have. For all of the characters, their motivations, strengths and flaws can be described in two sentences at most. Instead the show tries to keep our interest with layers of mystery and question after question. Lost has been getting a lot of shit for this, but there can be no doubt that Lost did it way better. The story of Coulson’s resurrection, for example, is in the end neither particularly complicated, nor does it mean much for his character both in how it happened or in how he reacts to it. It’s also kind of stupid. But in Agents of SHIELD, kind of stupid is probably the biggest compliment you can make, considering that the show is so very frequently extremely stupid.

For example, take the episode 0-8-4. How many trained Agents of SHIELD and peruvian military police does it take to stop one Land Rover filled with I guess about three or four insurgents? I don’t know, but it’s gotta be more than 6 and about 15, respectively, because they try and fail. Then there are things like where the “adorable quirky” (annoying) scientist guy gets to go out in the field with the actually competent person. Yeah, Fitz isn’t field-rated, I get it. But are you seriously telling me he’s never even seen a spy movie before?

It all works out for the heroes because the villains are just as stupid. Take the excavator thing: The bad guys didn’t need an excavator to open the secret SHIELD truck; it had normal doors (with some boxes stashed behind to throw anyone who opened the doors of track, so clearly they weren’t welded shut). They don’t use the excavator to open the secret compartment within the truck either; that job goes to a blowtorch. And they paid for the excavator in gold bars, which seems hardly reasonable. Of course the gold bars can be traced back to the main villain’s gold mine, something that a gold mine owner probably should have known. Oh, and the entire plot hinges on Malta not being a member of the UN or EU (it is, of course, a member of both organizations). This is some serious multi-level idiocy going on here.

Later episodes pick up the slack quite a lot, and at turns even make fun of themselves, for example when Skye reveals that her name (given to her at the orphanage) was Mary Sue, or my personal favorite: When Agent Hand sees all of Team Coulson’s incompetence and deduces they must have been Hydra all along.

But at that point the show was doing exactly the same thing as „Captain America: The Winter Soldier“, and boy does it not hold up. I get that a TV show with a limited budget can’t look as good as the Hollywood blockbuster, but the longer running time should allow it to have better human drama. It doesn’t. Captain America wins on all fronts here with Cap as an all-around good guy who never actually becomes boring, an interesting friendship with Black Widow, inspirational speeches that actually work on me (and I’m a long-standing cynic) and real pain over the thing with Bucky. Even Falcon with his amazing lack of screen time has more personality than most of the Agents of SHIELD group.

Also, somewhere before there, I think I’ve kind of stopped caring. I mean, the final resolution to “how and why did Coulson get resurrected?” was “Nick Fury did it because Coulson is a nice guy whom everyone likes”. Seriously. And my reaction to that was “eh, could have been worse”.

Finally, to wrap this up: The show doesn’t look that good. Don’t get me wrong, it looks perfectly okay in a late 1990s kind of way. But we live in an age where Heroes, Lost, Breaking Bad or further out of the field Gossip Girl have established strong visual identities on TV. Whether it is through the choice of color, editing, or other things, these shows have character. SHIELD is, visually, less exciting than Bones or Castle.

In total: Agents of SHIELD is really not worth the bother. The later episodes are at least not offensively stupid anymore, but there isn’t really anything else to get passionate about either. Season 2 has been announced, but I’ll probably skip it. Here’s hoping that these Netflix shows or Agent Carter do better.

DAG vs. Tree

I am wondering whether the data structure “tree” might be a giant mistake in the history of computer science. Almost everything that can be saved in a tree is really a DAG.

Some background: A tree is a data structure consisting of nodes, where each node has one or no parent (this is technically a forest; a tree has only one node with no parent). Each node has children; specifically the nodes that have that node as its parent. Circles are forbidden.

The best-known example for this are computer file systems. Each file is in a folder. That folder is in another folder and so on, until you reach the drive, which forms the root of the tree. Mail lists and some kinds of forums and comment systems also work like that: Each post is a reply to exactly one previous post (at most) and gets shown a layer below. However, tree structures predate computer science. The whole field of Taxonomy as well as linguistics, both with their habit of grouping things in families and sub-families and so on, do exactly the same thing.

It’s easy to process trees automatically, for example to find all children. You can also identify each child uniquely through a given path.

There is just one problem with them: Reality does not work like that. In most real-world cases things, can have multiple parents. A classic example: What folder does a file fit in? Likewise, in discussions, sometimes you want to reply to several posts that make similar points at once. In linguistics, languages don’t really belong to one family exclusively, they have influence from lost of different ones.

To get around that, one either has to pick a parent explicitly, or split the object. Splitting works for discussions well, for files sometimes, for e.g. classification of car types not at all. In either case, information about the semantic relationships is lost.

The answer to that is called DAG, for Directed Acyclic Graph. The rules are almost the same as a tree, only a node can have more than one parent as well. An example: Media library apps like iTunes allow a song to appear in several playlists at once.

DAGs represent the examples here naturally. A file can be in two folders, for example. Since a tree is a special case of a DAG, it’s also easily possible to represent the cases that actually are tree-like.

In reality many systems already include hacks to create DAG structures. For example, thanks to Hard links, most file systems actually are DAGs, they just don’t show it that often. Symlinks, Aliases and Windows shortcut files all create a “second-class parent”, which explicitly stores the removed relationships.

Another approach is through tag systems, where a file, blog post or similar can have an arbitrary number of tags. This structure is actually just a two-level DAG. That may seem like a solution, but since it isn’t possible to form relationships between tags, and because many use cases of trees can’t be modeled that way (for example discussions), it isn’t a full replacement.

Admittedly, from a technical point of view, DAGs are much harder. For example: A tree is always planar, which means you can easily show it on a screen without crossing lines, something that is not guaranteed for DAGs. Enumerating all elements without repeating any is a lot harder. Objects can be reachable through two completely distinct paths - which is of course the goal, but it means you have to look at the graph to answer the question “do these two paths end at the same object”, which is trivial with trees.

Most importantly, I know no really good UI to show and manipulate DAGs. For example, the opposite to a tree structure in forums is not a DAG, it’s a simple list ordered by time, and the relationships between posts have to be shown manually in the text.

(Of course, this does not affect the use of trees in cases where end users don’t see them, for example search trees, heaps and so on.)

What do you think? Due to too much spam, I’ve disabled the comments here for now, but you can reach me on Twitter via @zcochrane.

30 years of Mac

When I bought my first Mac in 2002 (an eMac with 700 MHz G4), I considered myself a late-comer to the party. Today, in most groups of Mac users, I am among the one who has been using one the longest.

Unlike the many people who are now posting about how they saw their first Mac and were instantly hooked, I sort of slid into the whole thing. The first Mac I ever saw was a PowerMac G4, still with pinstripes, owned by my father for layout work. It ran Mac OS 9, which was certainly different but didn’t seem in any way interesting. That changed considerably with the second Mac I ever saw: An iBook G3, the white edition, running OS X 10.1. It was rather slow, there was barely any software, but I really liked it. I’d like to say that this was because I saw the great vision and the things to come, but in reality, pretty graphics were probably the real factor. A big part of that were the free development tools: Project Builder and Interface Builder, these days both known as Xcode. Finally, I wanted iTunes and an iPod. Both were really, really impressive to someone who was used to the horrors of Winamp and burning CDs for portable CD players.

It’s been an odd ride since then. When I started, the transition from OS 9 to OS X was still in full swing. Then Apple switched to Intel, then iOS (or rather the iPhone OS as it was known back then) became a huge thing. Apple rumors used to be an important and often accurate source of information, but that scene has almost completely died. Perhaps because all the rumors that ran forever (Apple will switch to Intel! Apple will release a successor to the Newton! Apple is building a phone! Apple will make a mouse with a second button! Apple will make a tablet!) have ultimately proven true, but usually not in the way anyone expected.

Important for me: I learned basically everything I know about programming and software development on my various Macs. It’s still my biggest hobby, and its how I make money these days, and while I have no idea whether I’d be elsewhere without a Mac, I know that without it, it would have been a lot less fun.

Agents of Shield - Checklist filled

So let’s see how that checklist works out in practice then. Oh yeah, spoilers:

  • A group of people that don’t get along initially, but grow to become a family? - Yeah. Still working on that growing to be a family.
  • A scene where it looks like a tiny girl is in danger, but in reality she’s the one in control of the whole situation and the most dangerous thing all around? - Yeah. This time she’s evil. In a wider sense, the villain of the week is male but portrays that power reversal, too.
  • A “oner”, meaning a very long shot where the camera moves to a space without cutting? - Not yet.
  • An episode where information is conveyed through music? - Not yet.
  • Beloved minor characters who die? - Not yet.
  • Characters in so much pain and angst that they can barely walk? - Yeah. Charles Gunn.
  • Pop culture references? - Oh yeah. “With great power comes… a whole lot of shit that you’re not prepared to deal with.”
  • Actors from previous Joss Whedon works? - Charles Gunn, Shepherd Book, the Serenity. And a discount version of Eliza Dushku.
  • A great sense of humor? - Hell yeah. “Sorry, the corner was dark, I couldn’t resist”
  • Horrible things happening to people in love? - still too early for that

Agents of S.H.I.E.L.D Checklist

Tomorrow, Agents of Shield1 will start. It’s a TV show set in the Avengers movie universe, focusing on somewhat more minor heroes. The promotional material has focused on showing action sequences and explosions. The images were of various people all looking strong and grim. In many ways, it sounds like you could skip it. Except for one thing: It’s the new TV series by Joss Whedon, the genius behind Buffy the Vampire Slayer, Angel, Firefly, Dr. Horrible’s Sing-Along Blog, Dollhouse and, oh yeah, the Avengers movie.

So there’s a question: Is this a generic action thing, or is this the next in the series of awesome things by Joss? To make up my mind, I’ve made a standard Whedon checklist that I’m going to fill as soon as the pilot is available on iTunes. Beware: This includes spoilers for all the shows mentioned above.

Does Agents of Shield have…?

  • A group of people that don’t get along initially, but grow to become a family? (as seen in Buffy, Angel, Firefly, Dollhouse to a lesser extent, Avengers)
  • A scene where it looks like a tiny girl is in danger, but in reality she’s the one in control of the whole situation and the most dangerous thing all around? (the mission statement of Buffy, but also very notable in Avengers where Natasha pulls it off twice)
  • A “oner”, meaning a very long shot where the camera moves to a space without cutting? (as seen in Buffy, Angel, Dollhouse, Firefly… basically everywhere. Avengers has its prime example in the middle of the fight in New York)
  • An episode where information is conveyed through music? (the musical episode in Buffy and Dr. Horrible’s Sing-Along-Blog are the most obvious examples, but don’t forget “The Hero of Canton” from Firefly)
  • Beloved minor characters who die? (Buffy does it a lot. Angel does it a lot. Firefly does it surprisingly often. Dollhouse does it. Dr. Horrible does it. Avengers does it, although the victim there gets resurrected for this TV show)
  • Characters in so much pain and angst that they can barely walk? (All of them)
  • Pop culture references? (For some reason they’re missing in Firefly; the rest has more than enough of them)
  • Actors from previous Joss Whedon works? (Avengers kind of averted that, but Cobie Smolders was at least a friend, and Clark Gregg got roped into appearing into Joss’s version of Much Ado About Nothing after Avengers was done).
  • A great sense of humor? (All of them)
  • Horrible things happening to people in love? (Avengers is still lacking that one. Be very afraid for Pepper in Avengers 2)

There are probably a few others that I missed.


  1. I am definitely not going to do all that punctuation stuff unless I’m getting paid for it.