comments edit

Hulk I just hate it when software designed to save you countless hours of development work just don’t work out of the box. Especially when you pay good money for it. I’ve come to expect a few hiccups here and there with open source software. But purchasing an expensive rich editing component from a leading vendor, performing a fresh install, and having buttons popup javascript alert boxes with debug information is inexcusable. Along with some other features just plain not working.

It just makes me angry! And you don’ want to see me when I’m angry! Grrr…

comments edit

Wireless PC Lock I don’t know about you, but running into an unlocked workstation in the office is like finding a voucher for a free airline ticket and hotel stay at Vegas complete with gambling money. In other words, pure fun. (Ok, perhaps I overstated that a bit. I’d much prefer the free stay in Vegas. Anyone? Anyone?)

There are any number of interesting pranks you can pull, but my favorite continues to be to take a screenshot of the user’s desktop, and then move all desktop shortcuts into a backup folder. Also make sure to hide all the taskbars. Then find a decent inconspicuous vantage point and watch as the unsuspecting user flounders with an unresponsive desktop. That’s usually good for a few laughs.

Alternatives include replacing desktop background with embarassing images and changing all the sounds in the systems to embarassing sounds, or simply to sounds for other system functions. The last one is quite subtle, but can be quite confusing as it shows how reliant we can become on sound to navigate a computer.

In any case, in his role as desktop hijinks party pooper, Scott Hanselman has unveiled his latest installment of his “Some Assembly Required” column.

In this installment, he highlights a fine piece of USB hardware, a wireless pc lock, used to automatically lock your machine when you are away. The hardware unfortunately comes with some lame software, so he proceeds to build improved software that can not only lock your machine when you’re away, but set your IM status to away (along with other functions and an extensibility model). That’s pretty sweet and all, but if this catches on, finding unlocked workstations could be a thing of the past (unless you happen to wander into the business or marketing department, the source of all email viruses in any company).

Well, I guess there’ll always the prank of stealing the USB dongle.

Security Question\ I am a little ignorant about how USB works, but one security question this raises is what happens if you walk away, and I put an intermediate USB device between the dongle and the computer, and record the data going back and forth. When the user returns, he or she is quite unlikely to notice if the dongle is in the back of the computer (think corporate workstation). How will this device and software protect against that?

comments edit


Let me know if you like these videos I’m posting or if you’re one video away from cracking my skull with a wet noodle. Cause if you want to crack my skull, you’re really going to have to wait in line.

Meanwhile, watch as this skateboarder skates through a pool full of blue balloons for a neat visual effect.

Update: As Diego points out, I always forget to link. Damn it! Well I linked it now!


comments edit

Man, I’ve been so heads down busy with work lately that I haven’t had time to regale you with the fantastical events that have been going on around here. Tales of wizards, warriors, and actuarials. Seriously, kick-ass actuarials.

Instead, I’ve simply been linking to other people’s mindless drivel, rather than producing my own. However, I did have a moment to breathe today and watch this hilarious video.

Seriously, go check it out. Now! Satisfaction guaranteed or your money back. If I have ever lead you astray with one of these video links, you let me know. But I don’t think I’ve gone wrong yet. Except for maybe that chair sex video. You know, the one that put Paris Hilton out of business. Seriously, furniture fornication was probaby out of line.

comments edit

Ha ha ha! Thanks for publishing this one Robb. If anyone is offended, my finger is pointing at Robb. I’m just the messenger.

A farmer walks into his bedroom where his wife is lying on the bed, reading a book. The farmer picks up a sheep he had brought with him in the room and throws it on the bed.

“That’s the pig I screw when you’re not in the mood,” says the Farmer.

“That’s not a pig, that’s a sheep, “ replies his wife.

“Shut up, “ says the farmer, “I’m not talking to you!”

[Via Sharp as a Marble]

comments edit

Reading this post from Jayson’s blog caught my attention for two reasons. First, his very strong reaction to some code that swallows an exception. Second, the fact that I’ve written such code before.

Here is the code in question.

public bool IsNumeric(string s)








        return false;


    return true;


Jayson’s proposed solution is…

I personally would use double.TryParse() (and downcast accordingly depending on the result) at the very least. At the very most I’d break the string down to a char array, and walk the array calling one of the (very) useful static char.Is<whatever> methods…first non<whatever> value, break out of the loop and return false. I’ve posted before about the speed at which the framework can process char data…it’s very fast and effecient (sic).

For the sake of this discussion, let’s assume the method was intended to be IsInteger(). Using Int.Parse() to test if a string is a number doesn’t make sense since it immediately chokes on 3.14 (get it? Chokes on Pi. Get it? Damn. No sense of humor). If indeed this method was intended to be IsNumeric then I would suggest using double.TryParse and the discussion is finished.

Now in general, I agree with Jayson and often raise fits when I see an exception blindly swallowed. However, when you only deal in absolutes, you start to become a robot (yes, I am resisting the offhand political joke here). For every absolute rule you find in programming (or anywhere for that matter), there is often an example case that is the exception to the rule. As they say, the exception proves the rule.

The problem with simply parsing the string character by character is that it’s quite easy to make a mistake. For example, if you simply called char.IsNumber() on each character, your code would choke on “-123”. That’s certainly an integer.

Also, what happens when you want to extend this to handle hex numbers and thousands separators. For example, this code snippet shows various ways to parse an integer.

Console.WriteLine(int.Parse(“07A”, NumberStyles.HexNumber));

Console.WriteLine(int.Parse(“-1234”, NumberStyles.AllowLeadingSign));

Console.WriteLine(int.Parse(“1,302,312”, NumberStyles.AllowThousands));


This is one of those cases where the API failed us, and was corrected in the upcoming .NET 2.0. In .NET 2.0, this is a moot point. But for those of us using 1.1, I think this is a case where it can be argued that swallowing an exception is a valid workaround for a problem with the API. However, we should swallow the correct exception.

Since there is no int.TryParse() method, I’d still rather rely on the API to do number parsing than rolling my own. It’s not that I don’t think I am capable of it, but I have a much smaller base of testers than the framework team. Here’s how I might rewrite this method.

public bool IsInteger(string s, NumberStyles numberStyles)


    if(s == null)

        throw new ArgumentNullException(“s”, “Sorry, but I don’t do null.”);




        Int32.Parse(s, numberStyles);

        return true;




        //Intentionally Swallowing this.


    return false;


So in 99.9% of the cases, I agree with Jayson that you should generally not swallow exceptions, but there are always the few cases where it might be appropriate. When in doubt, throw it. In the rewrite of this method, notice that I don’t catch ALL exceptions, only the expected one. I wouldn’t want to swallow a ThreadAbortException, OutOfMemoryException, etc…

I would also put a //TODO: in there so that as soon as the polish is put on .NET 2.0, I would rewrite this method immediately to use int.TryParse() and make everybody more comfortable.

This is a case where I do feel uneasy using an exception to control the flow, but that uneasiness is ameliorated in that it is encapsulated in a tight small method. Also, one objection to this post I can anticipate is that it is freakin’ easy to parse an integer, so why not roll your own? While true, the principle remains. What if we were discussing parsing something much more difficult? For exampe, suppose we were instead discussing a method IsGuid(). Now you have to deal with the fact there isn’t even a Guid.Parse() method. You have to pass the string to the constructor of the Guid which will throw an exception if the string is not in a valid format. Yikes! I thought constructors were never supposed to throw exceptions.

In this case, I’d probably prefer not to roll my own Guid parsing algorithm, instead relying on the one provided. Why write code that already exists?

So Jayson, in general you are right, but please don’t beat me to death with a wet noodle if you see something like this in my code. ;)

comments edit

Oh yeah, this little curse is going around right now as Microsoft recently released some new security updates. I love Robb’s take on the real message underneath the Automatic Update dialog.

Curse you, Bill Gates!

And your stupid “automatic updates” too….

Do it, or

[Via Sharp as a Marble]

comments edit

