Last Saturday we went to Legoland Windsor because they had a special Monster Truck weekend. Heidi, James and Matthew already have annual passes, so they got in free, it cost me £30. They were running a special offer in the shop though, where you got a free annual pass voucher if you spent over £50. Well, Christmas is coming up in the not too distant future, and I've had my eye on the new Mindstorms NXT since they announced it in January. It was £179 but with James's annual pass discount it came down to about £161. I was very pleased though when I received three annual pass vouchers. In the meantime Heidi had been in another queue buying Matthew a LEGO train set (set 7897), which also netted us a voucher. So in the end we came away with £290 worth of annual passes (2006 prices) and £260 worth of LEGO, for an outlay of £224 (or £254 if you include the £30 it cost me to get in the park). I don't know if the offer's still running but I hope they do it again next year!
Now the only problem is that the boxes have been put away, as they are for Christmas. So now I'm counting the days until Christmas. I mean, James is. It's his present, right?
When I removed my MacBook from its Second Skin this evening at about 19:00, it was almost too hot to hold. I put it to sleep at work (by closing the lid) at about 17:35. It obviously didn't sleep, or something woke it up. The fan was running at its fastest speed, but the machine was unresponsive - I couldn't even get the screen backlight to come on. I forced it off by holding the power switch, and when it came on again it was fine - although the fan stayed running for another 5 minutes.
It's the first time it's happened and I've had it for over 2 months now. Odd.
Recently I have been refactoring some code so that various computed results are saved in a memcached cache to improve performance.
A common cache idiom is:
- Compute cache key
- look up key in cache
- if value found, return it
- else, run some code to generate the required value
- save the generated value in the cache
- return the value
It's quite awkward to have that code repeated all over your app, so I hit upon the idea
of passing a block to
Cache#get() which would be used to compute
the value if the key wasn't found in the cache.
A couple of weeks ago I was asked to set up a web cam on the PC in our basement, so that James could video chat with one of his school friends who is leaving for a different school. I stopped on the way home from work on the Friday evening and bought a fairly cheap (£25) webcam from Staples.
I left my iPod Shuffle in my car all day today, connected to my car stereo and playing (although the car stereo itself was off of course). It still had enough power to provide me with music all the way home, which means it lasted at least 8 hours (it wasn’t fully charged this morning).
I’m currently listening to iTunes on my PowerBook, and it is using between 10 and 15% CPU. This obviously runs down the battery in my PowerBook.
Why can’t Apple â€œbuildâ€ an iPod shuffle into the PowerBook? It could connect to the USB bus internally, and all it would need is a kernel driver to control it, that iTunes could use to tell it to play a particular track. It would free up the system CPU to do other stuff, and extend the life of the battery.