web comments edit

I didn’t realize what a can of worms I was really opening with the ContactCard popup contact information script I put out yesterday. And it’s not about the functionality of the script as much as where the script gets its data from.

In wanting to Get Things Done and get the script out there, the contact information that the script uses when it displays its information is actually stored in a JavaScript recordset that gets specified by the person setting it up on the web site. A good first step, to be sure, but we all hate maintaining contact information in multiple places - what if the script could read from external data sources?

In the last, like, day, I’ve become so much more vastly aware of these peripheral web development efforts that seem to be going on almost under the radar (and gathering some severe momentum).

First I learned about FOAF - Friend of a Friend - a way to specify contact information and relationships in a common XML format based on RDF. This sounded like a keen thing, especially in relation to the ContactCard script: wouldn’t it be cool to just say “user ‘tillig’ has his information stored over at such-and-such URL” and have the script automatically get that information for you so you don’t have to maintain it?

That didn’t seem like too much of a stretch, but FOAF seems to still be pretty young and changing, and it’d be some interesting work to do in creating a JavaScript FOAF document parser.

While thinking about that, I contacted Phil Haack, who cooked up a script that displays XFN (XHTML Friends Network) information. I thought he might have some input on how to best get this data or some ideas on other ways to retrieve centrally maintained contact information.

That’s when I really started getting into the notion of microformats and microtemplates.

Microformats seem to be, basically, the bastardization of existing HTML elements and attributes to describe information. hCard, a microformat for contact information that mimics the functionality of vCard, uses CSS classes to define elements for each bit of contact info being provided. (I do something sort of similar with the ContactCard script - I look for elements with a specific CSS class and those are the ones that get updated with the popup contact card behavior.) This is on a whole new level, though. For example, here’s a simple hCard with my name: <div class="vcard"><span class="fn">Travis Illig</span></div>

The XHTML Friends Network microformat is another one, using the “rel” attribute on links to specify the relation of someone else to you. (I’m not super convinced of the usefulness of this right now; it’s neat, but I’m having a rough time coming up for a really great use case.)

So I could use hCard as a data source, too. And write the parser for that, if there isn’t one already out there. The problem I see is that you can specify multiple hCards on a single HTML page… so how would I know which one to use?

From microformats, we move into microtemplates. Microtemplates are sort of like microformats in that they, too, change the meaning of existing HTML (CSS class in particular) to suit their needs. This time, though, it’s much closer to the idea of ASP.NET templates in data binding - you specify a set of empty HTML elements with specific CSS classes, then you use a microtemplate engine to take a set of data and bind it to the HTML element template. You can see a more concrete example of this at microtemplates.org.

I usually feel like I’m pretty up on web technology, but I gotta say, I feel blindsided. Like I just woke up and suddenly all this change just happened and I don’t know where I was. Interesting stuff, and I’m somehow just oblivious.

And I have mixed feelings about it. Was XML not good enough? Was it too specific? HTML always seemed to me to be predisposed to distributing non-structured data - is changing it to try to distribute structured data a good idea, or is it more like a square peg/round hole situation?

Regardless, I guess it’s time to jump on board. Here we go!

Recently inspired by a trip through Pragmatic Ajax and a look at Phil Haack’s XFN Highlighter Script, I decided to play around with the prototype JavaScript library and create a little pop-up contact information script.

What this allows you to do is specify the contact information for a given person including their name, email address, web site URL, a short description of them, and their Xbox Live Gamertag and have the contact info pop up automatically when you put your cursor over a link describing them.

To use it, you need to add the prototype library and the ContactCard library to the <head /> of your page. Then you define your list of contacts and related information in a separate script and add that - whenever you need to add, remove, or change contact info, you then just modify that separate script.

By adding the CSS class contactcard followed by a period and the ID of the given contact, the ContactCard script will automatically rewrite the page with the popup. If it’s a link, including XFN relationship information will automatically have that added to the contact card:

<a href="/" rel="me" class="contactcard.tillig">Travis Illig</a>

This works on any HTML element, not just links:

<span class="contactcard.tillig">Travis Illig</span>

The script will also automatically find links that have URLs matching those you have defined for contacts and will attach a contact’s card to those links without you having to do anything. (You can disable this behavior if you want.)

Full usage instructions, including how to customize the look of the popup card, are included. Check out the test page that is included for working examples.

Note 8/22/2014: There are better ways to do this with jQuery and Bootstrap now, but I’ve not bothered updating this script. You can still grab it if you like, but it’s totally unsupported.