Shuttle Crew Very early this morning my slumber was disturbed by an extremely lound noise. Like Maverick in Top Gun, those durn shuttle astronauts did a fly by enroute to Edwards, setting off car alarms and howling dogs in the neighborhood. Couldn’t y’all have flown by quietly. There were people sleeping you know. Next thing you know, them punk astronauts will attach a huge bass subwoofer in the back of that thing, spinners, just to let you know what’s up.

All kidding aside, I am glad to hear they made it back safe and sound (a big sound). I wish I would have known they were swinging by. I wonder if I would have been able to see it from here.

comments edit

So you’re ready to bore the world with your stuttering lisp via podcasting. Congratulations! Join the thousands of others podcasting their mind numbing undifferentiated message.

But there is a way to stand out. You need an audio logo. Audio logos arguably have a stronger impact than visual logos. Think of the following companies: NBC, Intel and 20th Century Fox. Can you hear in your head their audio logos? Now that’s impact!

Michael Whalen, an independent film score composer, recently started a podcasting logo division, geared towards the more limited budgets of the typical podcasting outfit.

So when the time comes for me to unleash my nasally atonal discordant voice upon the world, it’s heartening to know that my drivel could be accompanied by a kick ass audio logo from someone who’s done work for ABC News, PBS, Apple Computers, etc…

comments edit

Spam Before I mention this, I better knock on wood and cross my fingers so as not to jinx it, but I haven’t had any comment spam for several days. In fact, for the past month, the amount of comment spam on my blog has been greatly reduced. Is rel="nofollow" actually working despite the naysayers? Or have I become such a small fry, that I am not worth the extra CPU cycles and bandwidth to graffiti my site?

Not that I’m complaining, mind you. I love it! I doubt it will last for long, but I can enjoy it while the calm lasts. I just hope it isn’t one of those things where by mentioning it, I bring it on myself.

Whatever the reason, I’ll still be working hard to make sure Subtext is resilient to spam.

personal comments edit


Well I am back home in the good ol’ U.S. of A and strongly feeling the effects of jet lag despite the few coffees I’ve had in a pathetic attempt to stave off the lethargy.

Despite many of the fancy schmancy meals we had (which were all extremely delicious), my favorite meal was when we went out to a gritty smoky Yakitori place in a nook underneath the train tracks in the Ginza district. As you can see in the photo to the right, the place is tucked against the curving wall of the tunnel.

Protect the

This was my father-in-law’s favorite Yakitori place, so we brought along a picture of him taken at this place and sat down to enjoy some beer, sake, and delicious Yakitori. A close family friend surprised us by joining us, a full hour and forty minutes by train from his work place.

I wish I could find a Yakitori place in Los Angeles that was even half as good as this place.

Technorati Tags: japan,tokyo

comments edit

A long time ago, in a galaxy far away, I wrote a really simple little class for converting State Codes to State Names and Vice Versa.

Essentially, this class contained two enums, one for state codes such as AK and CA. Another enum contained state names such as Alaska and California. There were static methods that facilitated converting between the the two as well as string representations.

Simple stuff really, but very helpful if you deal with states all the time. However, just today I received an email from Omer pointing out that I am trusting the order of the two enums values to be aligned to allow conversions between the two. While it happens to work, it creates a dependency on the order of the values that doesn’t need to be there. You never know when we’ll annex Iraq as our 51st state and need to add a value to the enums.

In any case, I took Omar’s Omer’s suggestion to have one of the enums refer to the other. For example, here’s a snippet of the StateCode enum.

public enum StateCode


    /// <summary>Alabama</summary>

    AL = State.Alabama,

    /// <summary>Alaska</summary>

    AK = State.Alaska,

    ///… and so on


Download the revised code here. Thanks Omer!

personal comments edit

In ten minutes we’re getting on the train to go to the Narita airport. I always feel sad when leaving, but excited to get back to work and the exciting opportunities therein. The fact we are flying Singapore airlines is some consolation. They have a fantastic in-flight entertainment system. If only they had wi-fi.

