Post display order: newest at top (change)

Chris's Weblog

Some witterings, varied enough to bore everyone.

Hauxton 200km Randonnee

Posted 2010n September 28, 2010 at 23:55:07 by chris

Sunday was my longest bike ride so far (and likely for some time to come); I rode the 200km Audax/Randonnee organised by Simon Proven of the Cambridge CTC.

I saw a couple of familiar faces from the CTC at the start at 8am in Hauxton (Nigel's report and Gareth's, both more interesting than this one!). It didn't take me long to end up near the back, not helped by me making the rookie mistake of stopping to write down the answer to the first control (but mainly down to me just being slow!).

The first leg to St Neots was relatively easy and familiar, and despite being well behind the others (who were leaving when I arrived at the control) my moving average was higher than I'd expected at about 14mph. The next leg to Olney, Bedfordshire was a bit slower, and I arrived at about 13:15. Still in good time to finish within the limit, but I should perhaps have had a bit more to eat by then. I did bring a few sandwiches, but eating something hot in the cafe was much more appealing than eating sandwiches outside in the cold and wet.

The next section from Olney to St Ives was quite long at about 50 miles, most of which I was riding by myself. Lowlights were the open windy bit towards Stow Longa and seeing what looked at the time like an intimidating hill appearing after crossing the A14 towards Barham.

The final section was helped significantly by the plate of chips and bowl of apple pie and custard I had at the control at the Local Cafe in St Ives. Unfortunately by this time it was also dark, but the villages also got more and more familiar leading up to the end. I arrived about 12.5 hours after starting (nearly last), having cycled around 140 miles (including ride to the start). I stood around in a daze for a few minutes before heading home.

I was surprised to find that riding home wasn't a problem, and I think I could have ridden for a while longer (but by that point didn't particluarly wish to). I'm pleased to have done it, but won't feel the need to try such a long ride again for some time!

Thanks to Simon Proven for the excellent organisation and easy to follow route!

2 comments. (write a comment)


Posted 2009n May 15, 2009 at 21:56:52 by chris

It occurred to me after writing the previous entry that I do actually read a lot of fiction. I read several books in a typical day. Some of the recent favourites:

No comments. (write a comment)

What I read

Posted 2009n May 13, 2009 at 22:36:36 by chris

I very rarely read any fiction these days; generally I'm more interested in learning something. Which doesn't mean I don't enjoy reading fiction - I'm just a lot more inclined to read a reference book.

The most recent (science) fiction I read recently was Second Paradigm by Peter J Wacks. I only originally read it because the author's a friend from high school, but I did enjoy it. Quick review: a very gripping, intricate time travel book, which I found hard to put down (though there were a few typos).

So what do I read? I'm ignoring mailing lists, some friends' weblogs, and news sites. I've recently found that some weblogs actually have interesting technical content, rather than useless waffle like this one. Most of the ones I've looked at recently are related to JIT compilers, one of my current favourite topics.

So some of the main things I've been reading recently include, in fairly random order:

Some print magazines:

Some technical (we)blogs:

  • Richard Boulton's Xapian weblog. I've had some small involvement in the project in a past job, and know Richard well.
  • The PyPy status blog. PyPy is a very interesting implementation of the Python language in RPython, a subset of Python. They can then translate this interpreter into C, or JVM code, or (recent work) automatically generate a JIT compiler.
  • Chromium blog. I don't use Chrome/Chromium, but there have been some interesting details on what they've done to make it fast and responsive (including the V8 JIT compiler).
  • Andreas Gal - mostly about TraceMonkey, the trace JIT compiler to be included in Firefox 3.5.
  • Neopythonic, Guido van Rossum's blog (the creator of Python)
  • History of Python, mostly by Guido van Rossum again.

No comments. (write a comment)

Taking liberties

Posted 2009n March 24, 2009 at 23:38:14 by chris

It seems fairly common now for software (on Windows, which I have to use at work) to want to install extra things with it. For example. several things seem to offer to install web browser addons, such as the Yahoo toolbar (and typically select it by default).

I've discovered recently that one of the Windows Updates has installed a Firefox extension without asking me, and without an obvious way of removing it (the "uninstall" button is disabled). Possibly worse, it's adjusted the User-agent string that Firefox sends to websites. I just can't understand how they thought this was an acceptable thing to do.

The best description (including how to remove it) I've found is at http://www.dedoimedo.com/computers/ms-dotnet-firefox.html.

No comments. (write a comment)

Remote controls

Posted 2009n March 02, 2009 at 23:59:12 by chris

It used to be that remote controls for TVs, VCRs, and so on were fairly basic, and you had to press buttons on the actual device to do some things (like setting timers). Losing the remote control was annoying, but not a big problem.

Now things have gone the other way - without the remote control, it's now impossible to use many functions on devices. We recently lost the control for the cable box. Without it, you can't view the EPG, turn on subtitles (useful late at night when others are asleep), or use any of the interactive digital stuff. You can just about change channels and adjust the volume (the same goes for the TV).

I think it's a backward step that things are now nearly impossible to use if you lose the control, or the batteries run out... I remember once at university going around the town in the middle of the night trying to find somewhere open selling batteries. Someone had turned off the TV or something like that, and you couldn't get it out of standby without the remote. Argh!

No comments. (write a comment)


Posted 2009n February 22, 2009 at 21:50:00 by chris

Oscar was flicking through Raymond Briggs' The Snowman, and came to the last page with the sad picture of the small pile of snow with hat and scarf. He said, in a very concerned voice, "They've squashed their snowman..."

No comments. (write a comment)

A few likes and dislikes

Posted 2009n February 22, 2009 at 21:30:00 by chris

A few things I dislike:

  • "Unlimited" usage offers (subject to you only using a limited amount), and other misleading advertising statements such as "now only £10 per month" (but going to a higher price 6 months later). I'm astounded they seem to be allowed.
  • Watching the first half of a film and not seeing the end.
  • The fact that reason and logical thinking is totally ineffective with children being awkward. "If you say what you want without whining, I'll be able to understand what you want and help with whatever the problem is."

A few things I do like:

  • A smile from my lovely wife or children.
  • Finally solving a niggling problem that's never quite been important enough to spend time fixing before now.
  • The taste of a white coffee just after having had a chocolate.

No comments. (write a comment)

Shiny gadget of the week

Posted 2009n February 19, 2009 at 22:44:32 by chris

Thanks to the wonders of operator-subsidised phones, I recently got a new Nokia E71.

It's not quite my ideal phone - my ideal phone would run Linux and let me tweak and add to the software (the Freerunner is close, but not cheap), but there aren't many of those available. There's the T-Mobile G1 (the first Google Android phone), but that's a non-starter based on T-mobile's poor coverage of where I live and work. It does look like Linux phones are finally coming, and I expect there to be a reasonable one I can choose next time I change phones.

So, back to the E71. It may not be my ideal phone, but it's pretty darn good. I've had Nokia smartphones before (the 6630, N70, and E65 - gosh, I do go through them, don't I?), but none come close. I'm an engineer, so I'm not a writer, and I'll put some nice things about it into a list:

  • It has a tiny QWERTY keyboard which is surprisingly usable; I'm already finding it quicker to use than predictive text on a numeric keypad. It even has a Ctrl key (well, it's the secondary function on another key).
  • It's much faster an more responsive than other phones I've had. Combined with the landscape rather than portrait orientation of the screen, the web browser is much more usable than on the E65. (I didn't do much web browsing on previous phones, as they didn't have Wifi).
  • I regularly have the web browser, S60 PuTTY (with 80 columns!), an IM client (currently Fring), and a last.fm client (Mobbler) all running, and there's no evidence of it running out of puff.
  • There's a Python port for the Nokia phones.
  • The camera, while not up to "proper" digital camera standard, isn't bad and has both an autofocus and flash. I don't think the flash (bright though it seems to be) is actually all that good, but better than my previous phone.
  • It comes with some cute applications, such as an OCR program aimed at business card scanning, though when I tried it the accuracy wasn't good enough for any serious use.

