You can imagine where it goes from here…

Macbook Pro wireless woes

I’ve had some intermittent wireless problems with both Macbook Pros, especially with WEP networks. Colleagues with Macbook Pros have had the same problems from time to time. I can see networks in my list but when I try to connect to them I just see the generic “An error has occured” message. Really infuriating when everyone else arounds you connects just fine. There’s usually something along the lines of:

Mar 23 19:30:57 xxxx /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport: Error: WirelessAssociate2() = 88001006 for network xxxxx. The operation timed out.

in /var/log/system.log

The Apple discussion boards are full of people having very similar problems, it’s really hard to understand why Apple is not stepping up to the plate and fixing these issues once and for all. After numerous Airport updates over the past 9 months we’re still not there. Perhaps the problem lies with Atheros, the manufacturer of the wireless chipset?

Either way, I think I’ve come up with a reasonably consistent way to overcome this problem. Unfortunately you’ll need Windows (yea, really) installed. Boot to windows and make sure you have the latest Atheros drivers installed (6.02.75 at the time of writing, I had 6.01.75) otherwise you will have the exact same problems in Windows as in OSX. With the latest drivers installed Windows should be able to connect to said wireless network without problem. Reboot back to Mac OSX and reconnect with Airport, which should work now. I suspect the wireless firmware or something is left in an unstable state and the Windows drivers knows how to correctly reset this. It’s worked for me on two occasions now where OSX did not want to connect.

UPDATE (2 May 2007): Apple releases Airport updates again: “This update is recommended for all Intel-based Macintosh computers and includes compatibility updates for certain third-party access points configured to use WPA or WPA2 security.”. Hopefully this fixes some of the above problems. Interestingly enough a battery update, that will update each battery when inserted, is included as well. Time to charge my spare battery!

March 25, 2007 Posted by | Tech | 1 Comment

Budget reconciliation … UNIX style

Alright this is as geeky as it gets. Unexpected rain kept us from DNA Lounge tonight so I decided it’s a good time to look at some budget reconciliation after a prior discussion.

Bank of America online banking has a nice download feature that allows you to download a specific range of transactions in various formats. Fortunately one (Microsoft Excel format) is CSV. The description, amount and balance fields are ” delimited but not the date field. A quick one liner got me the results I wanted, most of the time:

grep -i "whole foods" march07.csv | sed -e "s/\"//g" | awk -F','  '{total+=$3;}END{print total}'

This worked great to get the total as along as there is no commas in the description field, which inevitably there were for some lines. Next stop Perl, some very, very rusty Perl at that:


$file = $ARGV[0];
$keyword = $ARGV[1];
print "searching $file for $keyword:\n";
open(FILE, $file);
@lines = ;
$linecount = 0;
$sum = 0;
foreach $line (@lines)
        $line =~ /(\d\d\/\d\d\/\d\d\d\d),\"(.+?)\",\"(.+?)\",\"(.+?)\"/;
        $date = $1;
        $description = $2;
        $amount = $3;
        $total = $4;

        if ($description =~ m/$keyword/i)
                print "$date -> $description -> $amount\n";
                $sum += $amount;

print "sum = $sum\n";

So a typical invocation to see what I’ve spent on food and groceries in a particular month:

./ march07.csv “whole foods|chipotle|satsuma|jitlada|tofu|albertson|trader|safeway|pluto|asqew|longs”

(Almost not a day passes without visiting Whole Foods… got to have that organic food, not great on the budget:)

or gas:

./ march07.csv “chevron|shell”

you get the picture…

March 25, 2007 Posted by | Tech | Leave a comment

Load testing AJAX with JMeter

Testing normal AJAX (using DWR) connections with JMeter is reasonably straight forward. Note that if you are using Spring’s CharacterEncodingFilter and force UTF-8 (since JMeter does not set the character encoding), POST parameters will not be read by the DWR servlet, in this case either disable your filter or use a GET for your AJAX requests and keep the parameter size in check.

Setup a POST to login to your application (or whatever is necessary to establish a session).

GET dwr/engine.js, parse the response and bind the HTTP Session ID and scriptSessionId to JMeter variables:

jmeter login

jmeter get httpsession id

setup script session id

And now to make an actual AJAX request:

make ajax call

To inspect your existing AJAX calls I recommend using a proxy such as Charles, Firebug doesn’t show you (or at least me:) the request parameters. Parameters to note are:


where the click happened


DWR seems fairly unbothered by this but I click through a sequence of events, setup my test plan to match that sequence and then use those batchIds (Charles’s sequence view is very useful for this)


Be sure to pass the required parameters.

Coming in Pt II … how to load test reverse AJAX connections. Watch this space.

March 13, 2007 Posted by | Tech | 2 Comments