Technorati Tags: japan,tokyo

comments edit

And if so, is he angry? I wondered this after reading Is Object Oriented Programming The Problem? in which Don invokes the programmer archetype, “Mort” to make a point.

Who is Mort?

For the uninitiated, Mort is a creation of arrogant software developers (I don’t exclude myself from this group) used to lump together and define the quintessential “average” developer. Actually, “creation” isn’t the correct word. In the same way that Design Patterns are discovered, not created, Mort is a discovery. He’s a Developer Pattern (If nobody has that term trademarked, I hereby claim it for myself).

Mort isn’t the only Developer Pattern I’ve seen in the wild, but he is the only one famous enough to go by a single name (think Pele, Madonna, etc..) that I know of. Other Developer Patterns that come to mind…

The Bleeding Edge Liberal
This one thinks Release Candidate software is so five minutes ago. Alpha and Beta software only, baby. The Conservative Curmudgeon
This one still promotes punch cards as the solution to all software woes and believes things were better when a bug was best taken care of with a can of raid and a fly swatter. The Trainer
The last time this one wrote a try/catch block was during the lesson on exception handling. The True Believer
This one thinks that for any problem, there is one and only one correct solution. This person also believes there is only one true programming language and that language is…

I digress. As I stated before, Mort is the prototype of the average developer. He works 9 to 5 in some cubicle farm of a large bureaucratic corporation (perhaps he’s a government employee), and he rarely if ever attends a developer conference or discusses software development outside of the workplace. He almost certainly is not a technical blogger.

We worry for Mort.

Yet, so many advanced developers, trainers, language designers, get their panties in a tussle over how Mort is doing and what he is capable of. Is Mort switching from VB to VB.NET? Why not? Is Object Oriented Programming too difficult for Mort to grasp? How can we make it easier on poor old Mort?

What I’d like to know is just how many Morts are there out there? For example, if you ask the average developer if he or she is Mort, will you get an honest answer? I may have been in the mold of Mort when I first started writing software, but I most certainly am not Mort now, right? Right?!

Does Mort even know he’s Mort? Or is the “other guy” always Mort. There’s not much you can do for Mort unless Mort takes the first step and admits that he is indeed Mort. If Mort is defined as the “average” developer, we can’t all be “Not Mort”

Personally, I’ve never given Mort much thought. If Mort indeed does exist, I personally don’t have much interesting working with Mort. I’d much prefer working with a Jane or Juan. As a manager, my whole job was to hire someone better than Mort, though I can’t claim I was always successful.

From my experiences with Mort-like developers, Mort is capable of writing crappy code in any language, OO or not. Alot of times, this was due to what I call intellectual laziness. “Hmmm, this seems to solve the problem, I’ll move on.” Mort spends very little time reading up on the tools and platforms he uses to get his job done. Call it, programming via Intellisense. We all do it at times, and I wouldn’t want to program without it, but when Intellisense is the only means of learning an API, that’s a problem.

Mort cares little for learning about tools outside of the IDE that can help him be more productive and less error prone. For example, Mort won’t write automated unit tests, instead settling for a quick spot test, leaving the broken code for someone else to discover and fix.

Sorry Mort, but you know it’s true.

What is the Problem?

In any case, in answer to Don’s question, Is Object Oriented Programming the Problem?, my response is no, it is not. The problem is that developing Software is an extremely complex and difficult task. Engineering a sky-scraper sounds like a complicated task with many moving parts, but consider that the number of moving parts in a typical software project makes building a skyscraper look like building a small tower using Duplo blocks.

The problem is complexity and how to manage it. I am afraid there are no easy solutions. Consider that 80% of the time spent in all software projects is during the maintenance phase. This phase is typically where the use of procedural languages causes pain if not done well. If a developer cannot understand OO principles, then that developer will also very likely have trouble with writing modular code in a procedural language. Using a procedural language requires even more diligence due to its lack of language constructs to enforce encapsulation, etc…

