Why Application Programming Sucks

You, the programmer, have a problem you would like to solve. This is what progammers do, but since it seems like a common problem, so you leap to t3h googles for a solution:
“Oh great google god, this lazy progammer beseeches you, find me someone who has already solved my problem”
and sure enough, within the first page of results, there is a promising function, DoWhatIWant(), in the magic library. This magic library must be common enough, since it solves your problem, so you hit the package manager (please tell me you are running a system with a package manager. If you have to spend hours tracking down nullsoft installers of patched second class citizen versions, you have only yourself to blame.) to find and install it.
$ sudo newpackagewrangler updatecommand
$ newpackagewrangler searchcommand magic

…10 hits, one of which is PROBABLY the one you intended…
$ sudo newpackagewrangler new-better-install-command magic2
Install:
Magic2 (150K)
Depends:
behemoth (75.3M), UglyTK (5.6M), libCuteName (200K), libalkjosaoifdnjg (547k)
Install (Y/N)?

Let’s take a moment to figure out what the hell just happened:

  • behemoth: It’s 75Mb of crap – included for a single function that could have been reeimplimented in less than 100 lines of code.
  • UglyTK: It’s the newest, greatest graphical toolkit, for an included example frontend. There are only 4 programs written with it, you don’t use any of them, and it won’t take the theme from GTK or QT.
  • libCuteName: Probably named for an animal or a color; at one point there was a clever reason for this, but it has since been depricated.
  • libalkjosaoifdnjg : It isn’t clear what the hell this does, and it appears the name was selected by placing a keyboard in a box of kittens. Thats fine because all editors support autocompletion, right?

Since Magic.DoWhatIWant() appears to do exactly what you want, the package manager can take care of it, and your system supports shared libraries, how bad could it be?
While the dependency pile downloads and installs, you take a look at the documentation, and find that Magic.DoWhatIWant() has 93 arguments.. and only 70 of them are explained. You think “Surely, such a useful function is used all over the place.” and return to the interwebs to find an example.
The example you find actually has 97 arguments, since the documentation is perpetually out of date, and they don’t appear to be a superset of the 93 from the documentation – But Magic.DoWhatIWant() calls to you, and you begin hacking away to make it work.
After some hours, you come upon a heated argument in the magic maling list archive, where one of the developers has declared one of the 97 arguments “bloated crap,” in the last release cycle and removed it, in the process making DoWhatIWant() sligtly less suited to your problem than it seemed – but now you’ve invested some effort, and it should still do basically what you need once you figure it out…
Typically, two days later, you throw up your hands, and, in about two hours, write a function in pure C that solves the problem – or notice that by preprocessing the input with a 10-line AWK script the problem can be avoided alltogether. Occasionally, again about two days later, you DO get it to work, but end up having to do about half the task DoWhatIWant() was supposed to accomplish yourself – and now have 80Mb of dependencies for your 75k program, meaning you will have to update it every time any of them changes.

I realize several of the issues I’m mocking here are contradictory – that’s why it is such a shitty situation. Also, I do mean to be singling out the “layers on top of layers on top of package managers that were shifty when they were written in the early 90s” package managers so many distributions cling to.
This post brought to you by the bitterness of another weekend spent spelunking around inside of LLVM.

This entry was posted in Computers, DIY, General, Navel Gazing and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *