Wednesday, June 28, 2006

Coastal - Halfway to you

I thought I'd mention this record, as it's absolutely brilliant.
This is wonderful slow-core, and any comparisions with Low are superficial at best. Yes there is both a male and female vocalist, and, yes, they do interact in the same way, but the song structure is completely different, being based around short, melodic loops, rather than the more traditional structure that Low follow. In essence, I'd say they're more like Empress than Low.
This album has a spaciousness to its sound. The whole things swathed in reverb, but rather sounding like it was recorded in an aircraft hanger, it creates a wonderful warmth.The whole sound makes me think of sitting in the cool shade on a hot summer day, with nothing to do but listen to the animal noises.
Go out and buy this now. Or better yet, get it from my favourite online record store (that is genuinely independant)


I had a little look at Erlang over the weekend. I was inspired by some articles on which I found through
I've not done functional programming since Uni (apart from some XSLT, and that required some deep thought), and I don't think I really appreciated it at the time.
I'm not converted (yet), but there are a few concepts that I really like.
For example, I was debugging a (non-functional) program yesterday. Essentially, it was calling various functions (in some cases recursively) to build up a string. All these functions changed class level variables, rather than each function returning the bits to add onto the string.
The debugging was complicated because I had to step through each function because any function could append something to the class level variable.
It wasn't pretty. (I count this abuse of class variables - basically using them as global variables.)
What would have been better is if the functions returned the string to append to the class level variable, and one controlling function dealt with this.
So, instead of this:

var importantString = '';
function a(i) {
if ( i < 10 ) {
importantString += '' + i;

function b(i) {
importantString += ',';
a ( i + i );
it should be this:
function a ( i ) {
if ( i < 10 )
return '' + i + b(i);

function b (i) {
return ',' + a(i);
I realise this is a trival example, but by eliminating the global variable, it makes it a lot easier to find problems, and to test. For example, we can expect a(1) to always return '1' + whatever b(1) returns - if we replace b with a mock version, then we can test it really easily. Similarly, testing b become equally as easy.
In Erlang, variables are immutable so we cannot recreate the first version The second version (easier to test, easier to debug) , therefore, becomes the way to do things.
I'm not saying you can't write some terrible code in Erlang, or with functional programming, but I wanted to demonstrate how features in one language can be usefull constructs in other languages.

Friday, June 23, 2006

Windows PowerShell

Apart from having a crap name, this is quite some tool [link].
Eg: I can add a registry value like this:
new-itemproperty registry::\HKEY_LOCAL_MACHINE\Software\CDS -name test -type string -value "monkey"
Or I can stop the service that I'm developing without having to remember it's stupid name:
gsv ePIMS* | Stop-Service
There's a steep learning curve, and the WMI stuff is huge, but I think it's coding to be worth the effort.
(oooh, and just to clean up: rp registry::\HKEY_LOCAL_MACHINE\Software\CDS -name test)

Monday, June 19, 2006 Greasemonkey Script

Abe Books is a great site, and I far prefer it to using other large, american based, online booksellers' sites.

However, their site is a little basic. For one thing, it doesn't show you a total price (price + shipping).
This GreaseMonkey script fixes that.

Sunday, June 18, 2006

Scafell Pike

View from the top
View from the top,
originally uploaded by b3ardman.
Had a nice short break (Friday night, Saturday and came back early this morning) away with Mike + Cate, who I've not seen for a while. Met some of their friends too, who seem really nice.
Saturday we walked up Scafell Pike. None of us were really prepared, and, in fact, Paul left his boots at the cottage, and had to go back and get them. Andy also insisted on carrying his 2.5kg tripod up there too.
It was a steep walk, and Amy, Tamsin and myself soon struck out in front.
We got to the top in about 4.5hours, and then spent about 3hours getting back again. The others took a bit longer.
Both Amy and I are absolutely knackered today.

Friday, June 16, 2006


Do a Google Image Search for Mikey.
What's that first result about?

Running again

Did 60/60 again last night. Amy wore the gizmo and we noticed that her heart rate pattern is completely different to mine. Her heartrate went up to about 230 bpm tops, whereas mine only got up to just over 200.
This was the first time we'd been running after doing yoga the previous day, and I struggled. My legs were very sore.
Amy's got some proper running shoes now, and she was loving them, even thought they are a bit girly pink. She was suprised how much difference they made, and I was reminded that I really struggle when running for the train in my work shoes.
Overall, we ran at a steadier pace, but we actually went slightly further (only 0.02 miles/32 meters), and considering the extra effort it was for me to get going, I think we did quite well. I was noticable easier that saturday, when we started doing 60/60.
We're in Keswick on saturday, so if we do go out, it might be for 60/60 again. I think our hosts are planning a long (ie all day) walk, so we might not go running at all.
Side note: type 0.02 miles into Google. Brilliant.

Wednesday, June 14, 2006

Running Diary: Entry 8

60/60 again, for 20 minutes. Was a bit cooler than saturday, although did start off a bit quick. Have new toy (GPS + Heart Rate Monitor), which is suprisingly informative, and has meant that I can do away with carrying my phone.
Told me we'd covered about 3K, along with average speeds for each running session, as well as showing how my heartbeat peaked whilst running, and dropped back down again before we set off again. Of course, the Training Center software is the most usefull way to see all this.
More exciting is the prospect that it can be used to pace ourselves in the future, so we don't start off too fast, or so that the heart rate stays in a certain zone. Also, being GPS, it can guide us home if we get lost.
It also shows how many calories you've burnt, but I hadn't set it up properly.
I'm quite impressed, even if it does seem to need to find the GPS signal every time you turn it on (which takes a minute if you stand still, or much longer if you don't).

Monday, June 12, 2006


Not meaning to be a captious pendant, or to blog about grammar, but...
There's a sign outside the pub, up the road from where I work, which says: "C'MON ENGLAND".
I say this, and did a double take. What does this mean? Surely it couldn't mean "Come on England!" (for the Football World Cup that's apparently going on), as that would be abbreviated "C'M' ON ENGLAND", or perhaps "COM' ON ENGLAND!".
The only thing that I could think it could mean is "Common England", which doesn't make any sense...although, the pub is The Three Legs, which has a bad reputation, so I wouldn't put it past them.

Saturday, June 10, 2006

Running 6 + 7

Thursday - 20 minutes of 50/70secs. Very hot. Very sweaty, as the heat was mostly hummidity.
Today - 20 minutes of 60/60. Managed to get out early, before breakfast. Was hard work, but we both made it through. And we got noticably further down the canal.

Wednesday, June 07, 2006

I'm not always right..., I should probably say, I'm sometimes right, but often wrong.
A number of friends, who I worked with, but they're more than 'colleagues', anyway, I digress. We've been trying to arrange what has become an annual camping trip in Edale. In an email that was sent to all of the interested parties, I nonchalantly asked one of them (Chris) what 87 is in base 9.
He, correctly, replied 106, but another person on the list (Pete) replied 96. Chris called Pete a retard (for which he almost immediately apologised), but that's just Chris' nature.
Anyway, I, mistakenly, told Chris that Pete was right. I honestly thought he was. It took Chris to point out that you can't actually have 9 in base 9 before I conceded that I was, in fact, wrong.
Chris has won some lettuce for being right.
Anyway, I suppose I just wanted to point out that I'm not always right, and I should check my calculations before running head-long into something.
Oh, and I need to remember about number systems too...You don't have 2 in base 2 (Binary) do you? Am I some kind of retard?

Tuesday, June 06, 2006

Running Diary - Entry 4 + 5

Been better at running than keeping the diary.
Saturday and yesterday - 50 seconds running, 70 walking, 10 times. Also, did a 4.5 mile walk on Sunday that took in a 250m ascent. The running is more challenging, as expected, but I'm managing it. Amy's starting to struggle a bit. Hard to know what to do, as I want to move forward, but don't want to push Amy too hard. Going to do 50/70 again on Thursday and see how it goes for next saturday.

Thursday, June 01, 2006

Running Diary - Entry 3

20 minutes of 40 seconds run, 80 seconds walk. Was fine, and so was Amy. In fact, I found it a bit easy, so I did an extra sprint at the end.
What I mostly wanted to write about though was iterative design.
Before the first session, I wrote a little program for my phone. Basically, it allowed you to enter two numbers, one for run duration and one for walk duration, and then it would play a sound alternately after the run duration and the walk duration. Exactly what I needed.
However, after the second time out, I discovered that I don't always hear the sound (what with moving my arms about when I run). When this happened, there was no easy way to get back in synch, as there was no easy way to tell when the sound meant run and when the sound mean walk.
So, for the second iteration, I've changed it, so there are two distinct noises. The run sound is an octave higher than the walk sound. Also, just to be extra sure, my phone now vibrates at the end of each period.
The second version is a great improvement, I didn't miss a single alert, and I still just have a simple program that alerts me after the run and walk times.
I don't think I would have guessed about making the phone vibrate if I hadn't have been out a few times. This is the power of iterative design. I made something, I tried it out, and then I improved it. I'll keep doing this too. One idea I have is to make it so I only have to enter the run duration, and then it will work out the walk time ( given that it's a two minute cycle ), but this isn't a big deal at the moment, the alert thing was.
Perhaps, when I can run for the full 20 minutes, I'll need to make a new program that alerts me halfway through a run, so I can turn round and head homewards, and then at the end, so I know when to stop. I'll probably get a wrist watch with a timer on it for this though...