Some things I don't think are so good:

  • In standby the screen goes totally black, presumably to save power. No matter how much I squint at it, I can't see if I've got messages. There is a pulsating light which I think pulsates more quickly when a message has arrived, I think, but I don't notice it so much. And when I do press the key which turns the screen on briefly, it pops up the box describing how to turn off the key lock exactly over the message notification on the screen.
  • The speaker is quite tinny when playing music. Although it doesn't bother me, it does disturb Yasmin who's much more sound oriented than me. However, it is a mobile phone.
  • The e-mail client doesn't seem to work well with the IMAP server at my mail hosting company, particularly with IMAP folders. A shame on a device obviously intended as Blackberry competitor! (So I'd be interested in any pointers to third-party IMAP clients with good support for folders).

I think that'll do for now!

No comments. (write a comment)

Toddler clock update 2

Posted 2009n February 01, 2009 at 22:12:34 by chris

I've now swapped in a 2G X10 module, which works; when set to off, the night light really is off.

I was back at work last week so set the time (on the X10 alarm clock) for Oscar's night light to 7:00 (it had been 7:30 while I was on paternity leave). I've been using Oscar (combined with the night light) as my only alarm clock.

The first day, Oscar slept through until 7:30 anyway. This is good in a way - it means the night light (or the loud clack as the X10 module switches) doesn't necessarily wake him up when it comes on. The rest of the week he's been waking at 7:00 with the light, so he obviously adjusted.

