I Don’t Care About Developers. I Care About Users.

Okay, okay… I’m guilty. The title is provocative and slightly misleading. I do care about developers. Developers are my people and I want nothing but the best for them.

That said, when I’m sitting down planning a site, application or component, my first thought isn’t about making things easier for developers. It’s about making things easier for users. If I can do both, great. The world is just that much nearer to perfection. If not, whenever possible I’m going to err on the side the user by trying to make the site they see better/stronger/faster.

(well, maybe not stronger…)

That’s why I cringe when people enthuse about how easy something was to implement.

“That was great. I just had to write two lines of JavaScript and I’ve this cool Ajax component.”

Continue reading “I Don’t Care About Developers. I Care About Users.”

getElementsByTagNameNS. Now I Know. And Knowing is Half the Battle.

Yesterday I was wondering why obj.getElementsByTagName wasn’t working in Safari/WebKit on a tag with a namespace prefix. I wondered, aloud, whether or not it was just something I was ignorant of.

It turns out that was the case. Dom Level 2 added new namespace specific methods to search through documents or document fragments for tags of a specific NameSpace. I’d just never had to use them before. Learning that greatly simplified the hacky code I wrote yesterday. Here it is, new and improved:
Continue reading “getElementsByTagNameNS. Now I Know. And Knowing is Half the Battle.”

Of Interest- the Google Chrome Operating System

Between Palm letting me code directly on a killer handheld device, HTML5 starting to show up in real browsers and now Google saying things like the following [my emphasis], it’s a damn fine time to be coding on the front end:

Google Chrome OS will run on both x86 as well as ARM chips and we are working with multiple OEMs to bring a number of netbooks to market next year. The software architecture is simple โ€” Google Chrome running within a new windowing system on top of a Linux kernel. For application developers, the web is the platform. All web-based applications will automatically work and new applications can be written using your favorite web technologies. And of course, these apps will run not only on Google Chrome OS, but on any standards-based browser on Windows, Mac and Linux thereby giving developers the largest user base of any platform.

This is also interesting for me personally, as I’m a big fan of my Dell Mini 9 Inspiron and I’d be tempted to dual boot it- just to double my geeky pleasure.

getElementsByTagName Namespace Prefix Strangeness in Safari/Chrome/WebKit

Is It Me or the Browser?

I had a Safari bug on a project I’m rushing to get out the door. We’re using a Flickr feed to populate a div with link+thumbnail to some flickr images. In Firefox/Internet Explorer I simply did the following to build the links:

flickr : function(obj) {
//get the full list of items var items = obj.getElementsByTagName("item");
//make sure it's not empty if (items.length > 0 ) {
//start the HTML block var blob = "<div id='flickrFeed'>";
//loop through the items (we only want 5) and build some links) for (var i = 0; i< 5 ; i++) {
//get the link var flink = items[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
//get the thumbnail var flurl = items[i].getElementsByTagName("media:thumbnail")[0].getAttribute("url");
//smash them into the string blob+="<a href='"+flink+"'><img height='75' width='75' src='"+flurl+"' /></a>";
};
//close the div blob+="</div>";
//pop it onto the shelf, for later use $("hyperspace").innerHTML+=blob;
} else {
//if there's somethign wrong with the feed, go to default contentk social.fallBack.flickr();
}
}

Continue reading “getElementsByTagName Namespace Prefix Strangeness in Safari/Chrome/WebKit”

Recent Reading (HTML5, CSS Fonts, JavaScript, rel=nofollow, Google Analytics)

  1. New elements in HTML 5

    An older (2007) article, but still pretty interesting. I’ve been slowing working my way through some HTML5 stuff. This was part of that effort. If, like me, you’re fascinated by where the web is going*, you should definitely check the article out.

  2. Event Tracking Guide

    With event tracking open to everyone we’ve been going nuts with them at work. I’ve also been going nuts with them at home.

    I’m basically smothered in event tracking.

    I’m glad to have it. It saves me from doing non-standard stuff (faking page views) and it saves our analytics analyst the time of having to filter out fake page views from the data.

    Yay Google.

  3. Whiteboard Friday – How Do We Plug the Nofollow Leak?

    This isn’t a read, it’s a video ๐Ÿ™‚ But, if you’ve got any interest in SEO, then this discussion of the recent change in the way Google treats rel=nofollow and the way PageRank flows is a must-view.

    SEOmoz Whiteboard Friday – How Do We Plug the Nofollow Leak? from Scott Willoughby on Vimeo.

  4. 8 fonts you probably donโ€™t use in css, but should

    While I’ve been messing with “real” fonts on the web using Cufon, it’s still a hell of a lot easier to just use old school fonts. The referenced article does a great job of pointing out some neglected fonts that might come in handy on a project.

  5. Event delegation in JavaScript

    Attaching an event handler to the document and then delegating based on the target has been on my mind a lot recently. I like the idea and it’s actually come up in two code reviews this week as an alternative to traditional event handling.

    Serendipitous then, that Nicholas Zakas decided to write it up so that I have something fresh to point to when I reference the technique.

*I’m also fascinated by where the web is and where the web has been, so I’m not really picky on those fronts.