Jay Reding On WordPress

Yet another non-hierarchial, slightly less officious oracle.

BloGTK Working On WordPress.com

This post is the first test post of BloGTK 2.0 onto WordPress.com. Since WordPress.com uses the same WordPress backend as the self-hosted version, interfacing with it is no problem at all.

Font Spotting

The great opening titles for the film Thank You For Smoking contain some truly stellar typography – and of course, the usual suspects are playing a game of identify the font. Shadowplay Studios did an excellent job of creating a really innovative title sequence for the film – the creative direction they took was perfect for the material, and the whole sequence is quite engaging.

AJAX Made Easy

Coding AJAX by hand can be a major pain, but 24 Ways has a great piece on how to use the excellent Prototype JavaScript library to make it easier – I’m definitely going to have to use that in future AJAX projects.

iTunes Gets More Shows

The slow march towards digital television distribution continues as NBC Universal is adding several of its shows to the iTunes Video Store – including the brilliant remake of Battlestar Galactica. Obviously this is great news for Apple, but an even greater news for the rest of us.

While the videos from the iTunes store are quite low-res, they’re also watchable enough even on a TV screen, and the fact that you can download all the episodes of the new BSG whenever you like is simply amazing. Miss an episode? No problem anymore.

This kind of digital distribution is the future. Legacy TV is slowly fading as viewers demand more choice. Apple’s wisely position itself to do for TV what it’s already done for music – which means making it easier to buy a legitimate copy than to pirate one. Let’s face it, given the choice between downloading a spyware-ridden P2P client to get one song and downloading it instantly and legally for $0.99, it’s no contest – it’s much easier to go the legitimate route with iTunes. If Apple can do the same for TV, it’s going to have a major effect on the way people view media.

Plus, it means that brilliant shows like Flrefly, Wonderfalls, Arrested Development and others are no longer dependent on the Nielson system for survival – niche shows that appeal to technologically savvy viewers have a chance to survive and even thrive in a medium that doesn’t keep pushing entertainment to the lowest common denominator. When you take away the artificial scarcity of a network schedule, you gain a significant amount of creative freedom.

Hopefully the iTunes Video Store will continue to push the boundaries of digital content, expanding to offer higher-quality videos, feature-length content, and more.

Stateful Links and Standards

Over at the Signal vs. Noise blog there’s an interesting piece on implementing stateful links in web applications. The problem with their approach is that it requires you to add custom attributes which either break the validity of your XHTML or require a custom DTD. Writing a custom DTD adds work, and breaking standards is not something that a professional web designer should do unless absolutely necessary.

The idea is good, but what can be done to improve the implementation and preserve standards compliance?

Here’s the code to the link with the custom attributes:

<a href="#" id="editLink" onclick="toggleEdit()"
     activetext="I'm done editing" activeclass="activelink">Edit</a>

The first thing that jumps out is that this block of code has an ID attribute – in this case an ID of “editLink”. Using an ID rather than a class indicates that there is only one of these items on a page – you can’t have multiple elements with the same ID attribute. Therefore, we can use the DOM to access this element very easily:

editLinkElement = document.getElementById("editLink");

So now we have a DOM representation of that element. Instead of explicitly adding the non-standard attributes in our XHTML, we can use the DOM to add those custom attributes manually. Here’s an example of the code required to do this.

