Thursday Mid-Work Blips

April 5th, 2007  |  Published in etc

» The Green Teaing of America:

The implicit bargain in buying these products is that green tea will make you not just spiritually complete, but morally superior. This is partly because green tea had the good sense to have the word green as part of its name. It is not entirely clear how drinking tea resists climate change, but it is evident that serene, grounded green tea sippers—unlike those aggressive, overcharged coffee-heads—emit only minuscule quantities of carbon. With “one sip” of Tazo green tea, whose logo is expressed in what looks like ancient runes, “you reincarnate the original spirit of enlightenment that may have inspired the Japanese tea ceremony.” After a second sip, it seems unlikely that you will invade a Middle Eastern country. The canister on my desk says the tea bags it contains embody “a wisdom beyond wisdom, capable of enlightening both mind and body.”

» There’s been a new release of Journler. There are a few Mac notebook/journaling tools out there. They all cost more than I can possibly justify for what amounts to bolting automated date-stamping, a calendar widget and HTML export onto a text editor. At the same time, it’d be kind of nice to have an app that facilitates journaling a hair bit. I’ve worked up my own little system, but, you know … I’d love a good journaling app if it was free. Which Journler is. I still kind of like my system, but Journler’s a very nice app.

» Tonight’s UFC Fight Night Live, the free teaser for Saturday’s pay-per-view event. It’ll be followed up by the season premiere of The Ultimate Fighter, the MMA reality show. If you’ve got cable/dish and if you’ve been at all curious, Spike will carry it, so it’s free. Or at least, it will represent a bit more entertainment from your monthly television subscription investment.

The headline bout tonight is Joe Stevenson Vs. Melvin Guillard. Melvin’s incredible. Fast and powerful in a way that “heavy hands” doesn’t even begin to describe. For a 5’9″ 155-pounder, he’s huge.

Al and I are less excited about UFC 69‘s Georges St. Pierre/Matt Serra bout than we are about Diego Sanchez vs. Josh Koscheck.

I just don’t see Serra’s excellent Brazilian Jiu Jitsu carrying him past St. Pierre’s solid standup and good wrestling. If he wins, I’ll be kind of shocked, and I have my doubts he’d be able to beat either a resurgent Matt Hughes (if, I guess, Hughes actually gets around the the bit about resurging) or several other welterweights who are great in their own ways. On the other hand, if Georges screws up and loses the belt, it would make for an interesting war of succession.

On the other hand, the Sanchez/Koscheck fight looks pretty interesting. Sanchez is strong, Koscheck is a work in progress. They’ve been trash-talking each other on MySpace, which is funny the same way it’d be funny if you found out Dick Cheney favored a Rainbow Bright themes for his stationery.

» Looks like the work blog is approaching launch. I got my back-end login yesterday. Looks mostly like we’re waiting for the developers to connect it to something besides MT’s horiffic default theme.

» I’ve got one piece of wisdom to pass on to budding Applescripters who want to automate Firefox: Just don’t bother. I’d even say the same about Safari if all I had to use was UI scripting, but Safari’s dictionary includes a “do javascript” call, demonstrated here and here, that leverages what Applescript’s best at (for me, anyhow): trading variables between scriptable apps and doing rudimentary flow control. Once you’ve done the bit where Application A has coughed up some data (maybe some transformed text, or a location, or some other nugget), the best way to get Safari to use that output is to do it in Javascript, which provides fine control over every piece of the document.

Compare and contrast with Firefox, where the closest you can get at this point involves writing a GUI script that simulates pressing tab buttons or pressing the “paste” keystroke in elements of a page you have to identify by an eight-or-nine-parent-deep hierarchy that bears no relationship to any other document hierarchy you’ve ever considered.

One mild irony: Firefox’s DOM Inspector is very nice for figuring out how to navigate the document you want to manipulate with “do javascript.” Looking forward to the release of Safari that includes Web Inspector (that doesn’t involve downloading a WebKit nightly). WebKit, however, is pretty easy to deal with unless you have SIMBL installed for something like PithHelmet. Then it just crashes.

Anyhow … with “do javascript,” a horrid macro that involved bunches and bunches of lines of stuff like “press tab 10 times, press the v key with the command key held down, press tab 3 times, press the a key with the command key held down, press the v key with the command key held down” can be rendered down to a few lines of setup, a few lines of simple script, and much less fragility.

Tags: , , ,

Leave a Response

© Michael Hall, licensed under a Creative Commons Attribution-ShareAlike 3.0 United States license.