Tuesday, September 25, 2007

Why good HTML programming is like good screenwriting.

In the past couple of days I've been busy working on my homepage(s). I didn't have the funds to employ either a professional webpage designer or to buy professional software, like dreamweaver. I tried both the MS Office Publisher that came with my MS Office package, and the on-line design wizard offered by my domain host, but found both way to constrictive. So I had a friend teach me the basics of HTML and CSS, borrowed the excellent "HTML & XHTML - The Definitive Guide" by Chuck Musciano & Bill Kennedy, and set out to do it myself.
Ok, I depend heavily on W3School's HTML and CSS Tutorials, SELFHTML, and the Templates of of CSS Intensivstation and grateful use Notepad++ for the actual code writing, but I'm actually writing the code - understanding it - instead of just doing some magic on a GUI-based program.
Which is new for me, at least as far as working on my computer is concerned. Normally I'm a total oblivious end-user, with not even the slightest grip on the underlying mechanisms of the stuff I'm using. Normally I also think that's completely ok, Pirsig and The Art of Motorcycle Maintenance notwithstanding. I don't need to understand the principle of heat exchangers to get a bionade from my fridge. But in this case, I find myself oddly enjoying working with the basic HTML building blocks.
In the beginning it was just the mixture of not-enough-money and too-much-artistic-vision that drove me to even try trying it this way. But when my friend - who, at least as a programmer, is Mr. A-Place-For-Everything-And-Everything-In-Its-Place - started to explain to me some of the basic idea sof HTML, I sort of got into it totally. Because, the way he told it to me, HTML is about knowing what you want to create, before you create it. Sure you can simply start at one end and start adding in text and images and links and edit the style this way and that, until you have addressed every individual pixel of your browser window, but to my friend that was more than unaethetic, it was almost heretical, and anyway, the W3C is slowly fading these options out. Soon, the new XHTML standard will no longer permit this sort of "cruft".
The way it should be done is this: You come up with a unified design - the fonds used, the styles of the headlines, even the way the text-body, the headlines and the images, borders, margins, and all that work together, and you put this down in your Cascading Style Sheet, a seperate file from your actual webpage, that is more a how-to style reference guideline for the webpage itself. And then you write the actual webpage, which in its ideal form schould contain only the actualy content: the text, the links, etc. And all the browser does when it displays this content, is check on the CSS-page how to display it.
This is a lot like writing a screen play.
Because of course you can simply sit down and start on page one with "Fade in: Ext. Hearst Castle - Night" and continue until "The flames consume the sled. The last thing we see is the company logo and its name: Rosebud. Fade to Black." But I seriously doubt you will create something as masterful as Citizen Kane. I even doubt you will ever reach that last page. You will drown in cruft before you ever get there.
The way to do it, is to know what your story is about, to decide on the plot, the main characters, their need and want, on the turning points, that define the acts and sequences, and then whith everything in its place, you can "fill in" those Sequences and Scenes with the actual content, the action and dialogue that will be all that should in the end be visible to the audience.
Of course writers like Robert Ben Garant (Night at the Museum, Balls of Fury) are quite correct, when they advise writers to "do it. Write. Don't mull. Write it down. If you are not writing constantly, you [...] are not a writer."
But that same principle also goes for designing webpages in code. If you only plan, but never actually program, your webpage might have the potential of being the best ever, only it never gets made. I am writing, rewriting, and even redesigning my page all the time, at the moment. But I don't re-design little details without keeping their place in the "grand scheme" of my design in mind at all times. Just as you should never re-write scenes in your script without knowing exactly what mechanical parts of the overall script mechanism they represent, and how changing any of it influences the whole. And to be able to keep this image, this map, of the whole script in mind, is to understand its structure. For that, it needs to have one.
The secret as always lies in the correct balance: Too much time invested in structuring leads to great ideas that are never executed. Too little leads to cruft and chaos and slow death in the La Brea Tar Pits.
But for myself, I must say, that writing my own homepage in HTML has taught me bunches about how to write my next script.

Thursday, September 20, 2007

Barbie's Weird Idea

Okay, here goes. Barbie's idea: It's like, that people... well, that everybody has a secret world inside of them. I mean everybody. All of the people in the whole world - no matter how dull and boring they are on the outside.
Inside them they've all got unimaginable, magnificent, wonderful, stupid, amazing worlds...
Not just one world. Hundreds of them. Thousands maybe.
Isn't that a weird thought.
(From: A Game of You Episode 6: "I Woke Up and One of Us Was Crying", Sandman #37, by Neil Gamain)

One of the things I like most about Neil Gaiman is his fundamental humanity (which extends not only to all of humankind, regardless of gender, orientation, or skin-tone, but also to decidedly un-human characters such as goblins, gods and anthropomrophic principles). As Gaiman said himself in response to Samuel Delany's foreword to "A Game of You", it is not that everybody is equal, but that everybody has the right to decide for him-, her- or itself. Fate, or God, or any God, really, may have it in for you, and they may judge and may even have the power to damn you, but in the big picture their opinion, entitled to it as they may be, weighs no heavier than that of any other individual in this or any other world. It is the most cosmically democratic view I have ever heard, and I love it.

Blogs are the absolute low bar of publishing. Well, blog-comments may actually be even lower. You need no special skills, be they technical or literary, no standing, no credibility, there is no quality-control other than the often barely enforced ethical standarts of the blog host, and - which makes this even less inhibiting than the proverbial soap-box on the street corner - you get to remain (or at least feel) anonymous.

Which leads to many evil, stupid, racist, insulting, misinforming and mostly very dull publications. But it also leads to an explosion of expression. Because, as Barbie (and Neil Gaiman) quite rightly pointed out, everybody has something to say. Everybody has unimaginable, magnificent, wonderful, stupid, amazing worlds in them, and suddenly through the wonder of blogging, we can all share them.

To those who moan about the often incredibly stupid and occasional outright vile blogs, I say: Don't read them. Nobody is forcing you to. To those who warn of the proliferation of hatred and insanity, I say: Better to know what's out there, even if it's bad news, than to have it fester in hiding.

Wikipedia (which is to say, in the words of blogger and Dilbert-Author Scott Adams, some stranger with no credibility) tells me that there are about 100 million regularely maintained blogs out there. Think about this number for a second.

And tell me that it isn't great to live in a world where that is possible.