function addEditLinkAttrs() {
   editLinkElement = document.getElementById("editLink");
   newActiveTextAttr =
      editLinkElement.setAttribute("activetext", "I'm done editing");
   newActiveClassAttr =
      editLinkElement.setAttribute("activeclass", "activelink");

There’s a few extra line breaks so the code sample will fit on the page, but that should give you a general idea of how to do this.

We can do the same with multiple elements based on a class rather than an ID as well.

Plus, while we’re at it, adding onclick handlers in XHTML mixes content and behavior. We’ve already established that XHTML serves as our content layer and CSS as our presentation layer – however, we shouldn’t mix content and behavior any more than we should mix content and presentation. Event handlers can just as well be added into our JavaScript behavior layer as well. All we’d need to do is add another line to our script:

function addEditLinkAttrs() {
   editLinkElement = document.getElementById("editLink");
   newActiveTextAttr =
      editLinkElement.setAttribute("activetext", "I'm done editing");
   newActiveClassAttr =
      editLinkElement.setAttribute("activeclass", "activelink");
   newOnClickAttr =
      editLinkElement.setAttribute("onclick", "toggleEdit()");

And now our XHTML no longer has any custom attributes, and our content, presentation, and behaviors are on completely different layers. Plus, we haven’t sacrificed standards compliance, and writing a few lines of JavaScript is easier than writing a custom DTD and deploying it across a site or application.

One of the more disturbing trends about the “Web 2.0” hype is that we risk letting standards fall by the wayside just as the web hype of the decade saw the proliferation of junk markup and invalid code. Yes, if you’re deploying an application on an Intranet, who cares about some extra attributes? But at the same time, part of the new professionalism in web design is making sure that we abide by standards whenever possible.


All those VCs with money to burn can now play Web 2.0 bingo while hearing all those pitches. It’s amazing how fast memes rise and fall in the Internet age – this summer the terms “Web 2.0” and “AJAX” were barely a blip on the radar – now they’re the buzzwords du jour.

Now if you’ll excuse me, I have to work on a project with big fonts, the yellow fade technique, and a bunch of blue gradients underneath a logo in a friendly sans-serif font…

(Via PhotoMatt)

Keeping It Simple

Matt, the creator of WordPress, has an interesting post on “hidden options” in WordPress. Software is a kind of a balancing act, with simplicity and functionality in tension with each other. Good software finds the right balance between the two. Bad software tends to be software that focuses almost solely on functionality over usability.

For instance, take Microsoft Office. Office is the poster child for elevating functionality over usability. Every release has features piled upon features in an effort to coerce people into upgrading to the latest and greatest version and keeping Microsoft’s cash cow flush with dough. The problem with this is that Office is a nightmare in terms of usability. All those features add up into a system that’s bloated and difficult to learn. Most of the features – like the infamous “Clippy” – just tend to get in the way.

Good software takes into account the 80-20 rule. 20% of the features in Office are sufficient 80% of the time. The rest just tend to get in the way. Microsoft’s essential problem with Office is that they have to keep that revenue chugging, which means adding more features and slapping on the complexity.

Here’s where open source really matters – what if Office were little more than a very simple and open architecture with a well-documented plugin API? You’d have an office suite with the most commonly-used features that can do 80% of the work, and as you need a feature, you can activate it as a plugin. Moreover, you’d have an application that gets out of your way. If all you want to do is write a few letters every once in a while, you don’t need version tracking, fancy formatting, or a bunch of bells and whistles. If you’re a business user, you want version tracking, fancy formatting, pivot tables, complex formulas, and the like. The problem with a system like Office is that it’s trying to do both simultaneously, which never works well.

For that matter, being open doesn’t necessarily mean that you’re free of that problem. Open Office.org followed Microsoft Office’s lead and ended up being a relatively bloated and slow system – yes, it’s free and it’s functional, but it eats memory like a hog and it’s got the same issues with usability that it’s commercial competitor does. Open Office.org’s relative lack of simplicity is a problem that keeps it from really shining.

However, WordPress gets it right. WordPress is simple enough that it’s quite easy to get up and running. But for those desiring all the features in the world, it has a plugin architecture that makes it quite simple to extend the functionality of the system in any number of ways. Again, 80% of users need only 20% of the functionality of WordPress – posting entries, editing them, and managing comments. WordPress tends not to get in the way when you want to do something simple. The fact that Matt is actively paring things down is a good sign.

Simplicity works, especially when you combine a simple core with the ability to extend that core in different directions. WordPress generally gets that balance right, which is why it’s taken the blogging world by storm. However, that means more demands for features and the risk of having feature-itis overwhelm the simplicity of the system. Thankfully, it looks like WordPress development is heading in the right direction and future versions of WordPress will keep the speed and simplicity that makes it the best blogging package out there.