28
Aug 08

A Little Cluetrain Reminder

I was in a local Target the other day and I saw this improvised product review:

Isn’t it fairly clear that the Cluetrain people have a point? People are going to talk about your products, your company, your reputation. Corporations can’t stop that, and technology further empowers these kinds of exchanges. Corporations should work to foster the conversations and to be a part of them.

24
Aug 08

Squared Euclidean Distance on Hashes in Ruby

For some simple analysis I’m doing, I needed a routine to calculate squared Euclidean distance in Ruby on two hashes. The squared Euclidean distance d2 between two n-dimensional vectors x1 and x2 is:

Formula for squared Euclidean distance

I needed this calculation for values corresponding to the intersection of the set of keys for two hashes. I came up with a couple of ways to do this.

More…

21
Aug 08

Life Imitates Video Games?

As the recent conflict between Russia and Georgia has unfolded, faint but distinct memories of mine were triggered. Russia invades Georgia in 2008? Fighting in Tbilisi? Wait a minute—I know this!

Ghost Recon

(Image: shanewarne_60000)

It’s eerily (well, vaguely) close to the storyline of the original Ghost Recon, even the year.

20
Aug 08

VMware Fusion and Cisco VPN on Mac OS X – Fixing a Hiccup

I’m using a Cisco VPN Client (4.9.01) on Mac OS X Leopard (10.5.4). Yesterday I installed VMware Fusion (1.1.3), and today I noticed that my VPN wasn’t working anymore.

The error:

"Error 51: Unable to communicate with the VPN subsystem.
Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again."

After some rooting around I suspected that Cisco was getting hung up on vmnet1 and vmnet8, VMware’s virtual network interfaces. My troubleshooting process pretty quickly landed on restarting the Cisco kernel extension, which fixed it. There are multiple ways to do this, but here’s the commands I used:

sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN stop
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN start

That cleared up the problem.

Update: Also check out this article at Mac OS X Hints - A fix for ‘Error 51′ with the Cisco VPN Client.

19
Aug 08

Adobe Error Messages

I can identify with the conditions (complexity, time constraints, etc) that would give rise to these errors. But when you step back, it’s quite humorous. From an ideal perspective, messages like these shouldn’t really happen.

15
Aug 08

Animated John Lennon Interview

Great visualizations in this interview conducted by a 14 year old who snuck into John Lennon’s hotel room in 1969.

Via Infosthetics.

14
Aug 08

Ruby code to convert MySQL XML to CSV

This very simple code will take a file saved by

mysql --xml

and convert it to CSV format, with a header. I know there’s a MySQL option to save a file as a CSV or TSV, but I needed this for my situation.

The code uses Hpricot (by Why the Lucky Stiff) for XML parsing.


require 'hpricot'

xml = Hpricot(open(ARGV[0]))

# Header line - first set of attribute values
puts ((xml/'resultset/row').first/'field').map { |e| e.attributes['name'] }.join(', ')

lines = (xml/'resultset/row').map do |r|
(r/'field').map { |f| f.inner_text }.join(', ').strip
end

puts lines.join("\n")

 

I wonder – is there a better, shorter way to do this?

13
Aug 08

iTunes Music (Non-)Availability

Seeing this really annoys me. I thought in the age of the long tail (challenges notwithstanding) we were beyond antique distribution limitations like this.

I know some of it has to do with legal issues. It’s still very disappointing to see.

12
Aug 08

An Error in Metamagical Themas

Douglas Hofstadter’s Metamagical Themas: Questing For The Essence Of Mind And Pattern has been one of my favorite compilations for most of my life. It’s been a mind-expanding read for me on numerous occasions since I was fifteen.

Recently, my girlfriend and I were going reading through one of the word-play submissions by Howard Bergerson and we found an error. This self-documenting sentence does not add up (link):

“In this sentence, the word and occurs twice, the word eight occurs twice, the word four occurs twice, the word fourteen occurs four times, the word in occurs twice, the word seven occurs twice, the word the occurs fourteen times, the word this occurs twice, the word times occurs seven times, the word twice occurs eight times and the word word occurs fourteen times.”

Clearly, the word fourteen doesn’t occur four times, for example.

I couldn’t dig up an errata page for the book, so I’m posting here. Am I wrong?

07
Aug 08

Freebies are Good

My girlfriend and I shop at the Whole Foods headquarters in downtown Austin, usually a couple of times a week. Today we had our goods on the conveyor when my girlfriend ran off. Right after I finished paying, she came back with an açaí sorbet and said she had to try it.

“Then it’s on us,” said the clerk.

“Really?”

“Yeah, they encourage us to give away things.”

“Cool, thanks!”

I know Whole Foods has had some controversies recently regarding CEO John Mackey’s surreptitious forum posting habits, and we’ve had our complaints about the quality of their lemons, but I can’t fault the freebie policy. It’s especially appropriate when customers are paying a premium for boutique foods.

Now if they would only get some castelvetrano olives — California stores have ‘em, so why can’t we?


Copyright © 2010 ANDY PAYNE
Powered by WordPress and Theme Lab