18 August 2009

What Donald Knuth thinks is worth working on.

From an interview with the Free Software Magazine:

Maybe you feel that some of today’s technologies are still unsatisfactory. If you weren’t busy writing your masterpieces, what technology would you try to revolutionize and in what way?

Well certainly I would try to work for world peace and justice. I tend to think of myself as a citizen of the world; I am pleasantly excited when I see the world getting smaller and people of different cultures working together and respecting their differences. Conversely I am distressed when I learn about deep-seated hatred or when I see people exploiting others or shoving them around pre-emptively.

In what way could the desired revolution come about? Who knows… but I suspect that “Engineers Without Borders” are closer than anybody else to a working strategy by which geeks like me could help.
I totally agree with Prof. Knuth on this!

Maybe the innovations that we need today are more social than they are technological. After all, we all have food, shelter, readily available medical care, and an internet connection. The next thing we'd need is peace and happiness!

17 August 2009

Professoren und ihre Sklaven

Ich meine ja nicht unbedingt, dass all Professoren böse sind. Vielmehr unwissend oder so. Sie richten Schaden an, ohne es zu wissen. Aber was kann man ihnen denn auch vorwerfen. Sie leben und arbeiten nun mal für Ihre Forschung. Viele von Ihnen kennen gar nichts anderes, weil sie vom Studenten zum Doktoranden über Postdoc irgendwann Professor geworden sind. Und die größte Nähe zur Industrie hatten sie vielleicht mal über ein Praktikum oder eine Forschungskooperation mit einer Forschungsabteilung einer großen Firma wie IBM, die selbst ziemlich weit vom normalen Geschäftsablauf entfernt ist.
Der Professor sagt seinem Studenten immer, dass er sich nicht zu viel vornehmen soll, denn nach dem Master kommt ja noch die Promotion, da kann man die Arbeit dann besser machen. Für den Master muss es ja noch nicht wirklich gut sein. Und in der Promotion muss es zwar schon irgendwie substantiell sein, aber man muss nichts so wirklich abschließend gut behandeln, schließlich will man ja nachher als Postdoc auch noch etwas veröffentlichen.
Was diese Generalstrategie der immer währenden Imperfektion nicht behandelt ist einen Ausstiegsplan. Es ist einfach nicht vorgesehen, dass ein Student nach der Promotion nicht weiter in der Wissenschaft bleiben will. Wenn man nämlich nicht selbst in der Wissenschaft bleibt und seine eigenen Ergebnisse weiter entwickelt und immer wieder anderen Forschern vorstellt, dann werden sie ganz einfach sehr schnell vergessen! Der Kandidat erhält zwar seinen Titel, aber die Arbeit ist im Prinzip für die Katz. Für den Papierkorb.

Nun wie ist das bei mir? Ich hatte mich zwar auch ein bisschen auf einen schönen Doktortitel gefreut, aber für so eine Belohnung konnte ich noch nie gut arbeiten. Meine eigentliche Motivation war an einem schönen Thema zu arbeiten, und wenn ich in dem Thema nicht weiter komme, oder es am Ende dann doch niemanden interessiert, dann ist auch meine Motivation weg. Spaß wird zur Quälerei und ich sollte meine wertvolle Zeit und mein Talent besser woanders investieren.

Ich glaube, dass ich in den letzten Monaten nicht zustande gebracht habe, weil ich unterbewusst schon wusste, dass ich mit nur einer Masterarbeit oder einer Promotion meine schöne Idee des Programmbeweisers verwirklichen kann. Leider hat das aber weder mein Professor, noch die lieben Kommilitonen verstanden und konnte mir helfen, meinen eigenen Weg zu finden. Gestern habe ich endlich jemanden gefunden, der mich versteht. Jemand, der mir einfach zuhören kann und sich dann in meine Lage versetzen. Ich habe das Gefühl, dass dies eine Gespräch an einem Nachmittag mich in einen anderen Zustand versetzt hat. Heute konnte ich plötzlich richtig gut arbeiten! Ich kann endlich wieder an die Arbeit denken, ohne gleich Kopfschmerzen zu bekommen oder müde zu werden. Ich weiß jetzt, dass meine Idee nicht mehr zu retten ist. Sie wird vergessen werden, sobald mein Betreuer die Arbeit zu Ende gelesen hat. Aber was ich in der Zeit hier gelernt habe, werde ich nicht vergessen. Und meinen Master-Titel hole ich mir. Man weiß ja nie, wann ich den mal gebrauchen kann! Um Dozent am College oder einer Fachhochschule zu werden, ist er sicher von Nutzen!

Mein lieber Professor hat von all dem leider keine Ahnung. Ich sagte ihm, dass meine vielen Probleme an der Masterarbeit doch sicher kein gutes Zeichen für eine Promotion sind. Doch er meinte nur, ich soll mich ans Schreiben machen und dann wird alles schon werden.

Jetzt, da mir das alles egal ist, da ich keine Sorgen um die Promotion mehr haben muss, geht die Arbeit doch viel leichter von der Hand! Und wozu brauche ich einen Dr.-Titel, wenn ich immer noch (FH-)Professor werden kann!?
Haha! Die Prophezeiung aus dem Kindergarten, wo sie mich Professor Willi nannten, muss doch irgendwann zur Wahrheit werden!

