milliAmp

the website of Alex Taylor

Firefox 3

Firefox 3 was launched this morning (5am NZ time). Mozilla Foundation have made a huge marketing effort to the point of setting a world record for the most downloaded software in 24 hours. Now, you’d expect, with a market share just shy of 20% of the global web browser market share and that kind of marketing, you would need some serious distribution technology.

Mozilla.com web traffic is pushing well over 2 Gigabits a second of just pure HTTP traffic. That is in addition to the 13 Gigabits a second or so of download traffic. We are still at around 14,000 download/minute and mozilla.com is responding well! Go Mozilla community and IT team! schrep – June 17th, 2008

Considering the numerous reports of the Mozilla.com website being down for at least the first hour of the record attempt, lloks like something in the middle couldn’t quite handle the load. At 15Gb/s that is close enough to 2GB/s, that is fairly large.

The official counter at SpreadFirefox.com shows 2,135,640 as at midday here, only 7 hours in. Either their counter is off or things have calmed considerably. If they were still blasting data out at 2GB/s the counter would be closer to 7 million by now.

I’m not going to go in to the features of Firefox 3 too much but for Mac Firefox junkies, it is a massive update. The interface is now using native widgets and is much faster. It also brings Firefox back into the running with Safari and Opera again in terms of standards support.

If you download it today, from http://getfirefox.com you’ll help Mozilla set a world record, the servers seem to be coping now so it downloads quite quickly however the Mac version weighs in just over 17MB which is on the steep side.

Powersaving

A poster about saving powerYesterday, the power generation companies of New Zealand launched a large public power-saving campaign in an effort to drive down demand on our national grid. There have been power-conservation campaigns over the last few years in 2001, 2003 and 2006, each time the rains came and saved the day before any issues were encountered. The difference this time is that the rains which have normally come mid-May[PDF] to save the day, haven’t yet arrived and New Zealand’s power demand has risen quite a bit over the years.

As of 12 June, the inflows into the hydro-lakes is less than in 1992, the peak demand and the average demand is above that of 1992 and the hydro-storage capacity half the average level but still twice that of the levels in 1992 so things are poised to get worse rather than better short-to-mid term. There was some mild relief over the last day or so with some rainfall into the lakes.

The power companies have set up an power-saving awareness website filled with data on the currently situation, comparisions to 1992 and tips and video on things you can do to save power. The website also has download-able posters that you can use as a desktop wallpaper or print out and stick around the place.

At this point, the situation is not as dire as in 1992, the power companies seem to still be optimistic that they can supply through the winter but without any significant rainfall in the South Island’s hydro-lakes, they’re going to be running a very fine line and if a cold-snap hits the country, the peak demand is poised to be higher than what is available which would mean some cold nights for some parts of the country if they have no power.

Independent energy experts say there is now a one-in-five chance of power blackouts because of the lowest hydro lake storage levels since the 1992 power crisis.JAMES WEIR – The Dominion Post (29 May ’08)

New Zealand’s largest power generation facility, the Huntly coal-powered station is currently supplies around 17% of the country’s power capacity. Should anything happen to this plant, the national grid would be under stress to take up the slack as the hydro-dams are running at reduced capacity at the moment. The supply companies would need to fire up expensive emergency generation facilities to cope with any significant downtime.

Faults like what happened recently at the Otahuhu Gas-fired plant and its effects make a lot of people anxious about what is going to happen with the system under this kind of load.

The situation is remarkably bad. Just to keep the lights on, New Zealanders are relying on a broken Cook Strait cable, an asbestos-riddled mothballed plant in New Plymouth, and a diesel-guzzling emergency generator at Whirinaki.National’s energy spokesman Gerry Brownlee (06 June 2008)

There is currently a political debate going on, the current government is basically saying, “its all under control, there is no problem” and the opposition party is screaming “you idiots, look, we’re close to a crisis!”. Nevertheless, there is currently investigation into legislation to allow the hydro-dams to operate their supply lakes below their environmentally-safe levels to keep up with supply.

Running the emergency plant at Whirinaki has caused the spot price on the energy market to skyrocket and the wholesale price is rising too. There is a that is due to be opened later this year. One option may be to get things moving faster and open it a few months earlier than planned.

There are still a lot of options in the pipeline, in 1992, deals were negotiated with some of the biggest electricity users in the country. One company uses 15% of our country’s supply and in 1992, a deal was negotiated to get them to reduce their operation down considerably and a part of a smelter was shut down to keep the usage with limits as well.

I know I’ll be working on saving power over the next few months, there are only a few bulbs left in the house that aren’t energy-saving bulbs, I’ll be replacing those this week. Shorter showers are on the agenda too. One good thing about saving power is that it ends up saving money as well.

Sony Ericsson V640i

