Happenings

Tweaking

I told myself I’d leave the markup for this site alone for a while, but I found myself unable to not correct a previous over-sight. While the main navigation list for this site uses, and always has used, proper list markup, I noticed that the syndication list (blogtree, xml, GeoURL etc) does not. How this one slipped past, I don’t know.

If you’re getting any weird effects (things should look exactly the way they did before), then press ctrl and F5 together. That should clear things up nicely.

Semantic?

Recently, someone asked me what semantic markup is. Semantic markup is the way all mark-up should be. A page can exist and validate as XHTML (using the W3C validator) without really being proper XHTML.

To understand what I mean, you have to really understand what mark-up is. While I lack a complete historical knowledge of the subject, I know the rough details (but this isn’t a history lesson, just a brief overview). People wanted information that they stored to have meaning, so that people could understand what kind of data was being stored just by looking at it. The standard that eventually emerged was SGML.

Created in 1974 by Dr Charles F. Goldfarb, SGML was originally conceived to allow people to use data across different platforms and by different applications. By making the way of making text significant part of the text itself, it became easy to write something once on one computer and then re-use it on many other computers.

Tim Berners-Lee, generally considered to be the father of the web, created HTML from his loose understanding of SGML. As most people know, HTML is what a webpage is made up of. Very simply, it’s just the information you want inside tags. For example, if you want a paragraph of text you use the P tag. If you want to show an image, you used the IMG tag.

The biggest problem with HTML is that it lacked 2 of the main properties of other markup languages: well-formedness and real meaning. Almost every markup language requires that tags must be closed, and have some sort of case rule. This is called well-formedness (as in the tags are complete), and sadly HTML lacked it as a necessity. Also, the issue of meaning: every tag has a precise meaning (as mentioned before). But people, when actually using HTML, just used any old tag that got the work done, regardless of what it actually said about their markup. The line-break tag (BR) and table tags were the most abused: people would (and still do) shove entire essays into a single paragraph and separate real paragraphs with inappropriate line-breaks. They would also layout everything on their website with tables and never know it was wrong. Tabular data, such as scientific results, belongs in tables. Essays and navigation lists generally don’t.

The markup purists gawked. What to do about this bastard child of meaningful markup and presentation? The masses liked it, so getting rid of it wasn’t an option. Or was it?

In 1994, Tim Bray and a few others created XML from SGML. Much like its parent language, it’s a general way of taking information and giving it structure. It’s just a fair bit simpler (and more aimed towards web-development) than SGML. It’s been used to structure everything from mathematical documents to porn metadata (such as the title and star of the film).

Every article on this website exists as an XML document. I can access that one file and turn it into any format I wish: from the markup that you see on these pages, to the RSS feeds that I provide. In short, XML is very powerful, meaningful and widely-used.

At some point, someone at the World Wide Web Consortium (the people in charge of updating the HTML specification amongst other things) realised that HTML needed to be more like XML. And so, a new language was born: XHTML.

Presented as the future of HTML, the new XHTML had to incorporate the wellformedness and meaning of XML, as well as it’s extensibility (the X at the beginning of XHTML comes from extensibility) among other features. Finally, a web markup language capable of being meaningful, useful and platform-independent.

So what did the masses of web developers do? Those who learned of XHTML and understood the real point behind it (like myself) and didn’t just see it as HTML+ 1, used it properly. Uncoupling the way our web pages looked from the data itself, making our words richer by using the tags at our disposal rather than fudging everything together with tables and linebreaks and other presentational markup (B and U tags – I’m looking at you). And that is what we call Semantic Markup: using the tags properly.

Now the XHTML specification is still open to abuse: people write markup that will validate and think it’s good XHTML. It isn’t necessarily. The validator only checks for well-formedness. It can’t look at a page and see if it’s using the language in the spirit that it was intended: to provide meaning for content.

