Jun 28 2008

Pet Hate

Tag: LifeAlex @ 5:54 pm

Heat-sealed packagingI just had to write about this because it frustrates me a lot every time I run into this. It is these new-fangled heat-sealed packages a lot of electronic gadgets are coming in now. You can’t get them open with practically destroying the entire packaging. I don’t want to go and find a pair of scissors or a knife to get into my new gadgets. I also don’t want to slip with said cutting device and cut a cable or the manual. Some headphones I bought a few months ago had this heat-sealed packages and the edges were dangerously close to where the cable ran inside the packet.

I am a box-hoarder. I keep boxes for my gadgets for at least a year after I buy them, in case it breaks in the first couple of weeks, in case I want to sell it; I can sell it in the original packaging and if it wasn’t bought locally, some retailers request that you send it back in the original packaging. So, I keep boxes. It frustrates me that the packaging for these devices has to be destroyed to get into the thing.

It means that if it doesn’t work for the purpose I need it to and want to return it to the shop two days later, they can’t put it back on the shelf for full price because the whole thing it ripped apart and it means I can’t offer it to someone to buy later in the original packaging (well I guess I could but with it being in pieces, it distracts from the point of doing that).

Does anyone else have a problem with this nasty packaging or is it just me?


Jun 28 2008

Network Topology

Tag: Apple, Computers, Gadgets and LifeAlex @ 5:18 pm

Last Thursday afternoon, a close friend of mine gave me a call to ask whether a discounted price he had seen for an iPod Touch was a good deal or not. He was pretty keen on getting an iPod Touch even though the iPhone 2.0 is released in a couple of weeks but he seemed pretty set and doesn’t have a need for another cellphone as his work supplies one for his use.

They don’t currently have a wireless network at their house and seeing as the iPod Touch has wi-fi capability we ended up discussing that I was interesting in selling my current Airport Express Wireless G base-station to upgrade my infrastructure to Wireless-N.

The main reason I wanted to upgrade was actually to have an Airport Extreme Base Station which would allow me to share both printers and also a couple of hard-drives over the wireless. The Airport Express only supports one printer and no hard-drives so I have had to switch USB cables around to print to the other printer in the past.

So, knowing that he was keen for that deal, I went out and purchased a new Airport Extreme Base Stations with Wireless-N and Gigabit ethernet. I also picked up a new Wireless-N capable Airport Express so that I could once again stream music to our downstairs speakers.

My next mission was obviously to map out how I wanted to set up the network and the devices. I love setting up network infrastructure, I don’t purport to say I’m any good at it at all but I find it a hell of a lot of fun.

I plan to sprinkle this blog post with diagrams of the old set-up and the new set-up but my laptop is currently at the shop getting its iSight looked at and I’m using a user-account on Aimee’s laptop which doesn’t have anything that I can easily draw diagrams in. For now I’ll add a textual description.

My network consisted of:

  • An ADSL Modem/Router for internet connectivity
  • A LinkSys VOIP to POTS adapter, for use with our Xnet Fusion VOIP account
  • An Apple Mac Mini, connected in the lounge for entertainment purposes
  • Two Apple MacBook Pro Laptops
  • An Apple Airport Express, currently in use only as a base station since we moved to our new house

Then I added:

  • An Apple Airport Extreme Base Station
  • A new Apple Airport Express

And I’ve packed up the old Airport Express.

I wanted to add to the network

There are a couple of restrictions this placed on the network. For internal network QoS, the Linksys VOIP Adapter needs to be placed between the router and the network so that voice traffic gets injected right at the router. This also means that our cordless phone and corded phone need to be connected within a few meters of that adapter.

The RAID enclosure isn’t network capable so it needs to be connected  with a meter or so of the Airport Extreme Base Station. As do the printers.

Also, the only two locations in the entire house with a phone plug are the kitchen/dining area and the master bedroom.

So I went ahead and picked out a possible solution. It all works pretty well.

I went the whole hog and set up my Wireless-N network on the 5GHz frequency using wide-channels to get maximum possible throughput. We don’t have any 802.11b or g devices in the house (or so I thought) and I doubt anyone in our close proximity has a 5GHz network set up so all was well.