2 August 2009

Why I hate modern Computer Science

First of all, the field should actually be called "Computer Magic", because it doesn't look much like a science. One of the reasons is shown below.

I came upon this blog post which prepared an essay about coping and failure. Now, I am not going to say that computer scientists fail too often, because when working on really hard problems, failure is always part of the game. The problem with much of contemporary Computer Magic, however, is that many things are hard, which actually could be --actually, should to be!-- much simpler.

The author of the above-linked piece explains how for a very simple task, he needs to deal with a lot of computer-internal issues. All he wants to do is, given an already running new mail notification applet, add a functionality that displays the sender of a newly received mail. To do this, he has to deal with five different types of incompatible "strings", only to add:
This simplifies it a bit, but I’m too frustrated to spend more time explaining it.
This should really not be that hard! Given a properly defined interface (API) for the existing libraries, this task would be easy enough for a beginning programmer, not even a CS major, to accomplish. But in reality it needs a well-educated, experienced programmer and even for them, it is still hard and frustrating.

When I started to program, all I had was a BASIC interpreter with an integrated help system and some examples. There was no Google or even Internet access at that time. There were not many functions in the programming environment, all very basic, but well-documented. It was easy and fun to build things on top of that. One of the things we build for school was a little function library for linear algebra and then a simple user interface for that. You could do anything with this environment! Only that the really interesting things would need too much programming, because everything had to be built from scratch.

Nowadays, expectations towards computers are way higher. Instead of a little linear algebra calculator, people would expect an on-line, collaborative learning tool with 3D visualization inclusive. Given how many libraries are available for all kinds of things, this is actually not too hard to do today. But the problem is, that most of the available libraries (and that's across the board, in any domain of CS) are simple too complicated to use, not well documented, and maybe even a little buggy.

Often times, the line between complexity and bugginess is blurred in a frightening way. I think this plays a big part in the field's misery and that's why I'll give you a bigger example to explain it.
Let's look at an imaginary Linear Algebra library, where I can subtract vectors "v" and "w" with the expression "v.subtract(w)". Let's say that I am writing a program that just crashes at this line, and after some debugging I find that during the crash we always have "v == w" and some more testing shows that an expression like "v.subtract(v)" actually always crashes! So, since I am a good person, I will go to the project website for the library and file a bug report. (Spending ten minutes just to sign up for the bug tracking system... I am signed up for so many of them already!)
The next day, I get a reply that my bug was closed and that I should have had a look at the mailing list archives or the web forum for beginning programmers (since there is no other "documentation" than archives from mail, forums, and IRC!) and then I would have seen, that "v.subtract(v)" is wrong code that should actually be "v.subtract(v.copy())".
Then I write back that this workaround doesn't make sense "v.subtract(v)" is the obviously right thing and it should work. With me being so critical of their project, there is actually a chance that the developers will simply ignore my message. But let's suppose that I will get a reply. In this case, the wording will probably be quite upset, saying that " 'v.subtract(v.copy())' is not a workaround, but it's the proper way to do it." And "if [I] knew anything about how the library works, it would be perfectly clear to [me] that I can't pass any object as an argument to its own methods."
Now, I am also getting upset and do my best to reply politely, but firmly, saying that this is precisely the purpose of any library: that one can use it without knowing what's going on behind the scenes.

Do you see the clash of cultures here? I think that the people who do such a bad software design are idiots that create more damage than doing good, because their library has more bugs than features and wastes many people's time. On the other hand, they are probably thinking that I am a stupid idiot who just can't understand that a vector is not the same as a "vector object" and I have to copy the object before passing it as an argument. (But I do know the difference, I am just saying that this is not the best way to do it.)

Please don't ask me what the technical reason for not passing objects to their own methods in this example is. I just made the example up based on similar experiences whose technical details I have thankfully forgotten. 

I think the problem with many libraries, programming languages and other tools is that most of their users just want the functionality and are willing to accept unneeded complexity, probably even thinking that they are just not as smart as the people who made it. And they are revering the people who made it and don't realize that those people are actually way too smart: they create things that are too complex and by consequence waste other people's time.

Greg Wilson writes in an article (PDF) about Free/Libre and Open Source Software's (FLOSS) culture:
The greatest harm done by FLOSS’s cold shoulder is that it chases people away. This is the real cost of any discrimination, including the passive discrimination created by unwelcoming environments. When users (and developers) feel that they’re not welcome, they’ll invest their time elsewhere. What remains is a community that suffers from a lack of diversity and new ideas. Only those who match the definition of a hard-core geek remain, and thus the cycle perpetuates itself.

I think that this statement at least partly generalizes to all of information technology: things here are complex and the people working here love to learn and deal with the intricacies of complex things. People who think that things should be simpler are simply turning away to careers more interesting to them. There are only a very few visionaries who actually understand the complicated things and at the same time work hard to simplify them. (Currently, it seems that Apple and Google employ most of them.)

To finally go back to the initial example of different string types a simple mail notification program has to deal with. Probably some of the complexity of the string types is needed to deal with different character encodings in email. Probably most of the complexity is just historically grown and unnecessary. Only some genius expert knows exactly which is which and how it could be simplified. Maybe even nobody knows all of it, because it all has been written by different people during a long period of time. It's insanely complex and makes your program crash. That why I hate modern Computer Magic.