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.

0 comments:

Post a Comment