Generating HTML like it's 1999

I'm pretty much consumed with work at the moment: stories that I can bring to a social situation have dropped significantly - as evidenced by my plummeting blogging rate from roughly 1-post-per-week to some number that's lower than the morale of a Foxconn factory worker - and, barring that one dream in my last blog post where a wonderful Scottish accent turned into harsh pirate yarn, my most recent dreams have actually all been about work.

You know what's terrible about work dreams? The same thing that's terrible about those homework dreams you sometimes get during the high school and university years: you wake-up and, some time during the day, realize that your dream about completing the most awesome assignment that any teacher in the history of teachers is ever going to see - such that they will give you medals, prize money, and (for the guys, when your teacher happens to be hot, young, and female) offers to have your babies - never happened.

It's a terrible feeling of disappointment, and I felt that just 2 weeks ago when I had a dream I completed all my tasks in the most mind-blowing manner, then when I got to work and sat-down at my desk for the first time that morning, realized that none of it ever happened.

I sighed audibly, and nobody even looked my way.


The work I'm doing at the moment is the first big new-development project I have ever been on since joining this company straight out of university almost 5 years ago. Being the rookie when I came into work, I was always given the not-so-glamorous job of bug-fixing existing systems and attempting to undo messes made by the developers who came before me a long time ago. The worst cases were when the code was developed by a contractor or by somebody who obviously didn't care which college-grad-n00bie would be looking at their code in the future and submitting the detritus that they encountered to websites like TheDailyWTF.

It wasn't terrible work: I learned a lot, and the years since then have given me enough experience and grounding in my own programming habits to realize that I wouldn't have trusted that younger version of me to work on anything so important as what I am working on now. But it was very cushy work: never stressful, I always had spare time for my own projects and thoughts, and work never pervaded the life I lead after hours.

Now that's all changed.

One of the things I'm struggling with right now is JSF. (Here's where this post starts to get a bit techy)

For the uninitiated, JSF is one of many many frameworks out there whose objectives are, amongst other things, to make life easier for developers (like myself), particularly in creating very large Java web-based systems. That's the objective of pretty much any framework: to make software development easier by giving you a foundation to start with.

Somewhere along the way though, the creators of JSF omitted the 'make things easier' part from their objectives and instead created something that's more difficult to work with than Facebook's privacy settings. Not only that, but JSF creates completely new and unique problems that weren't there before. It's like I was told to dig a trench... and they gave me chopsticks. I would've preferred a spoon but JSF is supposed to be a better spoon, so not only am I now digging a trench with the wrong tool, but it's also giving me hand cramps.

Note to the people behind JSF: you can't program like this

The thing it's worst at, and my main issue with JSF, is creating web pages. You'd think for a technology that's supposed to be used for web development, it'd make the serving of web pages to a person's browser one of the things it'd be best at, but no! Instead, they created some ridiculous abstraction over (X)HTML components and ask you to use their own components which will generate HTML for you.

As an aside: one of the things I had been getting into during my spare time was web design and development best practices: clean HTML pages, proper uses of HTML markup, all the tricks of CSS, SEO, and using the powers of JavaScript only for good. I do my best to apply all these things to my own website, and while I'm no expert at web design, I can spot questionable practices when I see them.

I remember the first time I saw the HTML that came out of one of the JSF pages at work: the web designer in me died a little, and a threw-up a bit in my mouth.

To use a line from another JSF-bashing blog post, it generated HTML like it was 1999: tables, more tables, nested tables, and 1px images to space content.

Just the feeling that I've been put into a time machine and sent back to when web development was, to be honest, pretty shit, does not give me confidence in JSF at all.

CSS Zen Garden - Geocities 1996
Coding like it's 1999...

So in short, I'm getting a bit stressed about work, deadlines are looming while the amount I've been tasked with just keeps growing, and it's totally not helping when the technology we're using to create this system is giving me persistent headaches. (I actually went to the pharmacy last Thursday and bought a pack of 100 tablets of paracetamol. They normally only sell them in packs of 20. I went for the bulk deal. Thanks a lot JSF.)