I don’t know about you, but the thought of working on a legacy classic ASP project makes me cringe (I usually turn down such projects). I’ve seen reams and reams of spaghetti code using a procedural language (some of it written by me as a brash youth) as to make me dry heave. This is not to say a large system can’t be built well using procedural languages, just that it takes much discipline.

Of course, OO is not a panacea. Equally bad code can be written using an OO language, especially when OO principles are not well understood and you end up with procedural code anyways, or really bad OO-like code. But there’s hope! With well factored OO code, with a light sprinkle of Design Patterns where appropriate, sometimes the internal workings of a class or system are well enough encapsulated that you have a chance of maintaining a large system. There aren’t as many variables to juggle in your head at any one time.

Are DSLs the Solution?

So where do Domain Specific Languages (DSL) fit in? The history of programming languages is the story of using abstractions to hide complexity. Assembly is a abstraction layer on top of the 0s and 1s that make up binary. C is an abstraction on top of Assembly. SmallTalk, C#, and Java uses objects to abstract details of lower level languages… and so on.

Are DSLs the next level of abstraction? It would make sense, but they may be hard to deliver upon. It was thought that Component Technology would deliver the building blocks to make Mort’s life easier. Simply put the blocks together like a big Lego structure and voila! You have a working payroll system! In this scenario, your DSL is simply composed of Domain Specific components (building blocks) and your general purpose language is used to glue these blocks together.

But alas, it is never so simple as that. The problem is that although we can divide the world into distinct “Domains”, the variations within a Domain might as much as between Domains. For example, the differences between Chinese dialects are more than the differences between any two Romance languages in Europe.

The result of such variation is that you will rarely find just the right DSL for your situation or the DSL will itself be not much different than a general purpose language. One solution to this problem is to build a custom DSL for your business. But I wouldn’t task Mort with that project. Make sure your Joel’s are working on that one. Perhaps with a custom DSL, Mort has a chance to make a very meaningful contribution, without causing too much damage. If he’d only show more of an interest in building better software.

So What is the Solution?

This may come as a surprise coming from a technophile like myself, but I don’t think that we’ll find a technical solution for Mort. Even if DSLs prove themselves to be the next great abstraction level for software development, we’ll just take the extra productivity gains produced to do even more with software. We’ll build larger and more complex systems, and as we’ve learned, complexity is the problem in the first place.

Rather, I think the solution is to quit pandering to Mort with our condescending paternalistic attitude, and instead demand better from Mort. If the capabilities of the average developer truly is as bleak as many make it out to be, we shouldn’t just accept it, but work to raise the quality of the average developer. “Average developer” should describe an acceptable level of competence.

We have to realize that Mort is responsible for a lot of important systems. Systems that affect the general population. When I hear of recent cases of identity thefts such as Choicepoint among others, especially those caused by lax security such as using default passwords for the database, I think of Mort. When I read that $250 million worth of taxpayer money has gone into an overhaul of the FBI Case File system, and the system has to be scrapped. I think of Mort.

Given this much responsibility, we should expect more from Mort. So Mort, I hate to say this but software development is not like working the register at McDonalds where putting in your nine to five is enough. I am all for work-life balance, but you have to understand that Software development is an incredibly challenging field, requiring intense concentration and strong mental faculty. It’s time for you to attend a conference or two to improve your skills. It’s time for you to subscribe to a few blogs and read a few more books. But read deeper books than How to program the VCR in 21 days. For example, read a book on Design Patterns or Refactoring. Mort, I am afraid it’s time for you to quit coasting. It’s time for you to step it up a notch.

Mort, Can We All Get Along?

So Mort, if you really do exist, and you recognize who you are, I apologize if I came off as a bit harsh or critical in this post. I wonder if we’re being a bit too arrogant for pigeonholing you. Is the Mort archetype really useful for this discussion?

Perhaps my experiences have been with a sub-Mort, and not with you. I really would like to think the average developer deserves more credit. But from some of my experiences, there are large numbers of just plain bad developers out there. For you, I’d like you to know we’re thinking of you, and we know best. If you’re not willing to step up, then the best thing you can do now is go grab me a beer while we work to solve this problem.

