Yesterday I posted about a few things that were going on on Thursday. I'd actually forgotten another thing going on that day that is significant for us and also leads on to something of a rant.
On Thursday our fridge/freezer gets repaired.
Now, this is nothing unusual really, but the thing is, this is a unit that we bought less than two years ago that cost us about $2500 (including fitting parts and delivery etc). Apparently pretty much all new units come with a very basic 1 year warranty these days, and this is no exception.
So much for having confidence in your products...
The unit in question is a Maytag Ice2O one that has a French door door fridge at the top with in-door water and ice, and a pull-out freezer at the bottom. It works very well: when it's not broken.
What happened was a couple of weeks ago the freezer started to warm up. The temperature alarm allowed us to save the food by moving it to another freezer. A while after that the fridge went the same way.
We called an engineer out, but he couldn't find anything wrong because we'd turned it off in the meantime (the noises it was making were worrying us) and when he turned it back on again it started cooling properly.
Then on Friday the same thing happened. This time we left it on, and called out the engineer again (on Monday). Unfortunately, we weren't as fortunate as my colleague Chris who merely had to replace a bulb in his freezer. For us, it was that the compressor had shorted out, and needed replacing.
I'm very grateful to the engineer who then went on to call Maytag himself to try and see what they could do. They first told him that it was a one year warranty and that was it. The engineer then continued to fight our cause, pointing out that this would be something like a $650 repair on a $2500 unit that is less than two years old, and Maytag finally said they would give the part for free, though they would not help out at all with the labour.
Firstly, I'm grateful to Maytag for giving the part for free: it is something they are no legally bound to do. I'm even more grateful to the engineer who did a great job at representing us to the company.
However, I would say that refridgerators are appliances that people purchase expecting to be able to keep them for like ten years. These aren't things we just throw away after a year.
I am new to this country (and Maytag isn't a brand I'd heard of before in the UK), but since I've moved here I've heard about the "Maytag Repairman" commercials which document the sad existence of the poor Maytag Repairman who is bored out of his mind because Maytag products never break down. What's happened to that? Why do your products (which are supposed to be long-life) carry only one-year warranties? Do you really have that little faith in your products these days?
Or maybe the situation is that you're quite fond of the income stream you get from selling extended warranties?
Hmm, this is getting personal, and I could go on ranting. but I think I've made my point.
I'm off to get a cold drink out of the cool box filled with ice in my garage...
Wednesday, April 23, 2008
Another thing happening on Thursday
Tuesday, April 22, 2008
All Go on thursday
First of all there's the release of Ubuntu Hardy Heron: I've just come into the Ubuntu world having decided to install it on my new machine's replacement hard drive (couldn't be bothered to install Gentoo again, and fancied a change anyway).
I installed a beta version of Hardy Heron anyway when I installed, so the launch on Thursday won't actually have that much of an effect on me. Still a big event anyway for those who use Ubuntu or Linux in general (or are thinking of doing so).
The other thing that happens on Thursday is the opening of the new QuikTrip just up the road from where we live (it will be on Justin Rd, FM407 in Lewisville, TX). At least, it will be Thursday if the "open in X days" signs outside are being properly kept up to date. :)
It will be nice to have a QT so close for a number of reasons: we don't currently have a competitive place to buy fuel from, especially when heading north. QT is also an excellent place to get drinks from (fountain drinks, slushies etc), which will be very welcome in the appraoching summer. Also (and to tie this loosely into the previously blogged theme of weight loss), it's going to be close enough to walk to. which will provide us with a way to get some exercise. Walk up there, buy a drink and walk back.
I wonder if anything else of interest to me is happening on Thursday that I'm not aware of?
Friday, April 18, 2008
=== null is faster than is_null
I hate using more than one method to do the same thing in my code: it makes it read inconsistently in my opinion. I try to keep it uniform so there are no surprises.
Lately I've been struggling to decide which of the following is the 'best' way to check if a given variable is null or not in PHP:
is_null($v)So I figured I'd try a rough and ready script to benchmark the two. The following will do:
$v === null
A million iterations of each should be sufficient. Everything is initialised before the loops so neither has an unfair advantage. I also tried running the script with $v set to numerous other types and values with no effect on the result, and finally tried swapping the loops around to ensure that running order was not a factor.
$c = 1000000; // Iterations
$v = null; // Value to use in comparison
$d = null; // Dummy variable for assignment
$i = 0; // Counter
$s = microtime(true);
for ($i = 0; $i < $c; ++$i)
{
$d = is_null($v);
}
$s2 = microtime(true);
echo $s2 - $s . "\n";
for ($i = 0; $i < $c; ++$i)
{
$d = $v === null;
}
echo microtime(true) - $s2 . "\n";
?>
The result? Well, on my machine === null turns out to be roughly four times faster than is_null.
I find this quite surprising: === is a generic operator while is_null is a very specific function. The only cause I can think of is that the function call adds overhead.
So, there you go. If you need to check if a variable is null or not, === NULL is the faster way to go.
Wednesday, April 16, 2008
Thanks for the tip, Vista Installer
Recently my hard drive died, and while it's been in the RMA process I've been running Linux only off an old IDE drive of mine.
I've got my replacement now and started putting things back on to it last night. The first task was partitioning it (which I did using Linux tools so I could get everything just the way I wanted it). This includes a 250GB partition for Vista, which I use for games and games alone. Nothing but games...
So when it came to installing Vista it asked me to pick where I wanted to install it, to which I selected the aforementioned 250GB partition.
Upon clicking install, I got this error message:
Windows is unable to find a system volume that meets its criteria for installationFrikkin fantastic! Not only is the vista installer too brain dead to install to the partition I created for it (and explicitly pointed out to it), it won't tell me why. How's about telling me which criteria it's not meeting? That would be an excellent start.
In the end I did two things that fixed it (not sure if one or both was required, couldn't be bothered to do it scientifically).
The first thing was to delete the 100MB partition I'd created for the linux /boot mount. This was the only partition before the Vista one on the drive. If this was the problem I'd like to ram a rusty nail into the left eye of the developer that decided that was something that could prevent an installation. The partition is invisible to Windows anyway.
The second thing was to mark the Vista partition as 'bootable'. If this was the problem I'd like to ram a rusty nail into the right eye of the developer that decided that was something that could prevent an installation. The Vista installer can't mark a partition as bootable itself? Is it really that shit?
There is plenty on the net about other people having this same problem. More than one person had to unplug their card reader in order to get around this. Seriously, why the hell should the presence of a card reader prevent Vista from finding a partition to install on especially since the installer allows you to explicitly select the partition yourself.
The mind boggles.
Game developers: please get your finger out and start writing games that are cross-platform so I can finally wipe this chaff off my hard drive and out of my life for good...
Thursday, March 06, 2008
Snow in Texas
Snow is something of a headline news event in Texas. It hits the new and they stay with it for hours. The radar map is shown continually with the meteorologist showing how things are moving, what they think is going to happen and showing at-the-scene reports from out and about showing how the weather is playing havoc with traffic.
We had snowfall here a couple of days ago (up to a couple of inches) but it went away quickly the next morning.
Today it's snowing again, and it's looking like being a lot heavier. They reckon it could get up to four inches thick.
I've taken a couple of photos from my front doorway to show how things are going:
I'm not entirely sure why snow is such a big deal here compared to the UK. One reason could be that it's very flat around here quite a bit, so there is little cover. To add to that there are a large number of bridges and overpasses that have little cover too which ice over very quickly in cold wind when wet, even without snow.
The other problem is that many cars here are automatics with no option to move into a higher gear. my CX-9 has an auto gearbox but has a sequential manual shift mode that allows me to select second gear for setting off, and this helps a great deal. I feel sorry for drivers who can't do that.
Fortunately it's supposed to be clear and warmer on Sunday, so my flight shouldn't be delayed.
Sunday, March 02, 2008
Leaving the worst till last
Anyone who knows me at last a little will know that I've been waging a battle with my weight for years now that has to all intents and purposes been something of a stalemate so far. Being the analytical type I'm always on the lookout for new techniques and strategies that might enable me to win that one battle that will put me on the road to victory.
The obvious answer is of course "eat less food", but that's something that is easier said than done. It's the psychology behind it that I need to explore.
One of my biggest problems is that when I eat I feel compelled to clear my plate, and often do so even when I'm beyond the point of being "full" (a big problem in the US where portion sizes are often immense). I've always put this down to being brought up to clear my plate, as many other people will have been too, but I recently discovered another (related) reason that is entirely self-inflicted.
For as long as I can remember, I've been pretty obsessive about saving "the best till last" on my plate. It's actually quite hard to justify when I think about it, but it's something I've always done. I think it has something to do with savouring the best taste to the end, or getting the "bad stuff" out of the way so I can get on with enjoying the "good stuff".
So say I'm eating some chicken tenders and fries (hardly weight-loss food but it's a simple example), my usual strategy will be to start with the scrappy fries and smaller, more battery chicken tender. I'll end up with the biggest and nicest fries and tenders at the end. Now, imagine at that point I feel full already: I'm there with a full belly but the best part of my meal is still left there on the plate. What am I supposed to do? :)
This all came to light when someone pointed out the weird way in which I eat burgers: I always eat the outside first, leaving the middle to eat at the end. I've always though it quite normal, but apparently other people think it's weird. :) It occurred to me that I do that because the middle is the best part because it has the greatest concentration of all of the ingredients.
So, my new plan is to force myself to reverse this tendency and eat the best part of every meal first. I tried this last night at Joe's Crab Shack (somewhere I've not eaten at before) where I ordered a Blackened Mahi Sandwich with fries.
I started out with the nicest looking fry on the plate, and then attacked the sandwich from the site that has the thickest amount of fish, and resolved to not eat around the sides.
The result was that I finished the meal with a number of scrappy fries and part of the sandwich left on the plate. Definitely an improvement. I remember looking down and not feeling particularly fussed about what was left there at all, so it wasn't a major effort on my part to leave what was there.
Of course, I need to work on my food selection too. But for me, this is another battle won. Here's hoping it turns the tide in the war...
Tuesday, February 19, 2008
Getting out of iowait hell
I have a problem that's really got me baffled. Some mornings when I get up to start work, I find my laptop is extremely unresponsive.
I ssh into it to have a look and see that the CPU is saturated with iowait. However, I can't for the life of me figure out which process is causing the problem.
The closest I've got is pidstat -d which should show IO hit on a per-process basis, but that doesn't seem to reveal anything of any significance either.
Any ideas?