Download ContactCard 1.2.0

Version History: 1.0.0: First release. 1.1.0: Added support for rendering XFN information for a link without having contact info attached. Fixed positioning bug. 1.2.0: Added option to automatically rewrite links that match the URL for a contact. Enabled by default.

I’m a reasonably easy-going person. Reasonably. And I’m all for folks who want to wear comfortable clothing. I, myself, am not a fashion plate by any means, usually opting for the jeans-and-a-screen-print-t-shirt look.

But there is something about flip-flops that I cannot fucking stand.

The slap-slap-slap of your sheer footwear incompetence echoes through my mind as you meander past. And you must meander, because it is impossible - nay, punishment - for you, the flip-flop wearer (or “flopper,” as you might be called), to move with any purpose. Should that happen, not only would the mindset of the laid-back shoe choice be contradicted, but the sheer physical torture of the harder, more frequent slap-slap-slap against the bottoms of your tender, tender feet would become too much to bear.

No, you must meander. Or you must shuffle, which is just as bad. The inability of many floppers to pick up their feet is something that scientific studies should be written on. Perfectly capable human being one day, utter sloth the next. The transformation is inexplicable.

It only makes it worse that people seem to think that flip-flops are a positive fashion statement of late. You know you’ve seen this one - gorgeous woman walking through the mall, a “10” on any scale, shirt that costs more than you make in a week, pants that fit perfectly, hair done up “just so…” And a pair of God damn flip-flops on her feet.

It’s a good thing I’m not single because flip-flops are grounds for instant disqualification. Flip-flops and smoking. In that order. Thank God Jenn doesn’t smoke and won’t wear flip-flops, I’d have to dump her ass like a used Yugo.

In fact, there are only four acceptable times at which you may wear flip-flops:

  1. You’re in the shower at the gym
  2. You’re walking on the beach
  3. You just escaped from jail and had to steal shoes from the closest convenience store
  4. You’re about to get arrested on Cops

All other times - no go. If you’re on the fence, save yourself. There are countless other models of sandal that you can take part in that won’t sacrifice your position in the eyes of humanity. Do not succumb to be a flopper.

gaming, xbox comments edit

When I got my Xbox 360, I also got an Xbox Live Gold account so I could play online with folks. Jenn, too, wanted to play, so she got a Gold account as well. Cool.

Of course, Jenn wants to play at the same time I’m playing, which is neat, even though we don’t work cooperatively for crap. (Ironic?) What that means is we need Xbox 360 games that support multiple people playing online from the same console.

Don’t all of them do that? Actually, it turns out not as many as you’d think do. On classic Xbox, Halo 2 supports two people on the same Xbox logged into Live at the same time (actually, I think it supports up to four on the same Xbox while logged into Live). But which games on Xbox 360?

You’d think Gauntlet would - it supports up to four people in the game, and it doesn’t even need split-screen. Nope - you can either play multiple people on the Xbox or you can play online, but not both at the same time. What about PGR3? Nope - same deal, you get to pick.

Of course, this was pretty disappointing to Jenn, who bought the account specifically to play, and thus far has really only had a chance to get on with Halo 2. (Again, she wants to play with me, and I don’t have two Xbox 360 consoles.)

On an up note, I found a database that is gathering information on which games support this sort of thing. I think this is going to be a huge resource for me: http://www.45six.com/xbox/360games/

As of this writing, I have my choice of Perfect Dark Zero, Ghost Recon: Advanced Warfighter, or The Outfit. (Luckily, we own The Outfit and like it, so we now just need to convince our friends to pick it up.)

UPDATE 3/31/08: Looks like Co-Optimus has started a nice listing of co-op games for several systems.

Your results:

You are Geordi LaForge

You work well with others and often fix problems quickly. Your romantic relationships are often bungled.

  • Geordi LaForge: 75%
  • Jean-Luc Picard: 70%
  • James T. Kirk (Captain): 65%
  • An Expendable Character (Redshirt): 65%
  • Leonard McCoy (Bones): 60%
  • Spock: 50%
  • Beverly Crusher : 45%
  • Data: 45%
  • Mr. Scott: 40%
  • Will Riker: 40%
  • Deanna Troi: 40%
  • Chekov: 35%
  • Worf: 30%
  • Uhura: 25%
  • Mr. Sulu: 15%

Click here to take the Star Trek Personality Quiz