comments edit

We here at “You’ve Been Haacked” (well, actually just me) bend over backwards (and sideways) looking to enhance your Haacked experience and deliver more bang for your buck (What!? You’re not paying for this content? You lousy cheapskates!). To that end, we are adding Job Postings to the litany of entertaining drivel posted on this site. At least, we are adding this one job posting and reserve the right to add others. Here is an opportunity to work closely with yours truly on a project or two. Please, only reply if you have the skills to pay the bills.

Web Application Developer / Solution Architect

We are a startup technology consulting company that believes IT matters more than just TCO and ROI calculations (And we prefer two-letter acronyms to three-letter acronyms). We have an immediate need for web application developers and architects who want to work with an experienced team of motivated, intelligent, and fun folks.

Our focus is on delivering business value more than just pure technological solutions, though solid technical skills are critical. What else would we shoot the breeze about during internal conference calls? So we are asking for a lot, since we hope that you’re just as comfortable talking to the client as you are with your fellow developers.

Right now, this is a short term contract position, but if things work out well, you never know. You’ll be working in a most comfortable office environment, your home! Alright then, let’s get to the usual litany of job posting details.


Three to six month contract $65 - $95 / hour depending on experience, skills, and general all around awesomeness.


  • 2+ years of technology consultant experience with direct client interaction (You know, “clients”. The folks that pay the bills.).
  • Excellent communication skills: spoken, written, visual, and otherwise.
  • Motivated, autonomous, self-starter. You need to be able to work effectively from home.
  • You must have in-depth knowledge (2+ years) of several web application technologies such as:
    • (X)HTML and CSS. Ideally, you’re a fan of CSS ZenGarden. If not, fake it.
    • XML Web Services (SOAP, WSDL, WS-*)
    • Web application security
    • XML, including XSD, XSLT, etc.
    • Must know Microsoft ASP.NET and C# as if your life depended on it. This job does.
    • Object Oriented Design.

Bonus Points:

  • DotNetNuke or knowledge of other content management / extranet / portal technologies.
  • SQL Server 2000 preferred, though excellent knowledge of other DBMS will be considered.
  • SharePoint
  • MapPoint Web Services
  • BizTalk
  • Experience with CRM, ERP, or financial systems
  • Experience with full product development life-cycle and development processes.
  • Know UML and understand Design Patterns, when to use them, and when not to.
  • Experienced with Test-Driven Development and NUnit.

If you are interested, and you have what it takes, and you think we have what it takes, send me your resume to haacked at gmail d0t com (<— Yeah, that’s a really challenging puzzle to weed out the riff-raff and spammers).

personal japan tokyo anime comments edit

Since I have a free moment (and the internet connection is back up), I thought I’d write a short status update of my trip to Japan. But first, let me point out that I used the term “status update”. What am I? A project manager?

In any case, we’re having a pretty nice time. Below is a little mural of photos I’ve taken thus far. Yes, I have been suppressing my Asian side by not being quite as trigger happy as one would expect.

Meguro Gajoen

The bathroom One of the highlights so far was our one night stay at the Meguro Gajoen Spirited Away
Bridgea luxury hotel that served as the inspiration for the location of the movie Sen to Chihiro no kamikakushi, otherwise known as Spirited Away. This place was one large museum piece. For example, though it is a bit dark, the picture to the right is of the main lobby bathroom. Notice it has a freaking bridge in there! Does that bridge look familiar?

Hotel Lobby The lobby of this place was breathtaking with its collection of historical artifacts, paintings, a pathway with water on both sides. Check out that archway within the lobby walkway. Notice the water on the left and right corners. The place even had waterfalls in its garden.

Another angle on the lobby Much of the original hotel grounds had to be razed due to an encroaching river. We took a tour of the original section that was spared the destruction due to its distance from the river.

100 Steps This is a picture of the famous 100 stairs. It turns out that there are only 99, according to our tour guide. I personally think they should add one just to be honest. In any case, I did remember this staircase from the movie.