I have the router in the master bedroom and an ethernet cable running from that into our work room. In there is the Base Station, the hard-drives, the printers and the VOIP adapter attached to the cordless phone base.

Downstairs I have the Airport Express and the Mac Mini. As I eluded to above, it turns out that the Mac Mini isn’t Wireless-N capable as I thought it was, it only supports 802.11b and 802.11g so it ended up being connected via gigabit to the new Airport Express as they’re right next to each other anyway. The Express is currently connected to the Base Station using WDS.

I had a fun time setting up the printers. I decided to stretch USB to the limits and see how far away I could keep the printers from the base station. It turns out it is 7 meters keeping to the skirting board to the first printer and another 3 meters to the second where they are placed quite conveniently now. There is a maximum length of 5 meters between devices  so I pulled out an old USB Active Extension cable, then plugged in a  2 meters of USB extension, followed by a USB hub and then plugged the first printer in using a short cable and used a 3 meter cable to reach to the other printer.

I thought I had all my numbers worked out but for some reason, the base stations wasn’t recognising either of the printers! I played around a little and found that the base station didn’t like the active extension cable plugged into it, but it didn’t mind having a hub first and then the active extension so I went down that road. Turns out I would have had to add that initial hub anyway to plug in the hard drives next to the base station so all is well.

I wasn’t particularly pleased with the file transfer throughput so I ended up playing around with WDS, wide-channels, different frequencies and even forcing the base station down to wireless-g to see if I could find out what was happening.

I’m just finishing up testing the network performance using the various settings which I’ll post about at a later stage.


Jun 28 2008

Help, I can’t see

Tag: LifeAlex @ 5:16 pm

The iSight camera on my MacBook Pro hasn’t been working for a number of months but since I rely on the laptop so much (and have had Uni stuff to use it for) I haven’t wanted to be without it for more than a few hours. Now that my final exam is over for the semester, I’ve had the chance to take it in and get it looked at while it is still under warranty.

I don’t use the camera much at all but it is rather annoying with it broken if I do want to use it.

I’m using Aimee’s laptop for the moment, while she is at work so it isn’t so frustrating to not have my laptop, it just lacks a few of the programs I use and all my email.


Jun 22 2008

Hosting Woes

Tag: Computers and Web DesignAlex @ 8:22 pm

Tom and I have had a hosting account with Startlogic for a few years now, it was very competitively priced and we wanted a cheap VPS. We haven’t had too many problems up until now, the uptime is good and the problems faced so far have only been with slow response times to online tickets and email.

This post gets into technical details of the DNS system and what went wrong so unless you’re interested in reading technical details, you may want to skip down to the end of this post. [skip]

In terms of DNS, our server runs named (BIND) so it can be a nameserver for any domains we host. This really isn’t a very good option for so many reasons. Two of these reasons are:

  1. You should use two separate name servers which are geographically dispersed.

    Using a single server for a nameserver means there is a single point of failure.

  2. Downtime on the VPS account will mean that after a while, the DNS records cease to exist on the internet.

    One effect this has is that if the VPS account goes down or needs to be rebuilt and it is down for longer than the Expiry time on our domains, mail sent to those domains will be bounced and not be resent automatically.

There are plenty of references for this information on the internet.

StartLogic set us up by putting our primary domain name’s DNS record on their geographically dispersed name servers meaning it would be quite resilient to network failures.

They then told us that if we wanted additional domains pointed, we could just email them. This is what we did for about 2 years.

Tom actually forgot this and has a few of our client’s domains pointing to ns1 and ns2.yigg.net (as Startlogic suggest now).

Anyway, at some stage, they accidently signed us up for an additional account, a standard hosting account, under our primary domain name. This hadn’t caused any problems at the time because they didn’t touch the DNS records.

What happened was that they recently upgraded all standard hosting accounts to a new platform. This meant the erroneous account was moved onto a new server. Last week they completed the migration and changed the DNS record.

Suddenly, I couldn’t get to our control panel*. Yigg.net was resolving to a completely different IP. So I figure there as been a problem and phone through to them.

Now I must mention here that earlier this year we received an email from a representative at IPowerWeb, the parent company (?) for StartLogic saying that he was our point of contact if we needed anything, we could call him.

