FireBug tab opening delay redux

Ben, having read my last post about FireBug, notes that you only get the delay opening a new tab if you have FireBug disabled. if it's disabled it checks a whitelist to see if it should be enabled in the new tab... should be a simple fix.

Hopefully this will be fixed soon. In the meantime, however, FireBug seems to incur no performance hit if you keep it enabled, somewhat paradoxically.

Testing Google Analytics

Google Analytics is a great tool for tracking users on your site, and it's incredibly easy to set up the basic features. You just bung a bit of JavaScript on every page in your site which, if your site is sensibly designed, should only mean editing one file. You then get access to a plethora of amazing data about what your users are doing.

The more advanced features, particularly tracking ecommerce transactions, are a lot harder to implement and test other than on the live site. The help is somewhat minimal and hidden on a different page, without being stated quite explicitly, is the fact that it will drop any transactions coming from a domain other than the one the account lives in.

If it's not a subdomain of the main domain, you have to do some JavaScript link shenanigans to get GA to recognise it. This wouldn't be an uncommon problem for people using third-party shopping carts, and the solution there is quite well described.

What's less well described is how the hell you can test this thing. For example, our test server sites inside the domain of our parent company, which bears no resemblance to our live domain. Fortunately, we'd already configured our test web servers to respond to the live domain when we were testing for going live.

So what you do is edit the c:\WINDOWS\system32\drivers\etc\hosts file in Windows XP, or /etc/hosts in Unix-like systems. Put in a line like this:
192.168.1.1 www.mycompany.com.au

This overrides the name server lookup for "www.mycompany.com.au" to "192.168.1.1" and, providing the web server at that IP address has been configured to serve for that domain, you'll see your test site as if it's live and, crucially, that's what the cookie management and JavaScript in your browser will think too.

You might be behind a firewall that requires use of a proxy. Hopefully you can get to your test web server directly, otherwise you're kinda screwed. You can just turn off proxy use for the domains you're testing, leaving it in place for everything else. This is crucial since you still need to be able to get to the Google Analytics server to send the data.

Another wrinkle might be if you're using the GA IP filtering to filter out users from your own network. We do this to reduce the false data from our own staff on the site, but that means it's hard to test things. For this purpose I use a FoxyProxy rule to push hits to the analytics system via an ssh tunnel that pushes the data through my own proxy server sitting in the US. That way the data comes from a different IP range than the ones that are filtered out.

As you can see, there's quite a bit to think about when trying to test this stuff. It's all exacerbated by the fact that processing of the data occurs overnight, rather than anything close to real time. It means every time you make a change, you have to wait until the next day to see if it worked. Then when it didn't, you've got no feedback as to why, so you try again and wait another day.

Over the Xmas break, if I get the time and energy, I'm thinking of making a dropin test replacement to the Google Analytics JavaScript code. This would give you a real-time view of the data hitting the analytics server, with helpful hints on diagnosing why it's not working. We'll see if I get the time.

The other Firefox extension that I've found invaluable for testing has been Live HTTP Headers, for watching what's going to the remote servers. This handy tool is useful and quick for doing the URL decoding so it's more readable.

Firefox extensions

So last week I promised Stig, a Norwegian living in London, that I'd get off the political blogging this week. Haven't achieved that yet, so here's a start.

I use the Firefox browser constantly and one of the reasons is that you can install useful extensions that add functionality. Some of these are incredibly valuable to me, helping enormously with my work. Some are just a nice convenience. Here's the extensions I use. What ones do you use?

Adblock Plus and Adblock Filterset.G Updater
Advertising never really bothered me until the day some bright spark at Hotwired discovered the animated GIF. Ever since, I've filtered them out. I just can't stand having some annoying, flashing animation beside something I'm trying to read. I don't filter out static ads like Google, as they're often quite relevant. Just the annoying ones. I used to use Craig's Squid filtering system but doing it in the client, particularly when Filterset.G automatically gets most of them, makes more sense. What's more, I can turn it off if there's a false positive.

Web Developer
I use this nearly every day for my work. It's just invaluable if you're developing web stuff. There's more features than you can imagine, but the ones I use most are:

  • Edit CSS: edit the stylesheets live, see the result immediately
  • View Generated Source: shows the HTML after any scripts have run.
  • Display Element Information: shows all kinds of details about any object you point at.
  • Display Div Order: outlines all the divs on the page, so you can see what they look like.

Net Usage Item
Australia has bandwidth charging, so most ISP plans have a quota of downloads. This extension downloads your usage for the current month and displays a handy graph.

Forecastfox
Shows the weather. Handy, and does what you'd expect.

Live HTTP Headers
Shows you all the traffic going on between the server and the browser, which is absolutely essential when doing some web work.

FoxyProxy
A really cool proxy server manager. Sometimes you need to have your browser session come from a different location, so you can set up a rule for which requests go through which proxy. When diagnosing problems (like our lousy MS ISA proxy servers at work) it's really handy to be able to push all content through a particular proxy. You could also use this to get around filtering proxies, but that would be naughty and possibly career-limiting.

Sydney Dams Item
We Sydney people are obsessed with the amount of water in our dams. Comes from living in a dry country. Doesn't help that we get plenty of rain in the city, but not a lot where the dams actually are. This extension shows the latest data.

Economic conservative

So apparently when the economy was tanking and interest rates were high, Brendan Nelson took out another mortgage and ran his business on credit. I bet he wasn't paying his employees' super or keeping money in the bank for their entitlements like holiday and long service leave either.

Just the man to be hoping to one day run the country.