Main lobby I also remembered this main lobby area from the movie, when all the strange inhabitants of the inn gathered together.

personal comments edit

Pagoda Yesterday we were given a tour of Asakusa from an old family friend who resides there. He is an “Edoko”, a 3rd generation Tokyo native. Apparently, it takes three generations before you get to carry the Tokyo native membership card. I’m not sure if it gets you into the hottest clubs or not, or even if it at least provides car insurance on rentals, but I am sure it is an honor nonetheless.

Anyways, sources tell me it is the same way for “Parisians”. You’re not a Parisian unless your parents and their parents were born and raised in Paris.

Asahi Corporate
headquarters My grasp of Japanese is still pretty close to non-existent, but even I was able to tell that he had an Edoko accent. They can’t pronounce the “h” sound so he prounces Asahi, “Asashi.” And when he says, “You’re welcome”, he says “Doi Tamashte” instead of “Doi Tashi-Maste.”

Speaking of Asahi, a fine beer, that’s a picture of their headquarters to the right. They used to have the brewery there in the city, but no longer. That piece of gold on top is supposed to be beer foam. Is anyone getting thirsty?

In any case, I won’t bore you with all the history of Asakusa, as I cannot remember much, but instead will point you to my photo set on Flickr, in case you are interested in seeing more photos.

Roar But I will mention that the day prior, we were in a mall when we ran into Harry here on the left. The mall had a couple of animatronic dinosaurs on display. Their movements were quite impressive and not at all machine like, except for the fact that they mostly repeated their motions over time and they didn’t pounce on me, rip out my jugular, and drink in my blood. That’s what I would expect if they were to act lifelike.

Technorati Tags: japan,tokyo

comments edit

Kevin Marks says in the comments to my last post that my example of how a format designed for both machine and human readability might run into problems was a little contrived. My dear Mr. Marks how silly of you to say so. I must vehemently disagree with your lack of insight. That example was a lot contrived. I blame Jet Lag for the lack of a better example, but the point that I was trying to make (albeit unconvincingly), is that…

A format designed for both data exchange and data presentation cannot excel at both.

Keep in mind that this doesn’t necessarily mean that Microformats cannot do well enough for both tasks. I am simply attempting to examine the consequences of using Microformats over other approaches.

There are three particular areas in which I see significant differences between a data interchange format and a presentation format.

  1. Presentation
  2. Authoring
  3. Consumption


Suppose you have a large set of data to send from one machine to another. Perhaps the statistical summaries for every soccer game played in a given month. Since we’re playing make believe here, also assume you’ve chosen XML as the format to represent that data. Are you concerned about the fact that the receiving machine is going to suffer from sensory overload trying to making sense such a large set of data?

Probably not.

When you choose a format designed for data interchange, you typically have no problems sending the entire data set. Machines don’t generally suffer from sensory overload.

But if you take the same set of data and want to present it to a human (using say, (X)HTML), you’d probably want to break it up into multiple pages, perhaps one per day, since that would be more readable for your soccer afficionado than simply cramming everything on one page (though many would-be web designers have committed such a crime in the past). Unlike machines, we humans do suffer from sensory overload.

Now it certainly is possible to send the entire data set to the browser and use DOM manipulation via Javascript to simulate paging, but that seems like a hack to me. First of all, why not do the simplest thing that works? It makes more sense to send only the data needed. Secondly, if you need to use DOM manipulation to present the data well, it just reinforces the idea that the format is not good for presentation.


Have you ever written poetry? And no, I am not referring to your code, though I do see code as poetry at times. The difference between code and poetry is that there are no strict rules to poetry. Certainly there are some rules to some forms of poetry, but the only standard rule of poetry is that to make great poetry, you have to break the rules.

Now how many machines do you know of that appreciate poetry (If you know of one, let’s talk). Probably not any at this point in time. This is due to the fact that computers cannot understand free form input. They require input formatted accordirng to very precise rules. This is one of the difficulties inherent in having a human author create content using aformat for data interchange, humans in general are not precise enough. Let me give you a more concrete example.