Sony Ericsson v640i
A while ago I decided to use my mobile phone for what I wanted to, as often as I needed and not worry much about the costs associated with it. This gave me a better estimate of how much I would normally spend instead of having it biased by how much I had left in my prepay balance. Recently, I investigated how much I was spending and figured out that it is pretty close to $50 a month. So I decided to sign up for Vodafone’s TXTer Plan. It is $40 a month and includes more minutes than I currently use and more text messages than I currently send so it has a bit of growing room. The key for me was that it was less than I was currently spending. The early termination fee, if I should terminate in the first 12 months (of the 24 month contract) is only $160. Along with the plan is a $130 3G Handset subsidy which I used to purchase a Sony Ericsson v640i.

If I cancel and sell the phone at the 6-month mark, if I sell it for $30 less than the purchase price, I work out even as I would’ve been saving $10-a-month on prepay costs.

Anyway, that is enough about the contract, more about the phone. Now, I had a set of criteria for a new phone and a budget so my options were cut down for me quite well. Here are the reasons for choosing this phone:

Awesome Bluetooth support

It supports more Bluetooth services than anything except the Symbian-based Nokias. I use a Bluetooth integration program on my Mac called BluePhoneElite for storing text messages, sending and receiving text messages through my laptop, call logs and proximity actions. This phone had no known issues on their compatibility page and had ticks next to all the functions. No other phone in my price bracket had such good support so that was a definite tick.

Price

This phone dropped to $299 when I got it ordered so that made it very affordable ($160 after the new handset subsidy). I couldn’t justify more than $250 on a phone so that meant I gave it a tick for price.

Size

This thing is small and not very heavy. Until recently all the 3G-capable phones available here have been very bulky and ugly so the small factor of this one was pleasing.

The Style

I really don’t like flip phones, they always feel like they’re going to break when I shut them and to open them you have to either have to use two hands of jam your finger between the halves and flick upwards. It just feels like its putting unnecessary wear-and-tear on the thing. This phone is “candy-bar” style which means it is a solid, one-piece unit.

Colours

The red and black version of this phone is nice but feels a little bit tacky. What I wanted was the “Havana Gold” version which I think looks awesome.

Niggles

There are a couple of things which bug me, they aren’t deal-breakers but they are things which I think should be improved.

  • You can’t change the function of the top left and top right buttons. You can reassign the directions of the navigation key but not those two select buttons. You can on Nokias like the Nokia 6085 and on the Motorola RIZR Z3 which I had before this. I don’t know whether this is a restriction added by Vodafone so that you can’t remove their shiny “Vodafone Live!” logo from the Home screen or if it simply was never a feature of this phone but it is a little annoying as I’m unlikely to want to use Vodafone Live and I’d prefer it to be something like “Bluetooth”.
  • Text size in the menus. It is quite big, I’d prefer to be able to shrink it like on a Nokia 6085 where you can choose the text size for different sections.

I’ll post another blog entry later about the HID-compliant Bluetooth Remote Control Program Sony Ericssons come with which can be used to control a Mac or PC and the complementing Desktop Application for creating new remote control sets. I’ve set one up now to work exactly as I want and can perform a host of functions straight from my phone (things like controlling music).

deleteCell may have side-effects

UPDATE:

I have created an interactive test case and an automated test case.

Turns out the behaviour is reproducible. Now, is this a bug or am I just missing something about the way that method should work?

I was debugging a client-side heavy application today in IE7 and ran up against a very weird bug. Anyway, even with the Microsoft Script debugger, it took me a couple of hours to trace down the cause of this one bug.

The system has a page which works similarly to Apple Mac OS X’s Finder windows in Column View. In IE7, I was having a problem where all the children of a node inside a table cell where being removed from the DOM when I removed the table cell itself. If you think this sounds normal, let me explain.

In Javascript, DOM Elements exist as Javascript objects and can be attached into a document at any point, they do not have to be a document, they can exist solely as fragments. The normal DOM ‘removeChild’ method does exactly this; it detaches the child from the parentNode but if there are any references to the DOM element in javascript-land, it does not get deleted (or garbage collected to be more precise). This means you can reattach the node somewhere else after some processing.

Safari, Firefox and Opera appear to do this with the deleteCell method of a ‘table’ as well but Internet Explorer appears to do something different. There is a little bit of speculation here as I haven’t created a minimal test case of this bug yet but it appear that IE detaches all the DOM Nodes recursively beneath the cell it deleted. This doesn’t appear in the MSDN documentation so I’m not sure quite what is happening, am I experiencing a bug caused by something else maybe.

How would that be useful!? I can’t see a purpose for it but whatever.

My fix was to remove all the child nodes of the ‘td’ element using removeChild first, then delete the cell. That meant the elements that were in the cell before hand still existed if there were any references to them, which there were.