pmuellr is Patrick Mueller

other pmuellr thangs: home page, twitter, flickr, github

Friday, March 23, 2007


Yesterday, Joyent and Magnetk introduced a new 'product' (or is it a 'platform'?) called Slingshot. From the Joyent blog: "Joyent Slingshot allows developers to deploy Rails applications that work the same online and offline (with synchronization) and with drag into and out of the application just like a standard desktop application."

This is pretty cool. The story is: develop your Rails application like normal, add some special processing to handle sync'ing data between an off-line and on-line mode, and you can run your app in a local browser. Well, not quite a local browser. It's actually an application 'shell' which has an HTML widget as it's client area. But it can do more than your average browser; it has additional desktop-y capabilities available to it, like drag-n-drop, native file-system integration, etc.

That last bit: 'more than the average browser', is what I really like. It's actually more, and less. Watch the movie on the Joyent site. Where are the address bar, and Home, Back, and Forward buttons? Banished. As they should be. At least for 'apps'. They're great for hypertext.

I suppose there will be the eventual question about security. I'm guessing this is a fairly safe environment, since the opportunity to run someone else's code is very constrainable. Don't add links to someone else's pages in your app. Constrained, for security, but a loss of function as well. Probably a reasonable trade-off.

As other folks have noted, this seems to compete with Apollo. Excellent. Competition.

Can't wait to see more technical details. Dare we hope for some 'open-ness'?

Lastly, I kind of wonder how far you could take Eclipse (or even just SWT) to build something like this; use the HTML widget and see how far you can extend/integrate it into an application. If I wasn't tied up in server-y goop right now, I'd be poking around there. And what ever happened to XULRunner (last update: 10-Jun-2006)?

Wake County Library Lookup

In my previous post regarding using libraries, I mentioned using Josh Staiger's Wake County Library Lookup Greasemonkey script, which annotates pages with links to the library, if the library has the book in it's collection.

What I neglected to mention is that I have been having problems with the script for the past few weeks. One problem was that a number of Amazon pages no longer contained the library links at all; I think this is due to Amazon's new URL scheme. The ISBN was being pulled from the URL, and it's not always there anymore, or in a different place. The search for the ISBN has been expanded so that now more books will be candidates for library lookup.

The other problem was that the page layout of the Amazon pages changed, such that the links Josh was adding were no longer appearing. Dark XPath and DOM hackery. ~shiver~ I fixed that by not placing the library information in-line with the page the way Josh was doing, but placing it at the top of the page. A bit icky, but it's pretty much guaranteed that the links will show up now; the script is not currently dependent on the shape of the HTML on the page.

I talked to Josh about the issues earlier this week, and he mentioned he hasn't been keeping a close eye on the script, because he doesn't actually live in Wake County anymore. Although he has been making some updates, as recent as this January. What a trooper!

So it only makes sense at this point to fork and maintain a new version of the code, since Josh really doesn't have a reason to do this anymore. My version of the script is here. It's highly likely that I won't be updating it, till Amazon or Wake County make enough changes to their pages to break the script again. Which is pretty much guaranteed. The perils of screen scraping. But I'm certainly open for any thoughts on the functionality.

Thanks for putting the time into this Josh!



So, I'm not totally convinced on the Twitter thing yet, but I'm an information junkie, so how can I resist?

Twitter will feed you messages via SMS, IM, or you can go to the website. However, I don't do SMS, the IM has been broken since I started playing with Twitter, and the web site is a web site. I don't really 'check' web sites anymore.

So, I was thinking on the drive home from work that I should hook Twitter up with Growl. In fact, I figured someone must have already done this. And they have. The first couple I looked at on google were Ruby, and didn't seem fully operational, so I thought I'd write one. And here it is. It's rough; you'll have to install a Python library, and install wget. You can do it.

Took a total of 1.5 hours; my Python is a bit rusty; had to consult the manual constantly. But there's something just fun about writing Python; I should do more.

Tivo'd baseball?

Monday, March 19, 2007

Free Books!

Like Bill, I've had a problem accumulating books, but I've been much better about this for the last few years. I was using Safari Books Online for a while, but didn't really use it enough to justify the $120/year or whatever it was. It appears the price has gone up to $20/month, which is double what I think I used to pay; definitely can't justify that.

A handy little Greasemonkey script from my new next-door cube-mate, Josh Staiger, Wake County Library Lookup, opened my eyes up to a free resource: my local public library. (Thank you Ben Franklin!) If you don't happen to live in Wake County, North Carolina, perhaps you can find a Greasemonkey for your library, here.

I've been a life-long library user, so it's not like my eyes were just opened up to the possiblity of free books, but most libraries don't have a great selection of tech books, or at least recently available tech books. There are options; you're a tax-payer (probably), so why not ask your library to buy a book you want. For Wake County Public Libraries, head over to the Adult Services section at the library, and ask the librarian about this. They'll give you a card to fill out; ours wants to know, along with the usual stuff, the publisher, publication date, and ISBN. Stuff you can get from Amazon.

In lieu of ordering the book, at Wake County you can make a request for an InterLibrary Loan, where the library will attempt to get the book from a different library system. You can do this from your comfy chair at home, via the web. Our library is great; I request books from their (fairly yucky) web interface, they email me when the book is ready to be picked up. Head over to the library, walk over to 'my' shelf and find the labelled book, and checkout.

I just checked out Pragmatic Project Automation: How to Build, Deploy, and Monitor Java Apps, from my library this afternoon. It happened to be the only book, besides the GTD book, on Bill de hÓra's Ten books for the working programmer, which my library had available. I put in an InterLibrary Loan request for another one.

BTW, I just created an Amazon list for Bill's top ten list, plus some of the other books mentioned in the comments.

Of course, sometimes you need to own the book. But many times, you don't. You just need to read it. Or you might want to preview it, before actually purchasing it. A more extended preview than you can get from a visit to your local bookseller.