YOU DON’T NEED TO CONCOT ALL SORTS OF ELABORATE CIRCUMLOCUTIONS BECAUSE THEY’RE BUILT INTO THE LANGUAGE ITSELF (and no one will read your stupid poetry anyway)
08/31/2006 22:50:12 EST •  tags: beach, code, nerdery, web


numbers00.gif

Been rather crazy lately, with the finishing of work and the preparing to leave New York for Providence, blech. Read a lot of books lately: that new ill-designed Houellebecq, that depressing but intriguing Murakami bit about the Tokyo gas attack, some old Salinger and Bukowski and other such shit. Mostly pleasantly untheoretical, in anticipation of school again I guess. I started the Superstudio Middelburg Lectures book but I got annoyed with the footnote typography and threw it across the room, and then drank whiskey.

The shit I did for Merce Cunningham ended up being pretty good, I think, which is a rare thing for me to say, cuz usually my own work does not thrill me, especially this sort of work, which was mostly code. I sort of hate writing code with all of my heart, really, but it pays the bills so I do it, which of course makes me feel like a dirty whore. C’est la guerre, no? Yeah.

The trouble, really, is that my social circle is composed mainly of people who do not write code. This is sort of by design, really, cuz nothing is retardeder than a bunch of geeks sitting around talking about code. It gets very old very quickly. Shit was particularly bad in Troy, where we were all geeks of one stripe or another, and I recall that at one party at Kevin’s, we made the rule that there would be no computer talk after midnight, and it was a good rule, indeed.

So but still I have the urge to shoot off my mouth about code, now and again. So what I am going to do is put a bunch of code talk in the “extended entry” portion of this “blog article”, yes, and if you are so inclined you can click the little link and read all about that nonsense, so it’s not all up in your face. How’s that? I think that’s good. Yes.

Anyway. In non-code news, I am going to the beach tomorrow with my friends for labor day. This particular beach is in Amagansett, which is a good place to go because you can avoid sounding like an utter douche and saying “oh yes I’m going to the Hamptons”, because you’re not, technically speaking. Anyway it’s not like that anyway, we stay at a total 70’s-vintage beach house owned by Anna’s parents, not some twatterrific mansion. So yeah. Fuck yeah!

-fish

 

SO YEAH: code. I had to redo this database that a former Merce employee had developed using this product. And let me tell you: it was a motherfucking mess of the highest order. There was tons and tons of info in the database: thousands upon thousands of records, some going back to 1942. Gigs of photos and scanned news articles and other shit like that.

So but “web data pro” is a really, really wonky product. It lets you create database tables with point-and-click ease, which is good. It has a sensible way of storing metadata and other relational info for those tables, which is also good. But then it leads you to create fantastically shitty interfaces for accessing that data. It’s obscene, really. It would make any web-standards wonk gag: the code it generates by default is all non-validating pre-html-4.0 shit with all sorts of badly inlined javascript and inconsistent CSS and what have you.

Furthermore, doing relatively simple shit like joins or multiple-table lookups is nigh-impossible. You can, however, search multiple columns in a single table with ease. And the code for “web data pro” itself is an arrow in the quiver of every perl-hater everywhere: the entire CMS is stored in a single, monolithic, 6000-line perl module. That’s EVERYTHING: fucking HTML, CSS, javascript, SQL, what the fuck ever. IT’S ALL INLINED. Batty, I tell you.

So what I ended up doing was having “web data pro” send out the simplest HTML possible (basically just ordered lists with rel, class, and id attributes; I had to hack the perl module to make the stuff it would generate valid XHTML), the DOM of which I then assaulted with a gigantic javascript library based on prototype. Where I would normally do a join or someshit, I wrote custom PHP that examined the “web data pro” metadata tables and generated XML, which the page would receive and summarily transform the DOM to match. (I think people generally refer to this sort of technique as “AJAX”, which is a stupid buzzword, so fuck that shit).

It’s kind of neat, cuz the page builds itself out of nothing, and it’s only marginally slower than doing the same transformations on the server. Plus I got used to DOM coding; it’s some intuitive shit, for the most part.

The other thing is that even though “web data pro” was entirely frustrating to work with, it made me rethink a bunch of my core philosophy regarding database organization. Most sites I build are based on this PHP framework I developed at RPI, which is an object-to-relational mapping framework. So, every table is a class, and every row is an instance. It’s all nice and neat and supernormalized, with doodads like XML serialization and runtime introspection and memcache support and blah blah blah. But it’s sort of overdesigned, I am now thinking. Because of its rabid object-oriented philosopy, some key things like arbitrary searching were very slow (the reasons for which I will not bore you with now).

“Web data pro”, on the other hand, made me appreciate a looser design. Not like I am going to start coding any 6000-line perl files now, mind you no. But the Merce system has a great emphasis on searching, and so the different types of data are related by semantics, for the most part, rather than any notions of “links” or primary keys or what have you. So you might get a few extra results when searching, but that’s kind of beneficial, and far better than getting less. While showing one of the Merce people how to use it, I described this shift in organizational philosophy as “more like google and less like a filofax”… does that make sense? It makes sense to me.

Ok yeah. That is my story, and I’m sticking to it. Yes.

Comments:
by laura on September 1, 2006 03:42 AM

so it’s like 3am and i need to get up in a few hours. perhaps you’ll be happy to hear, that even though i know nothing about all this codey business, your extended entry did not, in fact, put me to sleep like i was hoping it would. neither did all the codeine. it kind of sucks. so either i’ll never fall asleep again as it seems, or you could write all about dental floss and q-tips and it would still be totally engaging. yes.

by sheila on September 1, 2006 10:04 AM

holy fuck, I didn’t know you coded too. kick ass.

So, every table is a class, and every row is an instance. It’s all nice and neat and supernormalized, with doodads

yessir I do that sometimes, bad. somewhere between that and the crazy module is better.

Patterns of Enterprise Application Architecture

wtf, no preview? let’s see if I borked the url

by sheila on September 1, 2006 10:06 AM

I borked the url. I tried “title” for annoying pop-up comment: flip through table of contents to see sections on object-relational mapping patterns to skim or read.

add a new comment:










remember me?








fish, at gmail, dot com