I haven’t done one of these in a while. I don’t even know if it’s any good or not. 😉
Parsing Arbitrary XML Namespaces in Ruby with Hpricot
(This post inspired by a Ruby.MN conversation)
I’ve burned through at least 3 different XML parsing libraries in building Cullect. I started the built-in REXML (pro: built-in, con: heavy and slow) then moved to FeedTools (pro: easily parses the most common feed formats, con: no longer in active development). I have a lot of love for FeedTools, but in the end, it didn’t want to parse XML it didn’t already know about. Then, after a series of far less memorable libraries, I found _why‘s Hpricot (pro: written by _why, con: written by _why).
Hpricot is fast, lean, and doesn’t care about expected tags, namespaces, valid XML, it just makes it easy to get the data and attributes out of the XML.
Here’s an example of how I’m grabbing a feed item’s permalink using Hpricot
doc = Hpricot.XML(feed_contents)
items = (doc/:item)
items.each do |raw_item|
link = raw_item.%('pheedo:origLink') || raw_item.%('feedburner:origLink') || raw_item.%('link')
end
Notice how Hpricot doesn’t require anything special to grab pheedo namespace links or feedburner namespace links in comparison standard links. Just tell it what the tag is you’re looking for. Fast, easy, scalable.
Reed, You’re Welcome
Lazy Libertarianism
A couple of conversations about Libertarian Paternalism came up on the iTunes this week, centered around Thaler and Sunstein’s book, Nudge: Improving Decisions About Health, Wealth, and Happiness.
The most enjoyable being the EconTalk with Richard Thaler, where Thaler does an amazing job of challenging Roberts. Not there’s enough of that on EconTalk. 😉
I found the Glenn & Helen Show with Sunstein annoyingly preachy. The conversation felt like a bad episode of The View, more interested in arguing at the surface rather than finding common ground by going in-depth.
In both, the primary challenges against Libertarian Paternalism seemed to be:
Because governments offering services vs. private firms competing in the market is an either/or proposition, governments shouldn’t be offering services, let alone deciding things for it’s citizen.
In addition to not represent reality (keep reading), this perspective just encourages bad, inefficient government. Since government exists, shouldn’t we make it the most effective, efficient, institution for providing the services it provides thereby requiring fewer resources?1
I jotted down my frustration with this perspective over at Twitter:
Privately, I received an email asking me to consider if the reverse was also true (“private firms as one of many vendors in any given govt market”)
In fact, I agree with both statements. I’m not sure what makes govt so special that they get a monopoly in some sectors and not in others – same with any private firm. If a private firm brings a competitive service to govt-dominated market – awesome. I’m also not sure why govt can’t enter some markets and not others – ‘we’ rarely tell private firms (Wal-Mart, GE, come to mind immediately) which markets they can’t enter. Feels the same.
My instincts tell me that govt should focus on the infrastructures to support; commerce, trade, security, and encourage highly-speculative new ventures that build markets (space, internet, highways, biofuels, etc). From that perspective, it’s less about what ‘business’ is and more about what belongs in the infrastructure. I’m thinking of Minneapolis’ city-wide-wifi. It was decided that internet should be part of the city’s infrastructure, and they brought a fair offering to market. It’s not the only offering, nor should it be. It’s an option and more options are better than fewer. Nor are they requiring people to sign-up for their offering, that would be anti-competitive.
To the private firms in govt markets statement, the first example that comes to mind is mail. US Postal Service is one vendor that delivers messages, FedEx, UPS, DHL are private options. Each with their own costs and benefits. And this leaves out other ways to deliver messages – email, fax, telephone, bike courier. None of which are govt offerings.
1. Mental exercise: What if taxes were the most effective way to outsource?
Elsewhere:
UPDATE 11 June 2008:
This perspective is why I’m all for public mass transit, national passenger rail, ubiquitous high-speed internet service, and state-level (or federal) universal health care.
RE: How Do People Find The Time To Watch Television?
A nice reminder on what is actually active and social:
…And They Asked 4 Followers, And They Asked 4 Followers
Something I wrote on Twitter a couple weeks ago:
Today, Four Reasons Why Twitter is the Next Google writes:
“Not only has Twitter inadvertently taken crowdsourcing to search, it has actually taken it a step further into friendsourcing. In fact, it has created the first personalized and trusted search engine in the world.” – Mr. List
The interesting bit is that Twitter doesn’t even offer ‘search’. Search engines like Summize (how I tracked down my above tweet) et. al, are building search atop Twitters API.
Steve Gillmor was absolutely right to cut off Dan Farber. Pasting text ads (a la Google) onto Twitter is boring. That’s why we haven’t seen it. And won’t.
As more vendors like H&R Block, Joyent, and even Comcast start to invest themselves in Twitter, we get much much closer to a VRM world. A world where both customers and vendors are smart people speaking intelligently to each other.
Garrick’s SXSW 2008 Showcasing Artists Picks
Not only are these picks really late (SXSW was months ago) but unlike other years, none of the 700+ tracks grabbed me immediately. The overall tone felt like the ‘college rock’ of 20 years ago. Good, sometimes interesting, artistic even, but every song sounds um, the same.
As in previous years, these are track that are both new to me, struck me, and will keep me in the zone while working. This time around, inspired by J Wynia approach last year, I set up a smart playlist in iTunes that automatically removed tracks after 5 skips. The theory is that this would bias more long term listening enjoyment, rather than short term first impressions – a reverse Pepsi Challenge. I blame this approach and how iTunes counts ‘skips’1 as part of the reason this list took forever to compile.
- Obvious by Watershed
I haven’t heard this mixture of poppy, light-hearted post-punk and “I’d rather be at the bar with you than on stage” since Too Much Joy’s “Gods Make Love” or Ben Folds’ “One Down”. - Toes by Zac Brown Band
Yes, it’s a blatant rip off of Jimmy Buffet’s “Five O’Clock Somewhere” with the working class country vibe turned to 11. The last couple lines make the song. - Come On, Claire by Aberfeldy
The kid in Fountains of Wayne’s Stacy’s Mom is now in college… - Juliet by Army of Freshman
…but he’s still hanging out at the mall. - Set the Table by Screaming Cyn Cyn and The Pons
Screaming atop a very catchy, if simplistic riff. Makes Madison a much cooler town. This will either annoy you or get you dancing. Continues to do both for me. - Everybody Knows by The Gougers
Catchy little Country tune in the vein of Joni Mitchell’s Big Yellow Taxi. - The Mountain by Lucero
I’m a Lucero junky. - So Long to the Red River Valley by The Quebe Sisters Band
Every now and again, I’m in the mood for the Western in Country & Western. This is such a great example of modernizing that sound. Reminds me of listening to The Lone Ranger and old radio dramas. - Mean Son of a Gun by Kitty, Daisy and Lewis
The theme song to a old time radio drama about Calamity Jane - Everyone’s Got’em by White Ghost Shivers
The jazz tune playing in a secret speakeasy right before the cops busted in. - Cooler than Me by Ari Shine
A much hipper version of Billy Joe’s ‘Uptown Girl’ - I Wanna Be Ignored by Ezra Furman & The Harpoons
Bouncy, bouncy, bouncy. - Electric Bird by Sia
This song is a picnic blanket in sun-filled valley. - How Lucky We Are by Meiko
Such an optimistic song about the day after tomorrow and the person you’ve committed to join you there. - Fascination by Correatown
The break up side of ‘How Lucky We Are’ - See and Be Seen by The Hard Lessons
This is Facebook and MySpace…put to a beat far less than annoying than either. - All My Love for You by The Emeralds
Another great track from a typical American 3-piece garage rock band. But from a garage in Yokohama, Japan. - Fireflies by Search/Rescue
This is the lead track from John Hughes’ next teen romantic comedy. - Clandestine by Brooklyn
Early Beatles with a French attitude. - Shut Up by Shellshag
This is closest I’ll get to hardcore punk these days, there’s no way I can take these guys seriously. I imagine this is what it was like to deal with me as an angst-ridden teen. - Champagne Girls I have known by Johnny Foreigner
Yelpy, like Tullycraft with undertones of Oasis - Only Fooling Myself by Kate Voegele
Inclusion of this song betrays that I still enjoy listening to Wilson Philips’ ‘Hold On’. - You, Me, and the Bourgeoisie by The Submarines
This reminds me a lot of Redd Kross, if it was fronted by Aimee Mann - 1906 by Songs for Moms
An all-woman, 3-piece, folk-punk. Had me at folk-punk. - Balboa by Cruiserweight
I’m a sucker for Stella Maxwell’s voice. - Oh Man! by Sybris
and for whomever’s voice this is. - So Down by Jen Lane
Jen’s a Canadian signer-songwriter. That’s a magic combination. - Half My Kingdon by Alina Simone
A Ukranian April March. Except she’s really Ukranian. - Blinkandyou’llmissit! by Bo Pepper
Highly dance-able smack-down dropped by some distorted female vocals. - Smoking Gun by The Tennessee Boltsmokers
A finger-picking discussion on the dangers of following fashion trends. - 4th of July by Stephen Kellogg & The Sixers
A stereotypical Country song about loss, patriotism, and vans. Includes the great line, “Ever think maybe if you’re not happy it’s because of you.” - Blue Canoe by Blue Mountain
I’ve never heard a song about going fishing in a canoe. You have? With a distorted guitar? - Secretary’s Day by TAB the band
A great example of the blues-based, guitar-driven rock I remember as a kid. - Stand Up by Thurogood Wordsmith
I’m very critical about hip hop rhymes. This one made the list with: “I came to clean house, kick ass, and take names / Like white Anglo-Saxons across the Great Plains.” - Do It Again by You, Me, and Everyone We Know
If Ben Folds was backed by Blink182 - Tu Boca Lo Quita by Alex Cuba
A rocking mash-up of electric guitar, ska, steel drums, and an amazing voice. - No Matter How Bad It Gets by The Barker Band
A poppy little tune for eating buckets of shellfish. - Hello Friend by Cheveu
Guitars and distorted vocals. Over before reaching a climax. Like a cheap midway ride. - Inmovil (Wrong ID) by Le Baron
A solid early-90s rock track from a typical 4-piece American indie rock band. But from Mexico. - International Flight by Le Concorde
The theme song to a fantastic new sitcom about an American girl falling in love with a London record store owner. - Nono by Ze Dos Frangos
I keep expecting this to be that sappy, overexposed Moldy Peaches track. It’s not. It’s Portuguese. Just that makes it better. - Exodus Honey by Honeycut
A softer, mellower Strawberry Fields. - Mina do condominio by Pierre Aderne
For those days when your life is a walk on the beach. - Negative Thinking by TheDeathSet
Vocals of a cheap punk band and a crisp, jumpy, electronica beat. - Namida Vacuum Sound by Ketchup Mania
Love song by a very, very angry Manga character. - Morningside Heights by The Strugglers
Dirt roads, melancholy, and violins - American Hearts by A. A. Bondy
As honest and patriotic as any Dylan, but intelligible. - Nickels and Dimes by Scissors for Lefty
“Hey, hey, nickels and dimes are all we need to rock tonight.” Yeah!, that lines earns automatic inclusion. - Let’s Get Crazy by Limbeck
Finally, a song with clapping. Just not enough songs with clapping in them this year. - Dirty Blonde by Greta Gaines
One of those tracks that feels like college rock from the late ’80s. - Julia, we don’t live in the 60s by The Indelicates
Here’s another. - EXTINCTION by The Muslims
Here’s a punky third.
1. Play duration longer than 2 seconds but shorter than 20 seconds. Personally, I found it can take a solid minute to find a song distracting.
Covering MN Startups at Minnov8.com
On the off chance you can’t get enough of my writing, pop over to Minnov8.com where I have write ups on a Minnesota-based start-up (Tumblon.com) and up-start (DJEdna).
If you tire of me more quickly, perhaps you’ll enjoy Phil Wilson’s peek into the new media projects at Minnesota Public Radio.
Fermenting Alpha: Bavarian Hefe Weizen
This weekend, I invited Christopher, the Master in Fermentation Sciences, over to walk me through brewing up a batch of Bavarian Hefe Weizen from Northern Brewer. While I’m sure the extract kit didn’t take full advantage of his expertise, we had an excellent time and I picked up a few tips1 and got a better understanding of the chemistry behind the instruction sheet.
Here’s some shots of the initial fermentation:
1. Question: How much of the kitchen I can expect the wort to cover if it boils over?
Answer: All of it.
Update July 18 2008.
I haven’t written about this batch. It wasn’t anywhere near what I expected in a Hefe Weizen. It was full with just a hint of the banana-y flavor I expected. I would have preferred the other way around. Unless you knew it was supposed to be a Hefe Weizen, you’d would have been able to identify it. Not good. Glad there’s only a few bottles left.
Thinking About iPhone Web Apps for the Enterprise
Apple’s initial iPhone application model (build a decent website) is brilliant. Websites are easily the fastest, most compatible, most maintainable, most popular, way to create software applications. Once Apple supported adding specific website’s to the icons on the iPhone’s home screen, you’ve got the equivalent of applications on the Palm Treo – with internet access required, sure.
Doesn’t (or shouldn’t) this model cover 97% of all software?
The alternative is learning Objective-C, the development language in OS X and the amazingly popular GNUStep. Um. While not exactly wide reaching, this should increase the demand for ObjC developers.
For the commitment to ObjC, what to you get?
Some deeper ties into the iPhone’s hardware capabilities and iTunes as only distribution method.
In a client meeting earlier this week the team mentioned how the project needed to be available on mobile devices for internal use.
This brought to mind the Symbol barcode scanner running Palm’s OS and the handheld devices package delivery people at UPS and FedEx use.
Could they be replaced with an iPhone?
Maybe.
“Most road warriors could use Web-based tools with little loss in productivity.” – Phil Windley
Scanning an object’s barcode and manipulating data about it by multi-touch is a very compelling vision – whether on sales floor or in the warehouse.
On the flip side, I have a hard time imaging signing for a package on an iPhone…or enterprises IT departments agreeing to push out updates to a iPhone-native app via iTunes.