Wednesday, July 29, 2009

A month of web coding


(Clever mug from stevenfrank)

I haven't posted anything in the last month as I've been on a web-coding sprint for our new bioinformatic enterprise: "Traitwise". This was the first time I've done any serious web-based development since about 1997. It hasn't changed much -- it's still a disaster.

The list of things that are wrong with web development would fill a book so here's my really short summary.

D/HTML is a disaster. It made a tiny bit of sense in 1994 when pages were, briefly, 99% text and 1% mark up. But now, even reasonably simple pages turn into 99% inefficient layout gibberish and 1% content. So the semantic premise of a web page has been inverted. Sarah told me that I should switch to the meta markup languages like HAML and she's probably right, but I didn't find out about that until too late.

CSS is a disaster. Obviously a committee with no programming experience and little vision of where the web was going came up CSS because only those ignorant of programming would be dumb enough to use "-" as a delimiter. But that's just a trivial gripe: the entire design of CSS is flawed. The base HTML semantic tags "p", "a", etc are not useful, only were for about 6 months in 1994, and now every page devolves into zillions of divs and spans each with a specific class moniker so you end up with a flat CSS "hierarchy" thus nullifying the CSS design and turning every page into a giant, un-readable mess.

JavaScript is a disaster. Actually, the core language is mostly OK but the portability -- the thing that really matters -- is a disaster. Thanks Microsoft! Oh, and also thanks to Google -- Chrome has broken JS even more. Chrome is the first product from Google that really pisses me off in a Microsoftian kind of way -- making the world a WORSE place instead of a better place. Attention Google, we don't need any more non-standard changes to the JS API. Please, just back away slowly from the browser market and let Firefox and the Internet standards committees lead the way. You're not going to profit from it anyway so please, just say no.

SQL is a (continuing) disaster. The inefficient mapping of the most rudimentary problems onto the relational database model is just plain wrong. The world needs a standard simpler transactional hash object that would do most of what you want as a web developer and be a lot simpler and faster. This is especially relevant given that environments like RoR are just building and mapping all these relationships internally thus nullifying the point of a relational database. RoR might as well just abandon the database and use its own transactional hash-oriented file system. The only reason they don't do so, one assumes, is the momentum of legacy databases.

Flash/Flex/AS3/MXML is a disaster. Let's sart with the marketing. What is the name of this product? Flash became Flex but is wrapped in MXML? Or is it AS3? Or is Flash the cleint-side run-time? Why do you compile .as3 files with an MXML compiler? WTF guys, how about version numbers, try them, they're great. I'm sitting next to Rob, a former Adobe developer, and even he doesn't understand the names -- we had a 15 minute argument sorting out which part of this product line is named what. There's so many confusing and broken things in Flash/Flex/As3/MXML/WhateverItsCalled I could go on for hours. I wasted untold days sorting out the simplest, stupidest things. I put "FLEXHACK" in my code next to every work-around or counter-intutive hack (like putting +5 on every textWidth) there must be 100 of those tags in my code and I got tired of putting them in after a while. Really basic concepts of object oriented programming are just flat out violated by their awful Flex design, for example the unclear dynamic typing, the UIComponent mess, and the lack of deep object duplication. But really, I could go on and on.... Like, how about the secret *deleting* of subversion controlled files off my hard-drive that the IDE didn't own -- that was just great! Or the secret deleting of comment lines at the top of the files in the IDE. Or the screwed up caching of a SWF in the wrong folder that frustrated me for several painful hours.)

The only thing that isn't a development disaster in my month-long experience was Ruby on Rails. There were a few odd things about it that threw me off (it was much stricter about type casting than I assumed it would be) but mostly it made perfect sense and Rails is obviously the work of a professional. Everything about Rails from the docs to the API's demonstrated that the author(s) knew what they were doing. I was impressed.

2 comments:

Etha said...

LOL, love thisd rant!! my sentiments exactly. Oh how fine were the days when we could just write our html in notepad and ftp it to the server...
I am amazed though that you manage to keep a "blogger" blog, as this platform never fails to amaze me with it's idiocy in code ;)

Anonymous said...

Sigh. You were doing fine and I agreed with everything - then you praised Ruby.
I'll bet, since its 2013 now, you've changed that opinion eh? ;)

Look, Ruby by itself is fine, its a cute little language. Its just that it has no right to exist whatsoever:

PHP is developed to the point where its the fastest and least buggy of any 'web app' (spits) language, and thats the end of it.

The complaints about PHP are all from idiots whingeing about trivialities, period. PHP won.

The Ruby folks (poor fools) are just discovering NOW what it takes to get a language system to an industrial level.
It will take them a while, by which time some hundreds of new crappy acronyms will have been thought up and newer even stupider arguments will have broken out.

Getting back on track - the problem was always MARKUP. Nobody wanted markup. They wanted LAYOUT. But they were too stupid to speak up.

Nobody wanted Text Flow either - its useless for most applications. And if you do want it, you damn well want to define text flow in terms of layout!

We should be in 2013 programming web stuff in some variant of Postscript, or something similar - ie. something in which all these problems were solved long ago.

CSS is a disaster. Though I will say I've been using LESS (not to be confused with unix command line 'less') a bit in my current contract - it makes CSS almost the language it should always have been, and much easier to use, but its still an utter abortion.

Thank you for letting me add to your rant.