Un-big-worded milk

Unhomogenised milk

Shopping late on Friday night, the only light milk available was this organic brand. Now organic milk is the only organic product that's been shown to have health benefits. The animal husbandry advantages are big too.

But why "unhomogenised"? Is it just that the demographic that's keen on organic products is also phobic of big words they don't understand? You'll note that it doesn't specify "unpasteurised", because that's not allowed in Australia.

Homogenization, with regards to milk, is a very simple process that doesn't chemically change the milk. The milk is forced through very fine nozzles, which breaks up the fat globules into smaller globules. The effect is that, unlike milk straight from the cow, homogenized milk doesn't separate out into cream and less-fatty milk.

Guess what's on an iced vovo?

Iced VoVo

Our new PM told his staff to limit their celebrations to a strong cup of tea and an Iced VoVo before getting down to work. I doubt he meant it this way, but the hilarious thing about this is that one of the ingredients of an Iced VoVo is, of course, desiccated coconut.

Well I was amused.

On another note, was it just me or was Maxine gurning like a coke fiend on Saturday night during her victory speech? They must be putting something a little stronger in Iced VoVos these days.

Ruddslide!

Front
pages of 25th November 2007 Sydney newspapers

What an exciting time. Our new overlord, Kevin Rudd, wiped away 11 years of reactionary rule under lying rodent John Howard. The weather has brightened. The mood has risen. The future looks bright. I'm sure he'll manage to disappoint within the week, but for now I'm pleased.

Last night I had three bottles of bubbly ready to go. One was for Howard conceding government, one was for him conceding his seat and the final was for Malcolm Turnbull conceding his seat. The first two went surprisingly early in the night, and when it looked like Turnbull would hold onto his seat we drank the final one to try to forget.

Help
protect Australia from angry lesbians and whinging poofs

After the result was clear, we left the party at Leonie and Mikey's place and headed to the People's Republic of Newtown for Good Rid Dance but by the time we got there it was winding down.

We moved on to a free party in Alexandria, which was shut down before we got there. Bit of a shame but it was 02:00 already, so it'd been a big night of celebration.

Disappointingly the booth I spent six hours on yesterday only scored 194 people. In this area it's not surprising though, as it's rusted on Labor. More surprising is the number of Tory voters! Hell, even the decidedly slimy-looking Socialist got a couple of votes. The hours spent in the 20,000 vote Australia House polling booth were much more productive.

Nationally The Greens did well, with the vote holding despite a massive swing to Labor. Unfortunately it looks like Kerry will miss out in the Senate for NSW, which is a real shame as she's been an excellent representative there.

Remember one thing: Greens in the Senate

Tomorrow is the big day, Howard's End. Something I've been waiting 11 years for. The day his particular breed of reactionary politics is shown the door.

There's really only one thing you must remember when voting tomorrow. Regardless of who wins government (and it looks like a Labor landslide is in the offing), the most important vote is the Senate. The conservatives, in conjunction with the hard-right "Christian" party Family First, currently hold the balance of power. Labor has no chance of winning control of the Senate in their own right, so the best option is to get Greens onto those red benches.

The best outcome is a Labor government with the Greens holding the balance in the Senate. This means the Senate becomes a house of review again, rather than the rubber stamp it's been under Howard. Labor will be forced to compromise to get support from the Greens, but the threat of support from the conservatives and religious nuts will force the Greens to be reasonable.

Only the Greens support the full reversal of Howard's divisivle Workchoices, and we will support and hopefully strengthen Labor's plans to dismantle it.

Both major parties are planning to build the pulp mill in Tasmania. Only the Greens have opposed it throughout the dodgy approval process. Both major parties also support increased uraniam mining and nuclear power. Yes, even Peter Garrett.

Radioactive HowardRadioactive Garrett

The Greens support public education, not tax cuts to the rich. My uncle (a public school teacher) had a great comment about government funding for private schools. Just because you build a pool in your backyard doesn't mean you should get a rebate for not using the government-funded public pool.

Finally, The Greens are the only party that support full equality for GLBTI relationships.

Isn't a vote for a minor party a wasted vote?

No. Unlike some other countries, Australia has a system called "Preferential Voting" or "Instant-runoff voting". You number the candidates according to your preference and, if your first candidate isn't the winner, your vote is transferred to your next preference. I explained it in some detail on my blog and there's a great video explaining it by the Greens.

What about this <insert minor party>

Beware the little parties you've never heard of. While they might have a nice fluffy sounding name, some of them have very sinister agendas.

  • Family First has a very narrow definition of "family" and is quite obsessed with sex and sexuality, namely controlling yours.
  • Non-Custodial Parents are preferencing some very dodgy parties, so I doubt they really have the interests of most single parents at heart.
  • Climate Change Coalition have done some very shonky preference deals, including putting The Fishing Party ahead of The Greens, with Family First and One Notion ahead of Labor!
  • Democratic Labor Party, to paraphrase the old joke about the Libs, are neither democratic, nor a party. These are incredibly conservative Catholics who are still convinced there's a red under every bed, preferencing the Coalition, Family First and Fred Nile ahead of Labor.
  • Conservatives for Climate and Environment will never get a seat in the Senate, and their preferences go straight to the Coalition. The only circumstance it might make sense to vote for them is if you want to vote Coalition but also want to send a message about climate change and the environment. I guess.

I've gone through the NSW Senate preferences in more detail on my blog before.

If you're voting tomorrow afternoon at St Peters Public School, you'll probably run into me. Be sure to say hello.