XHTML attempts to merge the presentation format of HTML with the data interchange format for XML. In many ways, this is a praiseworthy goal as consuming (we’ll get to that) XML is much easier than HTML. And, XML is easy to validate as it has very strict rules. Unfortunately, strict is not something humans do well.

I spent some time not too long ago attempting to make my blog XHTML 1.0 Transitional compliant. I succeeded in getting the front page to validate, but would often post content that would break validation. Imagine how bad it would be if I allowed HTML comments from visitors.

Now suppose I am writing a blog entry where I want to add a microformatted item in my blog entry. There are an infinite number of ways I could make a mistake and thus render the microformat useless and unreadable by a machine. Writing for machines takes a lot of discipline (think programmer), and humans don’t naturally do it well. We require debuggers, compilers, unit tests, etc….

As you read this, you’re probably thinking that better tools will ameliorate this problem, and you are probably right. When such tools appear, they may make this point somewhat obsolete. But I still want to contrast this approach to how my RSS feed is authored. I simply post content to my blog. The content gets stored in a structured table. An RSS generator (a machine if you wil), authors the structured data. No extra work on my part. Yes, it is a little less flexible than the alternative, since any new piece of information I want to include in the feed has to have some persistent storage associated with it and code written to author it. This is a classic trade-off. I don’t have to worry about messing around with tools or proper formatting when I create content, I merely cram it into my blog and the machine does the rest.


The other issue I have with Microformats is the Screen Scraping issue. Some Microformat proponents propose that we start building aggregators using Microformats instead of RSS. The problem with this approach as I see it is that these aggregators have to resort to screen scraping to find the appropriate markup within an HTML page. With RSS you have the benefit that the entire document is well structured, not just small sections within the document. You can use mature technologies to validate the document before you spend time trying to parse it. How well can you validate an HTML file that contains microformats alongside tag soup?

What Happens to Microformats When XHTML is widespread?

Microformats is designed to present data in a structured manner that works in current browsers. In a way, it is a compromise. XHTML promises the ability to add any kind of structured data (properly scoped by a namespace) to an HTML document, but XHTML is not yet well supported. So Microformats were created as a hybrid of XML and HTML. But what happens when XHTML is supported well. Are we going to settle for a bunch of divs to represent our data, or will we use more meaningful XML tags?

Microformats Benefits

Ok, now that I’m done being critical of Microformats (and I’m only critical because it is the new kid on the block and I want to know why I should support it, if at all), I would like to point out some benefits that occurred to me, apart from the ones I mentioned previously.

The first benefit is that it can work now. To the previous question I raised about what happens when XHTML arrives, one can say, “Who cares, it isn’t here now!” Touche! As the Greasemonkey script illustrates, people are already starting to take advantage of the presense of microformats to enhance user experience.

In part, this is an illustration of the Betamax principle. Although, I may think that RDF or XML feeds are a better technical solution to the problem Microformats tries to solve, the better technical solution doesn’t always win. Often, the more convenient solution wins. That’s why VHS won.

Second, it is flexible. By flexible, I mean that I can add microformat data by simply publishing the format. I don’t have to add a new table in my database to store hCalendar entries and then create a proper UI to add those entries. Instead, I just post a blog post and carefully format the post with the hCalendar format. Sure, I might screw it up, but I can do this now, without a recompile.

A third benefit I have heard mentioned is that it is more easily indexed. I don’t necessarily see why that is so as I have seen many RSS feeds indexed by Google.


So at this point, I am still a bit ambivalent about Microformats. I’ll probably sit back and watch how well it is adopted and see if there is a groundswell of support. We’ll definitely incorporate it into Subtext if it becomes adopted in a widespread manner. Just don’t expect to see me cheerleading a push to create Microformat aggregators. I still think RSS does a great job of that and I believe it does a better job than Microformats would. It is well known and just starting to gain mainstream recognition. There’s no point in splintering the aggregation industry at this point, confusing the layperson as a result. Besides, I have a significant time investment in RSS technologies I am not willing to give up just yet. ;)