Archive for August 2007
On a Roll
I posted another Greasemonkey script last night. [This one](http://davidsidlinger.com/svn/greasemonkey/amazon.com/searchgoogleproducts.user.js) puts a link to search [Google Products](http://google.com/products) on Amazon pages, based on the name of the item you’re viewing. It’s more complicated than the last one, but it didn’t take too much time to throw together. I realize that I’m pretty late to the Greasemonkey party, but I’m having _fun_, and isn’t that the point?
One thing that bugged the hell out of me when working on this script is that it seems like Amazon adds absolutely no semantic meaning to their product pages. Does the product name sit in an element with an ID clearly labeling it as such? No. Here’s the XPath I had to use to extract the name:
//div[@class='buying']/b[@class='sans']
Isn’t that cheesy? It feels really fragile. I suppose I could have parsed the page title to strip out extraneous information, but I wouldn’t feel much better.
__Update:__
Surprise, surprise! It _is_ fragile. The different templates that Amazon uses based on product category (I think?) break the script. Oh, well, at least it doesn’t fail spectacularly.
Known good:
* Books
* Music
* Electronics
Known bad:
* DVD
Created a Greasemonkey Repository
I’ve created a [Subversion repository](http://davidsidlinger.com/svn/greasemonkey/) to hold any [Greasemonkey](http://greasemonkey.mozdev.org) scripts I might come up with. The [first one](http://davidsidlinger.com/svn/greasemonkey/amazon.com/setsearchfocus.user.js) sets the focus to the search box when viewing [Amazon](http://amazon.com) pages. It will save me a bajillion tabs every time I hit the site. Is it worth talking about? Probably not. Am I disproportionately pleased with myself? Yes.
Presented at BarCamp Nashville
I presented at [BarCamp Nashville](http://barcampnashville.com) this afternoon about [Haml and Sass](http://haml.hamptoncatlin.com). I think that it went _OK_ considering I had a root canal yesterday, authored my slides under the influence of painkillers, and there wasn’t a way to connect my MacBook to the projector (I only have the DVI dongle.)
The people subjected to my presentation seemed pretty good natured, and I think some of them were sitting close enough to the stage to see the slides on my display. I really wish I had felt well enough to hang out longer and meet more of the attendees. Hopefully, there’ll be another meet-up soon.
I’ll get my slides posted somewhere soon and provide an update.
__Update:__ I’ve got [my slides](http://www.slideshare.net/davidsidlinger/haml-and-sass-put-your-markup-on-a-diet/) posted to [slideshare](http://www.slideshare.net).
I Really Tried…
This marks the end of my _third_ attempt to use [Safari](http://apple.com/safari) as my default browser. I just can’t seem to tear myself away from [Firefox](http://www.mozilla.com/en-US/firefox/).
The main reason is extensions. Safari doesn’t seem to be nearly as extensible as Firefox or even [Internet Explorer](http://microsoft.com/ie). I can’t find the equivalent to plug-ins that I use on a daily (hourly?) basis like [del.icio.us](http://del.icio.us/help/firefox/extension) and [Firebug](http://www.getfirebug.com/). If I am completely off-base, please let me know.
There are quite a few things I like about Safari. It does seem to be a lot snappier, and, being a Cocoa application, it integrates with OS X and it’s services, like Summarize, tightly. I also get the drawbacks and _slight_ bugginess of Firefox, but I just can’t bring myself to give up all the additional functionality. I really wish Apple would take a long, hard look at the extensibility available in Firefox and realize that it is the main force driving users to ditch Safari.




