How to screw up html5 in 12 easy steps¹

If you were wondering whether "12 steps" was an Alcoholics Anonymous reference, suffice it that it feels like it should be. There is nothing that I have attempted recently that was any more apt to cause a massive binge drinking spree than when I thought I'd spent a few weeks creating a website, only to learn that I had constructed a Frankenstein of gibberish.

How did such insanity come to be from one who used to spend hours writing code without live view nor WYSIWYG editors? Well... it had been a number (let's say 5) years since I had done so. In the mean time, I had occassionally kept up with the restructuring (or destructuring) of HTML... or at least I thought I had. What had, in fact, happened was that I had paid attention early on to proposed changes, which had somehow become set in mind as if I'd seen them yesterday (or 5 years ago). What changed in 5 years? Everything... and nothing.

Funny enough, everything would have been great had I simply forgotten what I thought I knew and just written the 4.01 that I actually did know, since it still works perfectly fine for most things. Oh well! What I ended up with was a hodgepodge of beautiful 4.01, 5, and neverwas. The "neverwas" is the bit that still kills me. I should have saved my original pages so that I could give a snippet of the more interesting sections. Alas! I did not.

Guess what? I know you'll be shocked, but when those original pages were uploaded, they didn't work...at all. Some parts simply didn't render. Some just looked rather strange. And others showed code mixed with text (in one case overwriting a picture...still not sure how I did that).

That, however, wasn't the worst of it. I rapidly realized that something was amiss, so spent some time looking at the actual specs and laughing at myself and perhaps cursing a bit. Then, several days of playing around, and finally deciding that it only made sense to hybridize the code, had everything "looking" about right. It wasn't until I uploaded the "corrected" pages that I noticed a far, far worse error. That particular foible was inside of what was intended to be JavaScript and CSS and PHP and JSON. It seems that every time I took a break, I returned to writing in a different language than before. There were bits of ColdFusion and C and Perl entangled in what should have been fairly straightforward code. There was CSS in my .js files (which would have been fine if it had been written properly to be included there, and a rather odd bit of JavaScript right smack dab in the middle of a style sheet. I had somehow turned into the Billy Pilgrim of coding, except unstuck in mind.

So... I did what any sane person would have done in the same situation. I had a beverage, deleted every speck of code that wasn't html, and began anew, re-writing one script or code section at a time. And then I had another beverage. And then, I deleted most of what I had written, and downloaded bootstrap, having remembered that I was going to have to write code to "fix" the compatibility issues with various browsers and devices and probably even more code to "fix" the code that I wasn't even sure would work in any browser.

I presume that about now you are skimming along trying to find a moral to this story. Well.... I'm not sure there is one.
¹ Originally this entry was entitled "How to screw up html5 in 42 easy steps," but Eric expected that particular number, so it required changing.
Daniel Northcutt picture

About Vader

Daniel is the Head of The Department of Reality at Tinman Innovations.
Back to Top