login
v2
v1

jmoiron.net

Hand generated code

posted June10th, 2005 @ 04:40:00

- tags: development , politik , web design

- comments: 0

For most of today I was trying my hand at developing an object oriented framwork that would result in generated code that would look as if it was handwritten. My preliminary results are pretty encouraging. The main idea comes from the the design of PHPhtmlLib, but I wasn't happy with the generated code from that library and wanted something a little more XHTML friendly.

The last week has been somewhat of a hell on earth: at work I struggled with creating a decent reusable web framework (as many others have struggled and failed before). I am pretty hesitant to do much work on a framework at this point, although I'll definitely go on with what I've got because I see potential for a lot of great things, but I view them as largely personal things. The more you know about HTML the more control you will want over HTML code; the more you want your source to look hand-written, the more apt you are to simply hand-write your source.

On the other extreme are those who want a web-based web framework, who want to create their entire websites from a web backend. I wrote something along these lines but it was very constricting; the layout of my page was basically established, and I could fit different data into that layout, but not really do anything else. I like the current direction I'm going with; so far the obvious code reuse has been extreme: without inheritance a 300 line library would be around 1500 lines and have errors hidden all over.

The real reason the past week has been a hell is that my apartment lacks any air conditioning and its been about 90 with high humidity every day. Night brings little relief, and even though a fan is on duty all day and all night trying to bring cool air in, the net result is less than encouraging. My room has been so hot as to make computer use somewhat impossible, and ever item that I own is hot to the touch (including, most amazingly as I took a cool shower last night, my bathtub and my shampoo). I don't know how people can do it; how my life falls apart without the luxuries of personal climate control even as millions of Africans get by in worse conditions with worse amenities.

I have been speaking to Fred Rassam recently about politics, and have promised him something of a dossier explaining my position on international economics structures. He is a hardcore libertarian and somewhat of a human darwinist; I have a hard time explaining why I feel that certain systems are bad to him because something that I see as a moral absolute (exploitation is bad) he sees as a healthy side effect of a bustling capitalist system. How do you reason that economic systems should focus on income redistribution when the person you are reasing with is upset that the price of a shirt made by people getting paid $.06 to make it should be $2 instead of the current (and equally ridiculous) $8? Combine that with the fact that the system of economics he pushes is a largely purist system that has never been put into practice, and the system of economics I push is a largely purist system that has never been put into practice, and its tough to draw comparissons that don't come laden with a bunch of conditionals.

comments