{"id":624,"date":"2011-02-28T13:57:06","date_gmt":"2011-02-28T18:57:06","guid":{"rendered":"http:\/\/pappp.net\/?p=624"},"modified":"2011-02-28T13:57:06","modified_gmt":"2011-02-28T18:57:06","slug":"why-application-programming-sucks","status":"publish","type":"post","link":"https:\/\/pappp.net\/?p=624","title":{"rendered":"Why Application Programming Sucks"},"content":{"rendered":"<p>You, the programmer, have a problem you would like to solve.  This <i>is<\/i> what progammers do, but since it seems like a common problem, so you leap to t3h googles for a solution:<br \/>\n&#8220;Oh great google god, this lazy progammer beseeches you, find me someone who has already solved my problem&#8221;<br \/>\nand sure enough, within the first page of results, there is a promising function, <code>DoWhatIWant()<\/code>, in the <code>magic<\/code> library.  This magic library must be common enough, since it solves your problem, so you hit the package manager (<i>please<\/i> 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.<br \/>\n<code>$ sudo newpackagewrangler updatecommand<br \/>\n$ newpackagewrangler searchcommand magic<\/code><br \/>\n&#8230;10 hits, one of which is PROBABLY the one you intended&#8230;<br \/>\n<code>$ sudo newpackagewrangler new-better-install-command magic2<br \/>\nInstall:<br \/>\nMagic2 (150K)<br \/>\nDepends:<br \/>\nbehemoth (75.3M), UglyTK (5.6M), libCuteName (200K), libalkjosaoifdnjg (547k)<br \/>\nInstall (Y\/N)?<br \/>\n<\/code><br \/>\nLet&#8217;s take a moment to figure out what the hell just happened:<\/p>\n<ul>\n<li><code>behemoth<\/code>: It&#8217;s 75Mb of crap &#8211; included for a single function that could have been reeimplimented in less than 100 lines of code.<\/li>\n<li><code>UglyTK<\/code>: It&#8217;s the newest, greatest graphical toolkit, for an included example frontend.  There are only 4 programs written with it, you don&#8217;t use any of them, and it won&#8217;t take the theme from GTK or QT.<\/li>\n<li><code>libCuteName<\/code>: Probably named for an animal or a color; at one point there was a clever reason for this, but it has since been depricated.<\/li>\n<li><code>libalkjosaoifdnjg<\/code> : It isn&#8217;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?<\/li>\n<\/ul>\n<p>Since <code>Magic.DoWhatIWant()<\/code> 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?<br \/>\nWhile the dependency pile downloads and installs, you take a look at the documentation, and find that <code>Magic.DoWhatIWant()<\/code> has 93 arguments.. and only 70 of them are explained.  You think &#8220;Surely, such a useful function is used all over the place.&#8221; and return to the interwebs to find an example.<br \/>\nThe example you find actually has <i>97<\/i> arguments, since the documentation is perpetually out of date, and they don&#8217;t appear to be a superset of the 93 from the documentation &#8211; But <code>Magic.DoWhatIWant()<\/code> calls to you, and you begin hacking away to make it work.<br \/>\nAfter some hours, you come upon a heated argument in the <code>magic<\/code> maling list archive, where one of the developers has declared one of the 97 arguments &#8220;bloated crap,&#8221; in the last release cycle and removed it, in the process making <code>DoWhatIWant()<\/code> sligtly less suited to your problem than it seemed &#8211; but now you&#8217;ve invested some effort, and it <i>should<\/i> still do basically what you need once you figure it out&#8230;<br \/>\nTypically, two days later, you throw up your hands, and, in about two hours, write a function in pure C that solves the problem &#8211; 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 <code>DoWhatIWant()<\/code> was supposed to accomplish yourself &#8211; and now have 80Mb of dependencies for your 75k program, meaning you will have to update it every time any of them changes. <\/p>\n<p>I realize several of the issues I&#8217;m mocking here are contradictory &#8211; that&#8217;s why it is such a shitty situation.  Also, I do mean to be singling out the &#8220;layers on top of layers on top of package managers that were shifty when they were written in the early 90s&#8221; package managers so many distributions cling to.<br \/>\nThis post brought to you by the bitterness of another weekend spent spelunking around inside of LLVM.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: &#8220;Oh great google god, this lazy progammer &hellip; <a href=\"https:\/\/pappp.net\/?p=624\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8,1,7],"tags":[23,95],"class_list":["post-624","post","type-post","status-publish","format-standard","hentry","category-computers","category-diy","category-general","category-navel-gazing","tag-hate","tag-programming"],"_links":{"self":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=624"}],"version-history":[{"count":0,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions"}],"wp:attachment":[{"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}