Why use semantic markup?

  • It’s well-formed, so it can be understood by pretty much any browser or parser on any device. That means more people can understand and view what you write. This site works in any browser: from Mosaic (which is 10 years old today), to Internet Explorer, to Mozilla, to any number of non-visual browsers (screen-readers used for the blind, for example). That is the power of well-formed markup.
  • It’s meaningful. Every word I write has implied meaning via the markup. This gives it both hidden and viewable depth. For example, if you use a visual browser, throughout this article you might have noticed words that have a dashed underline (but because my markup is separate from the presentation, I can change this). Those are acronyms. By marking them up with the ACRONYM tag, you can then put your mouse-over them to find out what those acronyms stand for.

And those are the reasons that every web developer who is even remotely competent should be using semantic markup.

Net MiniDisc

NetMD is a fantastic idea: hook up a NetMD player to your computer and just drag music over. Simple.

Of course, anyone who has used one can probably tell you that it isn’t that simple in practice. The default software, OpenMG (known as Sonic Stage in some areas), is dreadful. Prone to crashing, not starting up, ignoring your USB connection, and a plethora of other problems. The only other official software available is Simple Burner. It takes a CD and transfers the contents over to NetMD very quickly. This, however, only helps if you want to move a CD across, and not a bunch of random songs.

Now there’s a new solution: M3U2SimpleBurner. It is a bit of a beast to set-up (you need either Daemon tools or Nero Burning ROM, as well as Simple Burner and the OpenMG secure modules,

Once you’ve got it all down, you drag your mp3’s into M3U2SimpleBurner and it creates a virtual image (a fake CD that only exists on your computer). You then mount this virtual image onto a virtual drive (created by either Nero or Daemon Tools), and tell the real Simple Burner to use that.

Now, while I haven’t had a chance to use it all properly yet, it still seems like a lot less hassle than the OpenMG software. Only time will tell.

Cleaning Out The Links (Part 2)

Some more links because today was boring enough to warrant it:

  • Yorkie gets more sexist – After the rather funny start to the “It’s not for girls” campaign, Nestle take it one step further. Nice,
  • American flag screen-saver – There’s nothing I hate more than seeing an American flag flapping in the wind. Not because I’m anti-American, but it’s got be the most cliched image of current times. How many films recently have included a random flag blowing in the wind for the sake of “patriotism”? It’s bullshit and it’s annoying. So, to balance out that mini-rant, you can use that link to download an american flag screen-saver,
  • Flag-O-Rama – I can’t decide whether this site is a parody or not. Either way, it’s quite amusing. “Take that, hippie scum! YEEEEE-HAWWWWW”,
  • Petals falling – There’s something quite beautiful about the image on that page. I’m not sure why, but I like it.
  • 26 things a perfect guy would do (and other propaganda) – Maddox: Idiot, nutcase or genius? Who knows. Any way, it’s a funny article. Number 10 is particularly amusing.

That’s your lot for the day.

Pushing Blood

In an effort to finally figure out why I occassionally collapse and black-out, my doctor suggested that I had a heart monitor attached for 24 hours. This didn’t bother me too much.

When I turned up to have it fitted yesterday, it turns out it wasn’t a heart monitor he wanted fitted; it was a blood pressure monitor. This did bother me. A lot. I really don’t like having my blood pressure taken: restricting my arms, squeezing out my vains, making me lose feeling for a minute or two. It’s not my idea of fun. But, since it was supposedly in my own best interest, I got it attached.

Now, it’s fairly bad when a doctor takes your blood pressure. He can at least figure out how tight it’s supposed to get and get it done quickly. Apparently, machines can’t. It over-inflated almost every time, making sleeping quite difficult. Every hour (or every half hour before 10pm), it would switch on and try to cause my hand to burst. The experience was akin to having a Boa Constrictor attached to your arm; not entirely comfortable.

It’s off now. But I started thinking about the chances of it having found anything. Now, the fact that it kept waking me up last night means that my mathematical prowess is slightly off, but I reckon the chances of it actually picking up one of my crazy-fun-collapso-fits is 900 to 1. That’s not a horse I’d bet on.