At the weekend I disabled the ON signal at 7:00, so that we could "lie in" a bit until Oscar was naturally ready and starts asking to get up (the plan being that I'd then turn it on manually). He's been waking up at 7:00 nearly on the dot, so it's made no practical difference to the amount of sleep we get.

So lessons learned:

  • Oscar has a highly accurate internal clock
  • Just because a system is more elaborate and flexible than another doesn't make it more useful!

On the plus side, it's now easier to power-cycle the cable modem when the broadband connection stops working (this seems to happen a lot during Skype video calls - enough so that when the "call dropped" bong happens Oscar will say "The network's gone silly again!"). It used to be that I had to shift a heavy bookcase at the bottom of the stairs, remove a triangular panel, reach in and unplug it, plug it back in, replace the panel, and replace the bookcase. Now I just have to run up the stairs (opening and closing the stair gate if necessary), go around three sides of the bedroom, press a couple of buttons, and go back downstaairs (past the stair gate again). Isn't technology marvelous?

2 comments. (write a comment)

Toddler clock update

Posted 2009n January 19, 2009 at 16:14:31 by chris

As mentioned in an earlier post, we have a night light on a socket timer to let Oscar know when it's time to get up, or if he should stay in bed (and not bother us).

This actually seems to work fairly well. Although there are exceptions, most mornings I now get up at 7:30 when I hear him call out "Daddy the green light's on, Daddy!" Usually when he wakes up earlier he's happy to chat to himself until the light does come on.

Although this works, one improvement would be to be able to adjust the time the light comes on without going into his room. So we're moving towards phase 2: plugging the night light into an X10 appliance module, with an X10 alarm clock (by my bedside).

The first try didn't work very well - it turns out that some power is still supplied to whatever's plugged in to the appliance module even when it's supposed to be off, which is enough to make the (very low power) night light come one partly (enough to be easily visible in the dark) anyway. After a bit of web research it sounds like this is so that the module can turn on automatically when the appliance's own power switch is turned on. Maybe a handy feature, but not what I want here!

The next thing to try is a "second generation" X10 module, which sounds like it may leak less power to the light when off. One's on order, so there'll be another update when it comes in.

No comments. (write a comment)

Peaceful rest

Posted 2009n January 16, 2009 at 15:53:36 by chris

I'm currently sitting on a sofa, with 5 day old baby asleep on my chest, 2 year old asleep in his bed upstairs, and lovely wife asleep on the other sofa. The only noises are from the dishwasher and our noisy cat.

I feel very lucky! I realised this week that if we lived sometime in the past, or some other parts of the world now, the above-mentioned lovely wife likely wouldn't have survived the complication (retained placenta, with about 2 litres of blood loss). A scary thought, which after considering I shall try not to think about.

No comments. (write a comment)

It's a girl!

Posted 2009n January 11, 2009 at 22:00:00 by chris

We now have a lovely baby daughter!

After going nearly 2 weeks past the due date, once labour started it all went quickly. Contractions started at 5am, and she was born at 9:30 at home. No pain relief used other than singing some Monty Python and Jungle Book songs! Yasmin did a fantastic job.

No problems with the baby, but unfortunately the placenta was not cooperative and wouldn't come out, so we had to go to the hospital to get it out after all. A disappointing end, but it just wouldn't have come out.

All in all, well done to Yasmin!

No comments. (write a comment)

Progress bars

Posted 2009n January 09, 2009 at 11:15:00 by chris

Progress bars, in theory, are a nice user interface feature that lets you see how a long task is progressing, and how long is left.

However, than can be done badly. Some progress bars seem to get to the end, and then start again at the beginning, presumably on a new phase of the task. Typically there's no indication of how many times it might do this, effectively making it useless. Software installers and uninstallers seem to do this a lot.

Then there are the time estimates for finishing the task. I recently asked Windows to delete a big chunk of files. It first informed me that it was "Preparing to Delete" (psyching itself up?), which took a minute or two with no progress indication at all. Then (after confirmation) came the actual deletion phase with a traditional progress bar, and an estimate of how much longer it would be doing this. The estimate spent much of the time counting up rather than down. I'd hope, given that it spent so much time "Preparing", that it could use that preparation to do a better estimate.

As a software engineer I do have some sympathy; it's certainly not necessarily easy giving a meaningful progress indicator, and many jobs do take an unknown time to finish. In some cases, though, I think a Throbber would be more appropriate than a progress bar.

1 comment. (write a comment)

Automatic updates

Posted 2008n December 12, 2008 at 23:32:58 by chris

A lot of software these days seems to include a means to automatically update itself. This is good for fixing security issues (hopefully) before they become a big problem. However, there are some things I find annoying:

  • First, on Windows, this means you end up with dozens of separate programs running just to check for updates, and occasionally popping up windows asking if you want to get them. Windows is slow enough without yet more things running. (On most Linux distributions, it's all done through the package manager so typically only one thing has to check for updates)
  • And worse is when you're asked to read through and accept a long list of terms and conditions. Surely either:
    • The terms and conditions haven't changed since when you installed the software originally, so it's just a waste of time having to read through them again
    • They have changed, and you're then asked to agree to new conditions just for a bug fix (which is important to have, if it's a security issue). "Sign here or maybe your front door won't be as secure as you once thought it was."

Either way, I'm not very impressed!

1 comment. (write a comment)

Cunning division

Posted 2008n December 07, 2008 at 22:13:09 by chris

I recently needed to go from a pointer to an element in an array of one type, to the corresponding element in an array of a different size. The function I wrote was something like:

struct A *b_to_a(struct B *b)
    int offset = b - array_b;
    return array_a + offset;

which looks simple, but does have a hidden division (by the size of struct B, in this case something like 240, ie not a power of 2, to get the offset as an array index). Division isn't ideal on the particular platform I'm using; there's a fast integer multiply but slow (function call) division. However the compiler was more cunning than I was, and produced something like:

uint32_t temp = (uint32_t)b - (uint32_t)array_b;
temp = temp * 0xeeeeeeef;
offset = temp >> 3;

It turns out that multiplying by 0xeeeeeeefhas the effect of dividing by 15. Ok, I thought - think of it as -0x11111111, so multiplying it by 15 (0xf) gives -0xffffffff, or just 1, and being linear that means that multiplying by 15*N will give N. So it's a neat trick that works for factors of 0xffffffff.

After further thought it turns out the trick works for any odd divisor, ie which is coprime with 232 - and the rest can be handled with an extra shift. The magic number is just the multiplicative inverse, mod 232, of the divisor. The only catch is that if the input isn't guaranteed to be an exact multiple of the divisor, the result is gibberish.

I thought it was cute.

No comments. (write a comment)

Toddler clock engineering

Posted 2008n December 04, 2008 at 13:56:16 by chris

Oscar, our two year old, has an annoying habit of waking up too early, generally about half an hour before our alarm. You can't complain too much - how is he to know if it's 7am (getting up time) or 6am (too early), when it's dark outside either way?

So I thought what we need is some sort of clock that can tell him whether it's time to get up or not. During the half hour of listening to him complaining this morning, we came up with several ideas:

  • Build a device (say using a small PIC, which I have handy in the workshop) which which would turn on a little LED at 7am. Simple, but would take some time to develop. More complicated once you want to be able to set the clock and wake up time.
  • Modify a clock radio we don't use much - tap into the alarm circuit to switch on a small light. Probably takes less time, though there's a shortage of sockets in Oscar's room.
  • A simpler version of the first idea - an even simpler device with some kind of serial (RS-485?) interface which could be controlled by the NSLU-2 under the stairs. Wiring isn't a problem as there are spare RJ45 points both in Oscar's room and under the stairs, which could be connected together at the patch panel. I'd need to build an RS-485 adapter for the NSLU-2 end as well.
  • Might be able to use one of the old mobile phones I have lying around. They should still work in offline mode without a SIM. Would need to work out how to get them to turn on the screen backlight at the right time and brightness, though.

As I was designing ever more complicated, flexible, and overengineered solutions, each requiring more time to implement than the last (and time is not something I have in abundance), Yasmin came up with the simplest, most optimal solution:

  • A night light and one of those socket timers.

It's simple, effective, quick to implement, and free (if we can find those socket timers...). The perfect solution, and no software or soldering iron work needed. (Darn!)

No comments. (write a comment)

Text editor spam

Posted 2008n December 03, 2008 at 20:55:34 by chris

Someone has kindly contacted me by e-mail offering "Your Happy life with Vi. - only for 1.15 usd". I wonder how much they'd want for Emacs?

No comments. (write a comment)

Slightly less hypocritical

Posted 2008n December 02, 2008 at 22:57:07 by chris

Of course that makes it a bit embarrassing that this weblog is only currently available in reverse. Better fix that...

It's now fixed.

No comments.

Why blogs are annoying

Posted 2008n November 30, 2008 at 23:17:27 by chris

I have two main problems with "blogs".

The first is the common name (and even worse words like "blogosphere", which makes me cringe every time). That'll probably mostly me being acting old - why make up new words for things which already have them? I expect I use new words in other fields which make others cringe.

The other is that they're backwards, with most recent at the top. I read from top down, and in chronological order.


1 comment. (write a comment)

First post

Posted 2008n November 28, 2008 at 23:29:03 by chris

Welcome to this weblog. Or maybe it's a journal or diary, take your pick; I think "weblog" is the best of a bad lot (no, I don't like "blog", though that seems to be the common word for it these days). I have had a relatively public diary/journal in the past on the Monochrome BBS, way back before anyone started saying "weblog".

Why am I doing this? Take your pick:

  • I fancied having a go adding the capability to the website
  • A way for family/friends to know some of what's going on, as I'm not good at keeping touch
  • Somewhere to put (what I think at the time are) interesting thoughts
  • A feeling of self-importance at the thought of other people wanting to read (and comment?) on what I say
  • Somewhere to witter on to someone about things my family have no interest in

More than likely it's just the latest toy which I'll forget about soon when the next toy comes along.

Things not to expect here:

  • Me spending hours a day or week adding things here. I won't have time, especially with a new baby due in a month.
  • Anything particularly interesting. It's pot-luck.
  • Attractive site design. I'm not a web or graphic designer, I'm a software engineer - user interfaces aren't my area. But I'm open to suggestions on improvements to how it looks or how accessible and standards-compliant it is.

No comments.