Macs in Media

Der Quellcode hinter einer Anwendung

Every good programmer has gone through this. You discover a new tool, and it seems shapely and fit for purpose. You start using it, tentatively at first, gradually getting more and more used to its quirks and features. Over time, trust between you grows, and your casual friendship blossoms into something deeper. The program becomes part of that sacred subset of utilities you can’t imagine yourself without. All is bliss… Then, one day, you decide to look at the code. Maybe you want to extend it, maybe you’re just curious. The moment you fire up your editor on the first source file, you sense that something is wrong. Without reading a line, you notice a certain visual complexity to the code - something to do with deeply nested and over-long functions. Looking closer, you quickly realise that tangles of ifdefs snake through the source like a canker. Weird indentation and non-idiomatic constructs are everywhere. The project’s structure sucks - there’s no proper component isolation, its innards are a nest of subtle and devious co-dependencies. Beneath the skin of the streamlined program you thought you were using lies a grotesque, bloated, unmaintainable monstrosity. You’re heartbroken - you’ve trusted this tool for years, and now it betrays you like this. It was all a lie - nothing will ever be the same again…

Die meisten „normalen“ Anwender möchten gar nicht wissen, wie der Quellcode einer Anwendung aussieht, die sie im Alltag benutzen und auf die sie vertrauen. Bisher sind mir immer zwei Extrema aufgefallen: Entweder hat man Code vor sich, welcher überpenibel sauber und ordentlich gehalten ist und bei dem jede Änderung sorgfältig darauf überprüft wird, dass dies weiterhin so bleibt. Oder man hat Quellcode vor sich, bei dem man sich überhaupt wundert, wie er die Gesamtanwendung zusammenhält.

Zählt nur das Endergebnis? Ich weiß es nicht. Jedenfalls beruhigt es mein Gewissen ungemein, wenn auch hintenrum alles ordentlich ist.

[via hatful of hollow]