So, I rang through and discussed somethings and then got put through to a technician. After a while he figured out what had gone wrong after I explained the situation and he found out VPS account and said he’d get those DNS records corrected and pointed back to our VPS account. He said he would also delete the erroneous standard hosting account.

Only the latter got done, probably a mistake, the guy I spoke to seemed really helpful and the extra hosting account got deleted quick smart. The account switched to a holding page instead of the “VDeck Default” page it was showing before. So I waited to see if their servers would update and start announcing the correct IP again.

You need to wait up to 48 hours for a DNS change to reach everyone in the world (worst-case) but there is a trick to finding out if the change has started propagating. On Mac OS (and most *nix machines) you can query a DNS server directly for what it thinks the IP address is for a domain. Because I knew the name of the authoritative server with the record on it, I could ask it directly and see whether it was announcing a the correct IP.


# dig yigg.net @ns1.startlogic.com

; < <>> DiG 9.4.1-P1 < <>> yigg.net @ns1.startlogic.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 53630
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;yigg.net.			IN	A

;; ANSWER SECTION:
yigg.net.		3600	IN	A	66.96.134.55

;; Query time: 291 msec
;; SERVER: 66.96.142.100#53(66.96.142.100)
;; WHEN: Sat Jun 21 23:35:01 2008
;; MSG SIZE  rcvd: 42

It wasn’t.

I actually forgot about it until lunch time the next day when I Tom got an email from a client saying his email was no longer coming through. Turns out, his name servers were set to ns1. and ns2.yigg.net which now resolved to Startlogic’s standard hosting account, not to BIND running on our VPS account.

So I wrote a support ticket explaining the situation and then phoned America to get them to sort it out as soon as practically possible. The support representative said a technician was looking at it right then. So I hang up and waited… and waited. No change.

The next day I updated the ticket again trying to clarify what needed to be done, point yigg.net back to our VPS’s IP address and away from the IP it was incorrectly set to previously.

Today, later I rang them again to see what was going on. The representative then proceeded to tell me that what I wanted wasn’t possible any more and that I needed to set up name servers myself. I got quite confused as to what she was asking me to do because she said that I wouldn’t need to sign up with a DNS provider, I could do it all through the registrars control panel.

The main problem with that, is that I didn’t know where that was, as we registered the domain with StartLogic, they had taken care of registering it, setting up the contact information and adding their name servers to the records. I realised when she told me the URL to go to that I had been there before, to update my contact details when I was told I had to. She couldn’t tell me the username and password so I had to figure that out myself, which I did without too much trouble.

What I couldn’t figure out was what she was asking me to do. She said I needed to “create a name server” for my domain name. Now, in normal domain name management talk, that means setting up a box running BIND and telling the registrar to hold a glue record pointing to this box. It turns out that she was simply asking me to add glue records at the registry level for our VPS (which is running BIND already).

There is a difference between creating a name server and simply pointing A records at a registry level at it.

If anyone from Startlogic reads this blog post. Please reconsider this policy, the way it worked for the last two years was much more reliable and didn’t require a user to go into that unbranded OpenSRS management console to try and decipher fairly non-standard terms.

In terms of customer service, they get a low score. I got it resolved in the end, if it hadn’t I would have called my contact at IPowerWeb and got put through to someone who may’ve been more helpful, I’m not sure though.


* I could still get to our control panel as I just needed to access the correct at our IP, it doesn’t require a hostname to get into the control panel but I think I was only one who knew that (don’t know if Tom did and I knew James didn’t).

** If anyone has a problem with this post (including StartLogic), I will take it down and replace it with one about not using a single domain name server in a VPS situation, which is still relevant but applies to a few more hosting providers.


Jun 18 2008

Firefox 3

Tag: Computers and Web DesignAlex @ 12:09 pm

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.


Jun 16 2008

Powersaving

Tag: LifeAlex @ 1:30 am

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.


Jun 11 2008

Sony Ericsson V640i

Tag: Gadgets and LifeAlex @ 1:40 pm

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).


Jun 10 2008

deleteCell may have side-effects

Tag: Computers and Web DesignAlex @ 12:13 am
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.


Jun 02 2008

I’m playing around with my blog

Tag: TweetsAlex @ 5:21 pm

I’m playing around with my blog and looking at new plugins after upgrading Wordpress