Shell programming: Iterate through the results of find

Posted on

Iterate through the results of find without messing around with IFS

For my own reference really.

find $in_dir -type f -name "*.cpp" -print0 | while read -d $'\0' file
    @echo "$file"

Not done much in the way of shell programming before, I'd usually use something like Ruby for this kind of thing. Unfortunately I'm becoming increasingly intolerant of boot up time cost for tiny shell scripts so I'm having a dabble with something quicker.

Initial impressions are it's quite antiquated; overly fussy syntax and doing . That aside though it's also plenty powerful and with a bit of effort you can do most things and yep, it's very quick.

GLSL validation Script

Posted on

I've had to write some GSL recently. Quite enjoyable but the I'd set up a pretty awful development loop. Edit the shader, run the game and then deal with any syntax errors the in game compilation phase come up with.

It's a slow way of doing things. So I spent a -little- bit of effort to compile and check errors for this stuff during my build stage. Details on how to do it below.

It's made things a lot quicker and best of all picks up errors that I was currently missing and would likely not work on all OGL drivers.

Here We Go

A bit specific to my project BUT it's been useful for me in this project so thought it may be worth sharing.

Takes a few GLSL files, concatenates them and then uses the excellent glslangValidator to check for any errors. Any errors are translated into a vim friendly output format.


  • You need to specify the type of shader you're validing
    • -t vert or frag
    • Geometry, tessellation and other shader types probably work
    • But I haven't tried them :D
  • Forces #version 150 to the top of all files
  • Assumes path of glslangValidator
  • But that's all easy to fix if you want to
  • It's my first bash script
  • So it's probably shit :)

Might add this kind of functionality to glslangValidator, it seems like something that would be generally and genuinely useful.



function usage ()
        cat <<- EOT

Usage :  $0 [options] [--]

-t|type [frag|vert]
-h|help       Display this message
-v|version    Display script version



while getopts ":h:v:t:" opt
case $opt in

        usage; exit 0

        echo "$0 -- Version $__ScriptVersion"; exit 0   ;;

        echo -e "\n  Option does not exist : $OPTARG\n"
        usage; exit 1   ;;
esac    # --- end of case ---

shift $(($OPTIND-1))

if [ -z "${typ}" ]; then
    echo "You specify a type of either frag or vert"
    exit 10



echo "#version 150" > $tmp_file

for f in $@
    echo "#line 0 $file_num" >> $tmp_file
    cat $f >> $tmp_file

err=$(./bin/macosx/glslangValidator $tmp_file)

if [ "$?" = "0" ]; then
    exit 0
    for f in $@
        err=$(echo "$err" | sed -e "s|ERROR: $file_num:|$f:|g")
        err=$(echo "$err" | sed -e "s|WARNING: $file_num:|$f:|g")

    echo "$err"
    exit 10


Posted on


An actual holiday for us today :) Off camping in Crieff. Well. That's probably overstating it a bit, we're going for the more lazy glamping option at Comrie Croft and rather middle classly staying in a nordic woodland kata:

It's only for a few days and we have had some time down south earlier in the year (which was great) but this is our first break where we've no obligations except to have a nice time for a good while.

And Charlie's very excited. A brand new "big boy's" sleeping bag coupled with his own camping lantern has seen to that.

Mysterious ECONNREFUSED with net.connect in Node

Posted on

Hit a minor gotcha playing with Node on the Mac recently.

In an app I'm working on I'd set up a simple Lua repl you can telnet into and it works fine. I've got an idea for making an application specific repl using Node Webkit so I started to write simple node to connect to my application repl:

var net = require('net');

var port = 6502;
var host = 'localhost';

var socket = net.connect(port,host, function() {
    console.log("Sending data");

    socket.on("data", function (data) {
        console.log("received data");
        console.log( data.toString() );

socket.on("error", function(err) {

Only it won't connect. The lua code is pretty simple and binds to localhost:6502 as well, it works fine with nc or telnet but no beans here. All I get back is a connection refused JSON packet

{ [Error: connect ECONNREFUSED]
syscall: 'connect' }

It turns out that the lua socket code I'm using will set up an IPV6 socket when I bind to 'localhost' while net.connect will try and connect via IPV4. Telent and NC don't care and just detects the type of connection to rightly use.

The solutions are either change the node code to bind to '::1', IPV6's localhost equivalent and connect via IPV6 or changed my server code so it binds to Both work and I went for the latter.

There's a lot of things at play here and I don't which one of the many components (if any) aren't playing sensibly. Should localhost always default to IPV6? Should net.connect try and establish an IPV6 connection if it can't make an IPV4 one? I dunno, I'm pretty new to this but it chewed up enough of my Sunday to want to write it down in case anyone else had the same woes :)


Posted on

A little bit late to the party but I hooked up an XBOX ONE at home this weekend. It's pretty good! I really like the voice interface, it's incredibly spooky selecting, playing, pausing and watching Netflix by barking out commands. And it seems to have an anti griefing feature: my boy cottoned on pretty quickly and tried telling it "XBOX WEAR MUMMY'S BRA". It didn't wear mummy's bra. Or pause, or stop of go home or do anything the boy asked it to do. Phew!

No gamez though. No ones I like anyway. Had a quick blast on Killer Instinct. Beautifully made but not really my type of thing. But I am looking forward to Titanfall. Had some enormously good times playing Call Of Duty 4 a few years back and it'd be nice to return to team based blasting with the added bonus of some Crackdown-esque agility. And mechs of course. Great big filthy mechs. Everyone loves those yeah?

Victor Meldewing

Posted on

Sometimes I'm an idiot, I may have been one today. Or fully within my rights, it's kind of hard to tell but here's a quick story of minor modern annoyance.

I went into Stormfront (the oddly named Apple reseller in Dundee) and tried to buy a £20 iPad stylus. I had some money on me but it was in the form a £50 note so that's what I tried to use. I was being served by Myles Green who then tried to give me change in the form of 30 one pound coins. I was in town to pick up my bike and really didn't fancy the ride home with 30 quids worth of shrapnel in my cycling jacket pocket.

So I asked for my money back. And this is where it got a bit weird.

Myles: "I can't do that"  
Me: "What?"  
Myles: "I can't do that because it's on the system now"  
Me: "I want my money back"  
Myles: "I can't actually do that, I'd have to get authorisation from my manager, he's not here and I'd have to call him"  

Awkward silence and then Myles goes out the back to make a call. He comes back.

Myles: "Okay I can do that"  
Me: "Great"  
Myles: "I need to take your details to do a refund"  

This is where I could be accused of being awkward I guess. I really object to retailers insisting on harvesting my personal details. There's no benefit for me at all and the potential downside of the information being shared to what are often known as "spamming cunts". So at this point, already miffed that at 10am a fairly biggest shop has two tills each without a single £5, £10 or £20 note, I dig my heels in.

Me: "I'm not doing that"  
Myles: "What?"  
Me: "I'm not giving you my details I want my money back"  
Myles: "I literally can't do that, we have to have customer details to issue a refund"  
Me: "You can do that, you opened the other till to check for change, you can open this till and give me my money"  
Myles: "That's a different thing, I literally can't do that"  
Me: "You literally won't do that"  
Myles: "I can't do that"  
Me: "You mean you won't do it, you can physically open that till and give me my money back"  
Myles: "I can't give you a refund"  
Me: "You can open that till can't you?"  
Myles: "That is an option open to me yes"  
Me: "Can I speak to your manager"  
Myles: "He's not here"  
Me: "On the phone"  
Myles: "Okay"  

Paraphrased of course. There was some stuff about their stock system not letting him do it and a bit of pompous "I know my rights!" from me and a bit of quibbling over what constitutes having actually bought something. He phoned his manager and then gave me my money back saying there was no point arguing about it, something I completely agree with.

I then went into Starbucks and bought a green tea and some almonds with a fifty pound note.

Man alive. I hate this desperate data-scraping in shops. Retail is kind of fucked as it is, on-line purchasing is already super convenient and friction free and the only competitive advantage a shop has over a web site is the customer experience.

So fuck em. I totted up in my head that I've roughly spent a couple of grand in there since moving to Dundee around 5 years ago. No more though.

Colours Working Properly in Vim under tmux on Linux

Posted on

I couldn't get my colour schemes looking nice in Vim under tmux and it took me a while to sort it out. Here's what I did. Using:

The steps are:

  • Get tmux running in 256 colours
  • Add some stuff to your Vim start-up
  • Select an appropriate colour scheme

I'm kind of a newb at messing with this type of thing so would be keen to hear about any errs, omissions or inefficiencies :) This is mainly a record for me and maybe helpful to anyone else with similar noob levels of experience trying to sort out a similar problem.

Get Tmux Running in 256 Colours

First of all I needed to get tmux working in 256 colour mode as is it was only running in 16 colours and was the cause of every Vim colour scheme I tried look very horrid. How did I know the amount of colours tmux was using? There's handy Perl script called which you can get here. Running it gave me this:

When I should be getting this:

There's a number of solutions on the web that involve changing the term type in your .tmux.conf file. I had varying success with these and found the easiest thing to do wasn't fiddling with the tmux configuration file but launching tmux with the TERM environment variable to something 256 colour-ish:

TERM=xterm-256color tmux

And then I got the right output from Phew!

I didn't want to type TERM=xterm-256color tmux every time I wanted tmux so I added this to my .zshrc file (.bashrc if you're running bash I guess)

alias tmux="TERM=xterm-256color tmux"

Add Some Stuff To Your Vim Start-up

Vim needs to know there are 256 colours for it play with so you need to tell it in your .vimrc. That's pretty easy, just add this line:

set t_Co=256

Select An Appropriate Colour Scheme

I have a shit load of Vim colour schemes installed from some bundle I got from here :D What I didn't realise is not all of them will work properly in Vim as they were designed for Gvim. To find ones that did I type:

:colorscheme *256<TAB>

And I get a list of all the schemes designed for 256 colours. A bunch of schemes without 256 colours in the name work as well but it's a bit hit and miss whether they do.

And here we are using wombat256 :)

Why Do This? Why Not Stick With Gvim?

Gvim was getting a little bit slow for me from time to time so I was hoping that using the terminal would be a bit nippier. Is it? Yeah a little I guess. What turned out to be a bigger advantage was being able to keep together a bunch of shell processes together as a session I could attach and detach from. I'm currently doing some hobby coding with ClojureScript and to develop for that I need to be running:

  • Vim
  • cljs compiler auto-building any files that change
  • http server
  • Irc (obviously)

They're all terminal apps (I use irssi) and this makes it easy to have all of them running nicely together in split windows as per below. There's no http server on that screen. It's running as part of the tmux session but as I don't need to see it's output very often I just run it in another window.

Saw Tooth

Posted on

My mum came to visit and I've fallen off the health wagon a bit. No exercise for a 3 days, quite a lot of eating and a concomitant weight gain, back into the 13 stone mark. Back on it today though. I've adjusted my running plan to reflect the missing days and put the end date a week later. I'll do a couple of slow, extra runs in the meantime. Ooof.

Have I learnt anything? Well....

  • It's not just my mum visiting, I could feel I was kind of nearing burnout
  • The exercise load has been pretty heavy with running, cycling and strength training
  • But I feel pretty refreshed right now
  • That there's a pattern to the amount of energy I have and the effort I can apply
  • And the trick is to not lose heart but get back into it and improve over time
    • Bring the frequency pauses in plan
    • Decrease the pause duration
  • And that may be happening already, I've had a pretty good run of hard(ish) core exercise and diet
  • With 4 days off
  • And full of vigour to get back into it today :)

At these kind of junctures in the past I've stopped paying attention to my diet and exercise. So this week is kind of a big deal, I need to show I can stop for a few days but get back on the horse in full force and effect for at least a couple of weeks. So some actions for today:

  • Go to the gym (Workout A)
  • Fast
  • Ride

Run tomorrow. Long slow with zero expectations of pace or achievement

Creating a Feedback Effect is Pretty Simple

Posted on

Someone asked about video feedback effects for a computer game. It's a powerful tool that can produce amazing effects in the hand of a master but the core principles are really simple. These are the notes I wrote :)

Feedback is a loop where you have a current state and an operation on that state to create a new one. Audio feedback is a good example. The current state is what's going into the microphone and the operation is the audio being amplified, coming out of the speakers and then going back into the microphone.

If the input is silence and the operation adds no new content then the output is silence, not very interesting. Add some input and you can start a feedback loop where you don't need to add any more input but your initial seed will cycle around. If the feedback overloads you can end up with the system getting overloaded

The trick to feedback is tweaking the input and operation so it doesn't overload but gives you an interesting effect.

This is generally how audio effects work; deary, reverb, chorus or flange are all examples of feedback loops that are carefully constructed to produce feedback loops with interesting outputs that don't overload to a screaming howl.

And you can do the same with video. You actually do this in analogue pretty much the same as audio by pointing a video camera at the same screen it's outputting to. Pointed at a black screen isn't very interesting but if you introduce just a little input into the system you'll get interesting patterns generated. The light travelling through the camera and onto the screen gets corrupted by being quantised into transmissible information and those corruptions end up being magnified with every iteration. It's like taking a photocopy of a photocopy of a photocopy.

So doing something similar on a computer is kind of easy. You just need a couple of off-screen buffers, a shader to act as the operator and some kind of initial input.

Here's an easy start:

Create textures you can render into - 0 and 1
Clear both of them

    Draw something new onto screen 0 (input)
    Draw a full screen quad into buffer 1 using buffer 0 and buffer 1 as inputs using your feedback shader (operator)
    Screen 1 is your feedback texture you use in the main game

    Draw something new onto screen 1 (input)
    Draw a full screen quad into buffer 0 using buffer 1 and buffer 0 as inputs using your feedback shader (operator)
    Screen 0 is your feedback texture you use in the main game

goto loop

Feedback Shader

It has two texture inputs: last screen and current screen and you merge these two together.

Here's an easy one, a simple scale and blend where you take the old screen, scale it slightly, blend with the new screen.

It's pretty easy:

  • Read a texel from the current screen
  • Scale the UVs by a small amount (1.01 for example)
  • Read a texel from the previous screen using the scaled UVs
  • Blend them (try 0.9 of current screen and 0.1 of last screen)
  • Return blended pixel

That should scale the texture from one of the corners as UVs run from 0 to 1. If you want to scale from the centre then you need to subtract 0.5 from the UV co-ordinates before scaling and then add 0.5 back before doing the texture read from the previous screen.

I'll try and find some code this weekend but that's the basics. You can put all sorts of fancy stuff in the shader. It gets fun when you operate on te colours as well. You really need a few input parameters that you can tweak as it's easy to overload the feedback and end up with a white screen. The interesting stuff is where the various parameters and inputs add up to something that's just on the edge of overload. You get all manner of interesting shit then. But to get that type of thing you need input parameters you can tweak and a way of saving off interesting effects.

Exercise for Wk Starting 2/12/13

Posted on

I'm giving myself a silver medal. Good week all in all. Had a great time running, some nice cycling and back to the gym again.


Not a bad week. Felt pretty good and did a surplus 10km run on top of the every other day outings I'm currently working on.

Had some good runs this week. My pace is starting to creep up and had some good fun with a couple of fast / tempo runs. And back to some hillier courses too. Last Tuesday's tempo run was a lot of fun in particular:

I just had a blast :) 5 minutes warm up / warm down either end and a temp run in the middle of 20 minutes. Really good, managed 5:06km/m for the main drag. A shade off of the sub five I was really after but it's all going the right way. Feel much better now after a day of sloth on Sunday

I'm having to juggle when I'm running a litte right now, the morning darkness makes it harder to juggle longer runs with needing to get the car back in time for Suzie to take Charlie to school. So I've varied my shcedule a bit and run in the evenings and afternoons as well.

The weather hasn't been all that helpful. Thursday saw Dundee battered by some ridiculous storms, violent to the point where I opted for the bus rather than cycle in. I put off a morning run and went out at lunch time instead. It was fun but:

Just returned from an absolutely ludicrous lunchtime 10km with a 5 minute warm up that wasn't even slightly warm. Horrendous wind against me running up Riverside Drive towards the tech park. I didn't have my jacket and it was nippy as fuck. Running back at least the wind was with me but got kind of enveloped in snow storm half way back to office. Ridiculously cold after, understandably a shit time but I'm glad I did it and feel really pumped now :) Legs aching a bit, hope I'm okay for the gym tomorrow morning :)

I wasn't okay for the gym :D

The week ended well though with an extra curricular 10km outside of the trainig plan I'm on bringing me up to just over 30km in total. Feel good and strong and that my form is coming back nicely.


Yes! A return to the gym! I want to increase core strength a bit and build my legs. It's all stuff to support my running really. This is the plan:

  • Start slowly
  • Limit to 45 minutes per session with 3 sessions per week
  • Concentrate on full body exercises
  • With an aim to gaining some strength that'll support my running

It was fun: squats, bench and hyper extensions. I kept the load low and thought I'd been pretty sensible. Unfortunately my body disagreed and the rest of the week I had pretty bad DOMs in my legs. They're gone now, I kept away from the gym but will go back next week. If I keep on it'll all be good.

Weekly Round Up: Stuff I Have Liked

Posted on

Hey! It's easy to moan on about things that didn't happen or you weren't keen on but here's some stuff I actually liked.

Lastpass Great multi platform password manager. Spent quite a bit of time and effort trying to get the relatively expensive 1Password working well for me. No dice: No Linux client and frequent corruptions sharing the password database via Dropbox. So far Lastpass does everything I need on all machines I use, is easier to use and free. What could be wrong with that? I'll probably find out in the next few months :D

No cursors in Vim Took the plunge and disable cursors keys in favour of the HJKL home key cluster. I'd be lying if I said it hasn't been tricky but has turned text editing into a fun puzzle game :D

Being recognised as Charlie's dad This was ace :) Had to go to the gym to renew my membership and after just getting through the door someone asked me if I was Charlie's dad because I "looked a lot like him" :D Sure that should be the other way round but was a great moment.

Lift Used this before, based on Seinfeld's don't break the chain productivity strategy and it's being really useful. Great mobile and web app.

WebGL Demo This is lovely and a good indication of the way the wind is blowing in web development.

Signed a Contract Can't talk about it but a definite highlight :D Very happy. One more to go

Tabularize Vim plug in for aligning text. Makes building tables in Markdown a lot easier. Nicely designed and well thought out

Practical VIM and Here and also here. Both made by Drew Neil and a great source of hints, tips and Vimspiration :)

New Keyboard A bit sad how happy this has made me. It's very clicky and I love it :D

Week's Running

Posted on

Good this week all in all; 3 runs and all really enjoyable. A bit of cold hanging around from last week and some trepidation before Monday's run but then Daft Punk came on and all worries melted away. In the 30 minutes I managed just over 6 kilometres with an average pace of 5:45 per km. That's okay for intervals and the 10km on Sunday helped me get through without being utterly knackered and or losing decent form.

Another steady run and Wednesday's 40 minutes went well. 5:24 minutes per kilometre on the main run and the last kilo came in at 5:21.

Friday's tempo run left me pretty happy. I managed to do both of the two ten minute segments at around 4:50 minutes per kilometre pace. V happy considering how miserable the weather was. Didn't feel too knackered after either. Completely possible to hit the 4 minute 50 seconds per km pace for 5km at least. Still wouldn't be as fast as I was at peak but it's a goal that seems reachable right now and an important step to a sub 23 minute 5km. Keep on truckin'!

All in all good though. I think that Sunday's run will see the second week of running course complete pretty easily closing in on 30km in total with okay times. Only 6 more weeks to go. I think I should do it. The last try saw me hit the buffers after 4 weeks. Let's hope I can do better this time.


Monday's run is interesting Will track how my intervals shape up. Here's a goal, get every 3 minute sprint under 5 minutes per km. First try and 2 out of 6 qualified. I need 6 out of 6 :)

Addendum Just back from a great run to Carnoustie and back, Sunday's 40 minute steady. Wore my zero milimeter drop barefooters so my calves ache now. Still in the middle of session just over an hour managed to put in a just under 54 minute 10k. That's great, 4 minutes faster than last week and a good pace for a steady run. Happy with progress :)

Misc Health

  • Cold at the start of the week, all gone now
  • Fasted twice and quite enjoyed the sharpness of mind I seem to get. Is it placebic? Hard to tell. The feeling is reel though
  • Have eaten pretty well all in all with a few days feeling absolutely amazing
  • Seem to be coming off a weight stall.
  • Around 180lbs - would like 177lbs for next week

PS Vita Time

Posted on

Yeah! I'm pretty excited about this, managed to snag the works Vita for a bit. Very much looking forward to the fantastic looking TXK from Llamasoft but that's a little way off. More immediately there's the fantastic looking Tearaway from Media Molecule.

It looks great, a lovely unique graphical style with some great gameplay trwists. There's a lot of games that fall into that bucket so why is this grabbing my attention? Mostly because of Alex Evan's involvement, one of Media Molecule's founders. He's one of those people who are an amazing collision of creativity and technical skill who initially made a bit of splash on the demoscene. And what I love about the look and feel of Tearaway harks back to those times, you can see similarities with one of his earliest works, the fantastic 64k demo paper:

Lot's of similar themes there and great that this is a furrow he's still ploughing. I have the Vita, now to get the game :)

Won't Someone Please Think Of The Haters!

Posted on

Something I liked in this CMD - SPACE interview with Dave Wiskus. Worked on Vesper a great instant writing app on the iPhone. Good interview but something stood out in particular about how they started the design for Vesper (paraphrasing slightly here)

  "We sat down and made a list of all the bad things people would be able to say about the app we were building"

That's kind of negative but also not a bad way to start a project :) And they didn't even try and address all of those issues but felt pretty well prepared for the inevitable haters.

I Must Hate Myself

Posted on

Well this is fun, I'm having a go moving completely to hjkl for my movement keys in Vim. Over thirty years of trusty cursoring and I'm bunging them in the vim bin.

Man it's awkward but also been one of the most consistently recommended things to do by every bit of the Vim community. Let's face it, they're smarter than me so let's see if I can push through the pain and reap the benefits they keep crowing about. Reminds me of all the chat about the famed "runners high" you hear when starting out running. It does exist, you do get it and it's completely awesome but there's a fuck tonne of grind you need to do first :)

Weekly Blog

Posted on

I like writing stuff and it's not so much for the others to read but more a way of collating, structuring and analysing my own feelings. Forcing them through the filter of my piss poor spelling, grammar and typing means means a bit more reflection and less reaction which is no bad thing. So I enjoy it, get quite a bit of value out of it but still struggling a bit with the best way to consistently do that. So I'm trying different things and this time it's a weekly round up :)


Pretty good week all in all. Working to an eight week plan that will see me gently increase my running while maintaining the cycle commute to work. In the past enthusiasm has been my downfall and too much too soon has lead to burn out and more recently a bit of injury. So keeping it sensible is the order of the day. Week one complete and I've clocked in just over 20km in the first week; 2 short runs and a longer 10km yesterday. And yeah, lovely running. This time of year is great, I love the cold, crisp thing going on and the Tay is as beautiful as ever.

I'm kind of keen to get some professional perspective on what I'm up to, maybe from a running trainer, so I've asked at the local running equipment shop if they know of anyone. Got a couple of leads so I need to follow them up. Tomorrow it gets less leisurely with half an hour of intervals.

Home Dev

Learnt some Vim from Practical Vim. It's a great book and helping me nudge even deeper into the Vim hole. Moving to this editor has been a great experience all in all. I feel very much at home and have a great feeling of control over the text I'm editing. And yet starting to work through Practical Vim also shows I've a long way to go but on top of that a while bunch of great new skills to learn.

I've also managed to spend some time dabbling with ClojureScript. The last 3 or 4 months I've spent a bit of time messing with functional programming and the path keeps returning to some form of lisp. A while back I also had some fun messing around with web technologies so I've merged those two interests.

Clojurescript derives from Clojure and Clojure is great; a modern day lisp that works on the Java Virtual Machine (JVM). It's nice and nippy and you get access to a shed load of great Java libraries to boot. A key thing about Clojure is its core data structures are immutable by default and as such pushes you quite strongly towards a functional style where you are very precise about state and state management. Something I like

ClojureScript is a subset of Clojure that there are tools to cross compile to JavaScript. You don't get the rich wealth of JVM libraries to use but you can easily interoperate with the plethora of excellent JavaScript libs. You can tell that this is still a relatively you technology as setting up a productive work environment isn't a lot of fun and more than a bit fiddly. And then on top of the hassle of debugging a dynamic language you also have the problem of trying to debug highly obfuscated JavaScript that's been machine compiled from a very different language.

That all said it's still a very fun language to program in. Nicely terse and a great way of expressing ideas. And the core of the code I've written works just as well in Clojure as ClojureScript. That means I can use the JVM REPL to develop and test. Which again is fun.

I've not done much, just got a THREE.js with JavaScript shell up and running and an environment where I can use Vim fireplace to evaluate code in the editor. Going to try and push on beyond setting up a development environment as that's often ended up being the point where I lose interest :D

Must admit though, if I ever ended up doing programming as a living again it'd be great to work in functional languages and in particular something with a lisp orientation.


After successfully passing her exams (with a distinction!) My wife has started a reflexology practise. I've said I'd have a crack at here web site and need to do something for the logo. Luckily it's just thieving someone else's imagery as it her practise if called Foot Club. I just need to nick the Fight Club font and see what I can make with that.

Been messing around with Blender and might have a go rendering something out using that. Not really used a 3D package before and Blender has a kind of notoriety of being a bit of a difficult child. I had a quick try about and it doesn't seem all that terrible, feels like it'd actually be up to doing real work and seems to have a lot less of the awkward sharp corners of something like GIMP. Still it's hard because doing 3DFX is intrinsically tricky.


An exciting week! Well it should be because of the first of the next gen consoles hitting the market here in the UK. What's actually got me excited is Zelda: A Link Between Worlds for the 3DS. Got mine on Friday and need to have a go today. Kind of weird that the most exciting thing game-wise isn't the sparkly technology of brand new super consoles but a revisit of an old game on a hand-held system. Sign of the times :) Otherwise game time has been dominated by Charlie's new obsession with Minecraft on the X360.

It's a bit weird, we'd played it before but it never really clicked with him. He wouldn't touch the controller and at best would just bark out some back seat minecrafting orders. A week and a bit ago he asked out of the blue if he could play it again. Again a bit of back seat driving going during a morning session but I went to work, come back home and all of sudden he's flying around building all manner of stuff. It's great and a joy to see. I know it's sitting on his arse playing games but I'd also say it's an brilliant playground for the imagination in much the same way as Lego is.

Things I've Liked

  • Excellent Douglas Crockford interview on Hanselminutes I love this guy, curmudgeonly, bright and lots of great insights. Some brilliant stuff in here about the shadow now irrelevant technology can cast. You can get it here
  • Return of The Infinite Monkey Cage I cycle and run quite a bit so podcasts are pretty important to me and this one is always great. Brilliant that there's a new series on and that the BBC make it easily available. Ready for download here
  • Reading 59 seconds again I really like this book, a bunch of strategies you can employ that'll change your life! Sounds awful doesn't it? It is in a way but there's a lot of interesting stuff about behavioural changes having a deep impact on your emotional state. The interesting part is most of the claims derive from pretty well respected scientific psychological studies and those make a great read.

Next Week?

  • Keep up the exercise
    • Intervals / 40 minutes steady / 2 x 10m fast / 40 minutes steady
  • Keep at the ClojureScript, can I get something nicely interactive on screen?
  • Push on with Blender, holding page up for Suzie's footclub
  • A load of important work stuff. I mean this takes the priority but something I can't publicly blog about BUT includes signing two contracts. Woo!

Tedious Running Post!

Posted on

Yet another one :D Just over 6km and I purposely kept it slow and steady. Around 5.24 minutes per kilometer, around the same as my first run back. BUT I feel awesome, really refreshed and thoroughly enjoyed the run. To be fair the programme I'm trying to follow is all about a slow start with a series of steady runs to kick off and this is exactly how I should be feeling.

Monday's will be er.. fun though. First day of intervals :D Looking forward to it. Time to cycle into work.

Fun Stuff

Posted on

That was an early morning start with a pleasant surprise :) I'm slowly easing back into regular running and the current plan is to try every other day with a minimum of 30 minutes a session. The order of the day is to pace sensibly, slowly re-build my skills and avoid any injury like the plague.

So today I kept to the plan but counter to expectations my pace wasn't an utter disgrace. 5:16 minutes per km. That's not too bad for me and a good base to build from.

Felt pretty good after finishing. It's half a minute faster than last weeks first run back but unlike then my legs aren't completely fucked. Honestly I was hobbling about like an octegenarian for a couple of days after that :D But today was good, so good I rode in instead of going with original plan to bus to work. Ace!

And best of all? It was a lovely day again; sun was just up, crisp but cold and the Tay looked magnificent. Next run Thursday. There's snow forecast but that don't scare me :)

That Was Easy

Posted on

Wow, amazing. Just registered a domain and got it hosted on Google Apps for Business. In the past this has been a messy experience but the process is pretty nicely refined. I timed it, 12 minutes in total :D Color me impressed.

And the reason? It's a registration for my beautiful and clever wife's brand new reflexology business. After a good few months of hard study she's now qualified and starting to sail the seas of running a commercial enterpris. Maybe I can retire soon :)

Back To Running

Posted on

No achievments with ths run? That's a tad harsh

Pretty happy with that. Nothing special terms of time or distance but it's the first time out since August, nearly three months.

There was a fair bit of trepidation, a good wodge of worry a mid run abort was on the cards if my knee trouble flared up but it was all good.

5:21km avg pace on just over 5.5km and a very comfortable run. Pretty happy with the first km at 5:02km/m and the same pace for the last half a k. Very encouraging. I've a few aches n pains now; upper thighs, glutes and upper calves but all standard rusty runner niggles a few more sessions will sort out. Importantly though my keens feel in rude health. Phew!

As an extra brucey bonus it'd be impossible to pick a better day to ease back in. Cold to point of frost but dry, bright and crisp. The Tay-side easy running route really shines on this kind of beautiful autumn day.

My legs could do with a little recovery time so I'll leave it until Tuesday for another go.

Knee-rely there!

Posted on

Hey! My knee is coming out of the woods, if you pardon the extremely strained metaphor. Yesterday I had a hospital appointment and decided to ride to Ninewells in time for 9:30am. I'd forgotten it's at the top of a hill so the time I got there my knee was playing up something rotten.

Not great. Nor was it playing merry havoc on the weekend. HOWEVER both times my knee has recovered really quickly, same day basically and what's more the normal commute into work isn't causing any issues at all. In fact I'm feeling pretty good and cycling with more confidence and strength on my left leg than I have for a couple of months. Back to running soon, I promise :)

Hello Perth!

Posted on


So every part of this story sounds like I've had a shit time today but nothing could be further from the truth :D Decided to ride to Perth today, it's nearly 50km and the longest ride I've done so far in one leg. Unfortunately I'm an idiot that didn't check the weather forecast or look at the climb involved so the blisteringly cold stormy gale and 20% gradient climb near the was a bit of a surprise. Around 500m ascent in total. It's a lot for me :)

I've been plenty cold before, stuck in a summer jacket at a train station on the outskirts of Toronto in January and brushes with similar sub zero temperatures in Chicago, Alaska and Iceland. The double whammy of flight cycling gear and severe wind chill beat all of those. Utterly horrid. Didn't fancy another 50km of that and took the train for a return journey.

But even so. I loved it. Really really loved it despite a flair up of the recurring iliotibiabl band syndrome that's been hanging around like bad smell recently.


Posted on

Yes. Yes. Yes. Great ride in and despite being against the wind a sub 30 time. I've had some knee problems and it's put the kibosh on running but managed to keep cycling. And in the last few days the power's come back into my left leg and the pain has subsided a bit. Very much hoping this can mean a return to running sometime soon.

Anyways. A key component of what made this ride so completely enjoyable was Underworld as a soundtrack and specifically this track:

Yeah :) Peddling hard and singing along at full below on a cold crisp day by the Tay. A horrendous sight for others I'm sure bit a privilege to be able to start my day that way.


Posted on

Very happy to have got this in the post today, authored by my friend G Penn and starring cast of characters who've been fairly important in my life at one point or another :)

Is This Me?

Posted on

I google imaged searched for MAMIL (Middle aged man in Lycra) and got this. Yeah it's not really pertinent but it's confusing and made me laugh

Wow! Encoutntered my first cycling bellend today. Nice ride from Monifieth to Arbroath and I'm pootling along and suddenly there's a bit of shouting from behind me. Look round and there's some (even) old (er) dude behind me on a fat old mountain bike shouting:

“You're nay beat me on this track!”

So I get out of the way and spend the next mile or so mostly freewheeling. He keeps looking back and can see this. I'm not bothered about passing him but he gets over, looking well out of breath, and agitatedly starts waving me past. So I go past and now he's shouting:

“Getting the benefit of the slip stream then!”

This guy looks like a rugby player and is probably well fitter than me, he had legs like tree trunks, but I'm lighter and riding a bike that in comparison to his tank is barely there. And I wasn't even trying to race him.

I remember when I did the Edinburgh 10km and someone told me to look out for people in the same age bracket as me, they're mostly overly competitive twats and looking in the mirror that's a fairish description of my worse behaviour. But today I got a taste of how annoying that can be when you're on the receiving end. Ooooof!

Maybe We're Not So Rubbish After All

Posted on

Wow. It's easy to have eagle eyes when calling out the flaws and problems in the world you work in but sometimes it takes startling fuck ups in related industries to appreciate the near impossible things that actually get done right.

On the way into work I was reading this article on the New Yorker about the launch troubles of the web portal to help US citizens get reasonably priced health insurance.

This is staggering. Post 9/11 the FBI contracted S.A.I.C to update their information systems from a highly antiquated software suite that didn't even allow agents to share pictures to a system that'd help rather than hinder investigation into big cases. The project was initially scoped as costing $12m. It's not that unusual for software projects to test their budgets but the eventual cost? An amazing $600m. Even worse the project was canned in 2005. Amazing.

In games there's a lot if self flagellation about poor project management practises, antiquated development methodologies. The baseline assumption seems to be everything is wrong and there's likely a better way, maybe already practised in "proper software development"

But that said a 500 fold increase in budget for a system that never shipped? It's a whole new world of fuck up and surprisingly not a unique or even unusual story. Last year Standish estimated an annual cost of large scale failed software projects of $55bn with only 33% of the projects surveyed able to be classed as a success. It's not just localised to the states either; there are massive problems for our own Universal Credit system as well.

Every year the games industry deliver increasingly compels software in a pretty timely manner close to budgetary constraints. And because of platform cert constraints on console the projects delivered are relatively bug free. Improvement is important but sometimes we should also take the time to acknowledge there's a lot of magic being made in our world that the rest of the software development industry would find hard to match

Wind Waker - The Gift That Keeps On Giving

Posted on

Slight update from my last post about this amazing game. Doing a fairly tortuous maze puzzle in a sunken wreck actually had us drawing a map. An actual map. On paper. Amazing. Felt like being 14 again in a good way :D It was scrappy as fuck but I might scan and post it here later.

Games I Can Heartily Recommend : Wind Waker HD

Posted on


Here's a tale, it has no inisghts or big moments and is more a testament to my previous ignorance to excellence rather than the mostly un contented excellence of Zelda. And the particular Zelda? It's Windwaker HD on the WiiU that's a massively pleasurable time sink for me and the boy over the last few weeks.

Just generally it's a bit weird that the majority of gaming hours I've managed to spend recently has been on the least successful of the current crop of consoles. The WiiU has sold the least, has the smallest software library and isn't really seen as a success. Even so on a relatively paltry install base Zelda Wind Waker HD, a single SKU title, is number 7 in the world wide software charts:


You just can't bet against the power of those first party titles; despite constant retreading over old ground they're evergreens in terms of sales and demonstrates the enormous power of proven approaches even if it's at the expense of innovation. Mario, Zelda, Pokeymans and others; they're gaming James Bond minus the mis-steps or Pixar before they did a big dirty all over themselves with Cars 2.


So this is kind of ludicrous, hooraying Zelda at this stage in it's evolution and hardly a controversial point of view but I'm a johnny come lately here and wanted to get down my conversion as much for my own benefit as anything else.

I never clicked with Zelda, N64's Ocarina Of Time was my first exposure to the series and I hated it. The only subject I showed any consistency at school was SPORTZ. Not in a good way mind, just regularly bringing in self penned sick notes in the hope of avoiding it. So Ocarina of Time and all that running around on Hyrule field at the start? Pretty tedious and even worse felt like doing virtual PE. "Unfortunately Gary is not able to play Zelda due to a dicky tummy, Garys Mum" I wrote in my head to get out of it.

That's kind of sacrilegious if you're a gamer and it was pretty obvious a me problem was rather than a Nintendo one. In those cases life's usually too short to bother with things you're not clicking with but I work in games, Zelda releases are generally important. I bought every release, gave theme far from half hearted play and hated them all. There are a few games I have that kind of relationship. It's gaming tax that levied by "event" titles you need to understand to have a shared vocabulary with the world you work in. GTA is another one for me; admirable but not my thing.


Yep I hated them all. Until Skyward Sword. Something changed there but it's impossible for me divine what that was. Ostensibly on the outside bar the addition of wand waving wii-ness there's not a lot new there, the usual Nintendo refinement and shining of their key franchises rather that stepping outside what they've always been. I don't know why but the usual four hours of play brick wall I never previously clambered over just never turned up. I have NO INSIGHT into why this was. Hazzarding a guess it might even be a horrendous contrariness so out of hand it picked an argument with itself :) I dunno. I'm glad though, whatever the reason it's left me with 38 hours of pure gaming delight :)

As for Wind Waker HD, it's been grand. I've really loved playing with my 5 year old son as active observer. He'll pilot the boat on some of the longer journeys but would rather back seat drive when it comes to do anything of heft. And he's been great, lovely seeing him get to grip with new concepts and skills; understanding a big story arc, grasping the idea of extended puzzles and actually make great suggestions that have helped us in quite a few quests. This morning I had a bunch of pre-work prep to do before heading off but when Charlie came downstairs the first thing he wanted to do was get back into Zelda and hunt for Triforce shards. I started to say I'm a bit busy but that went nowhere :D We got 3 more.

So we're near the end and after that we'll try some more. And I know on the next one we try he'll be driving more than directing which is great. I've no problem with him spending time in this world at all.

It's likely to be Ocarina of Time on 3DS next despite some warnings from pals that there's a divisional split between the similar-ish Wind Waker / Skyward Sword and the rest of the series. Maybe I can hold onto a bit of hate after all. Sincerely hoping not though, it's been an absolute delight.


My Five Year Old Is A Game Designer

Posted on

An excellent picture

Wow! Look at that! He drew it a couple of days ago and it contains all of the class game design tropes. There's platforms! There's lava! A beast in a cage and on the right there, that little green door? An exit!

I'm his dad and anything he does I'm proud of. But this time I think it's actually well deserved :)

I Think I'm Back

Posted on

I Think I'm Back

Phew! I feel like I've returned to form after a week of not being all quite there,


Last week was a wash health wise. Monday was bank holiday and I ended up taking Thursday and Friday off. Really they should have been sick days, I just felt listless and energy depleted with some slight sniffles. I did an absolutely horrendous and grinding 10km
at what I thought was an easy pace, it wasn't. Slow and knackering.

That all said if being sick now means still running > 25km a week I'm certainly not complaining.

usual route

Today I feel back on point. Just returned from another long, slow 10km and a bit out of puff but generally feeling tip top. Added bonus is despite not pushing I got the 10km done just under 56 minutes. For the the training plan I'm on the end goal < 55 min 10km and < 25 min 5km so I'm nearly there on the first one with trying all that hard. Bonus :D

Might do a cheeky 5km tomorrow morning and then it's intervals on Wednesday.


Posted on

Strava logo

Now I like Strava, it's a great place for to upload the ridin' and runnin' I've been doing. Something I particularly like is it keeps track of your best times at certain distances. That's pretty cool and here's mine:

my records

Just recently I've been liking it a lot less as the above kept changing to this nonsense:

my wrong records

Man, what's all about? I got an ex-work colleague with an increasingly good 5km time and I needed to know how close has getting to my best. I go to Strava to find out and it's just banging on about BEST 10000 MINUTE. That's no good. It wound me up a bit.

"Gaz, you're such a winger, it's just a bug and it's a free service" you say "stop bellyaching about it". Well the thing is this problem only just started after I actually coughed up the $59 for the Premium service.

I don't mind paying for things I enjoy and find useful, it helps keep them going and IMHO only fair. Honestly, I wish I could have paid something for Google Reader
if it'd meant avoiding what's going to happen to that service later on this year.

So yeah, I felt a little entitled so instead of just grumbling actually submitted a bug and to be honest it's not gone well.

  • First submission and it got fixed
  • And then went wrong again
  • Moaned again, wasn't fixed and the bug was closed
  • Complained and told that tracking issues were closed if it was a known bug (WTF?)
  • And then told it was the fault of my Garmin 110

I used to be a programmer, it's pretty clear that this is an issue with Strava rather than Garmin. Which has left me feeling a bit fobbed off, no idea when this will be fixed or if it's going to happen again.

And the interesting thing is it's paying for the service that's the root my unhappiness. There's nothing much in the way of extra features so it's just a gesture of support on my part. But because I've paid there's an increased expectation and I guess in turn the probability of being unsatisfied goes up as well.

Shit Sandwich all around really.

Live Coding

Posted on

Not made much of a head way with doing my functional game but got a nice setup with clojure to do live coding.

You get the program running, edit some code and then just hit C-c C-c with the cursor over the function you want to be recompiled. And it all works :D Amazing stuff really and really good fun. You can also muck about in the repl. Quite enjoying this.

It's all about 60hz too, the recording is a bit slower as I'm using Quicktime's screen record and this is a Retina machine.

The only downside is it's meant having to learn EMACS but actually that's turned out pretty nice. Learning curve like a cliff but horrendously powerful. I'll have another crack at this on the w/e

Clojure And Functional Programming

Posted on

Having some adventures trying to write a game in a functional manner. I've picked Clojure to do it with so it's meant learning a lot of things and being relatively unproductive for a little while. Is this a useful way to spend my time? I don't, it's certainly interesting though. You join me as I'm struggling to get a productive work flow going in a language I don't really understand using tools I've never touched before :)

I think I'm starting to get there with an efficient work-flow and work environment. It's taking a little hacking to get there though.

I'd got to this point:

  • Installed Leiningen
    • Utility to create and manage a clojure project
    • Will mamage required libraries and their dependencies
    • You can specifiy what library versions you need
    • Will download everything you need, run your project, boot up a repl, etc

This was pretty good but each time I edited a file I was quitting and rebooting the repl. Clojure runs in the JVM and that takes a while to reboot. I don't know much about lisp like languages but one thing I do know is dynamically updating their code is something they're renowned for and I shouldn't be working like this.

So now I've started using emacs and a package called nrepl. It's meant a pretty steep learning curve getting used to emacs but from the quick research I did it seems that no other editor has clojure live coding support anywhere near as good. I've had to learn about:

  • Package installation and management on emacs
  • A bunch of new and horribly obscure key combinations
  • elisp
  • What ido-mode is
  • A bunch of tmux tricks

And it's working really well. Now I can boot up a JVM and instance of my app from within emacs and create a repl that I can interact with. So what if I change my code? Turns out I don't even need to save the changes. All you need to do is ask emacs to evaluate your buffer and any changes you've made will be inserted into your code. It's quite amazing to be honest.

I'm only at the position where I'm making a change and then executing a function in the repl to test my change. It works well. Next up I want the repl to be making changes to a running app.

Functional Programming

There's definitely something the air about functional languages right now. They have the promise of being able to efficiently handle large data sets across loosely connected computing resources. In fact there's already a bunch of applications on the web that do exactly that.

IMHO that's what we'll have on our desktops in 5 years time; a box with a shit-load of loosely coupled but highly powerful computing cores. Shared memory is an illusion we're currently clinging onto and at some point we'll give it up and have to work with computing devices that are inherently fractured in design. We'll need different programming paradigms to be able to do that well and it's functional languages like Clojure, Haskell, Erlang and others that seem to have a handle on this.

This is weird, John Carmack announced he was trying to write a game functionally using Haskell. And the game? Wolfenstein 3d :D Wow. I'll get a lot less done that him with far few insights but it should be a fun journey and I'm really interested to see the path he takes :D

  • Clojure - lisp like language running on the JVM
  • Emacs - *nix editor with a religious following
  • tmux - modern day version of screen
  • leiningen - package manager and much more for clojure. As npm is to Node.js
  • Carmack's exciting news - he's writing Wolf3d in Haskell
  • Erlang : functional yet practical language designed by Ericsson for high bandwidth / reliable telecoms applications
  • nrepl: Emacs excellent clojure repl package

Week Three Done - Nipples

Posted on

Currently into week three of Mike Deibler Running For Fat Loss (RF4L) training plan. 5 weeks to go and I think I'm going well.

Here's the summary:

  • Pretty much back into running - 32km last week
  • Pace is slowly creeping back up
  • Enjoying the long slow runs to help my form along
  • Riding and running feel balanced
  • Losing some fat! Slimmer round the stomach and some weight shed
  • Behind my goals though!

Goals 2013-05-08

Not as far ahead as I'd hoped to be honest. Need to pull my socks up

  • 53% time passed
  • 42% of running distance complete
  • 40% of cycling distance complete


It's only natural that your most recent experience are likely to contribute the most to your general feeling about something. Today's run felt, to be truly honest, a bit shit and left me with an overarching feeling that things aren't going brilliantly. I don't know, it was 10km longish run at 70% effort. It just felt really slow and grindy all in all and made me wonder if I'm on the right path here.

And that's why the numbers are so important I geese. Compared to last Weds 10km, a run I really enjoyed and my pace has improved despite running at the same effort level. Not by much, from 5:51 min/km to 5:42 min/km and today I'd already cycled 45km in the morning.

That's made me feel a bit better. the pattern I'm finding is a great click into good form near the end of the 10k runs where it feels just great and my speed goes up. I just need to be running like that when I start of :D

Maybe I'm getting a bit of fatigue, 32km of running week which is a big-ish step up and it included 3 days back to back. The shorter jaunts were a bit more intensive than last week made up of intervals and for the first time Fartleks.

Ah Fartleks. These were punishing but in all honesty I did enjoy them. It's simple stuff, just run for as fast as you can until completely knackered and then slow to a gentle recovery jog. Rinse and repeat. I put my heart into it and after each quick stretch was thinking "Fuck this for a game of soldiers, I'm not doing that again" but a short way into the recovery run you're think "Maybe one more". It left me shattered but yeah, I'm looking forward to a few more of these.

Only a few minor niggle this week. Niggle number one: nipples. They're stinging like bastards after the longer jaunts. I've had this before and a bit of vaseline on my hairy man paps before going out softens irritation until eventually they're tough enough go out smear-less. I just keep forgetting to put it on. Dummy, must try harder this week :)

Niggle number two was weird, part way through on the 10km runs I got pretty bad hip and knee twinges to the extent where I had to slow down to > 6 min/km pace. It was pretty worrying though I kept at it and half click later everything was fine and not had anything similar pop up since. Really do not want that happening again/


This has been pretty good. I've set a goal to hit 1609km (1000 miles) by the end of the R4L program and seem to be doing nicely. Daily commute plus a couple of Arbroath trips give me the distance I need to hit my target. I'm still enjoying this lots and it really appreciate the chance it gives me to listen to podcasts and music again.

Looking to buy some cycling bits and pieces now the weather is getting better, probably some knee length cycling shorts, a few tops and fingerless gloves. The sealskin ones served me pretty well over the winter but are a bit large and clumsy now.


Been going pretty well I guess. My weight is coming down and it's drifting away from the slight belt of midriff fat I'm still carrying. Aiming for the 12 stone mark and then stay there. I think the previous

First World Headphone Problems

Posted on
fig(i) Imagine this bloke but older, on a bike, with slightly different headphones, a fierce scowl on his face mashing the headphone remote while weavinhg around in dundee traffic leaving a big trail of swears in his wake. Yeah that's me this morning.

Gah! Utterly fucked off with my Sennheiser headphones. Can you help?

Fair warning though, if you don't fancy listening to a middle aged man rant about not being able to hear NERD PODCASTS while cycling then skip to the end


These stopped working today and instead of piping nerdy podcasts into my head started sending random commands down to my iPod. Cycling in the pissing rain and the track is flipping on and off, comically ramping up to double speed coupled Siri sticking its oar in to see if I want something.

Not sure what's caused it but what is v annoying is it's the 2nd time I've had the same model spontaneously break. First time I chalked it down to big handed clumsiness but twice in row? I'm not so sure it's me. They haven't seen heavy wear, just neck draped while running or cycling though the weather's been a bit rough of late.

Now anyone who knows me will also know ill-tempered ranting is a bit out of character. Usually I'm an annoying pollyanna-ish to the point of near inappropriate optimism. But it's nigh on impossible to explain how now I'm running and riding so much how much of a massive shit this would take on my quality of life.

Yet More FML

"Lol, just buy some other less breaky headphones gaz!" Well yeah but it's tricky, I find them hard to come by. Much to my shame I have very odd shaped ear interiors. In bud headphones, they just fall out of my lugs, laughing, at the slightest nudge. I've tried all different size ear buds but the net effect is the same; a few minutes of listening and then PLOP, headphones on the floor and I'm tourettsing.

Of all the headphones I've tried these are the only ones that work for me. When they do work that is.

And speaking of disabilities, I can't even give them the finger.

fig(ii) Fell of the bike a little while ago and now the little finger refuses to cooperate in anything apart from a fucked up version of throwing the heavy metal horns.

So not sure what to do, I love the sound and fit of these headphones but feeling queasy at stomaching the near on £50 to get another pair only to have them break again. In ear just don't work for me. I had some (Sennheiser again) full ear ones which again had excellent sound but stopped working after a few months of bad weather running. I feel less inclined to rant about that, they're DJ phones designed for night clubs as opposed to weather whipped Tayside runs. Even so.

So should I return them? If it is a design flaw then that sounds like a good idea. There's a two year warranty BUT they also require you have a receipt or a delivery note or some proof of purchase to prove they're in the warranty period. Where did I get them from? Duty Free in Edinburgh Airport. And again current experience suggests they'll just break again.

Help Me Plz

In short, Sennheiser have me by the balls and I'm going to buy a new pair unless someone can suggest another make of similar-ish, wrap around headphones with an iPod remote, excellent bass response and that won't break after the slightest of wear and tear.


Fuck Sennheiser Part 2

Posted on

In a previous episode I got the rat's arse with Sennheiser's stupid headphones. Since then, after some clumsy stumbling about during the Great Dundee Powercut of 2013 they're well and truly broken now. So I've fallen back to another pair of expensive sports Sennheisser's I bought a while ago, found unsatisfying and had left in a draw. After a bit of fiddling I found jamming them into my ear canal and then twisting 90 degrees kind of made them stick.

Until today during interval runs of 3 minutes fast and 3 minutes recovery. Trying to leg it fast made the right one fall out so I'm erratically running in short frequency sine waves down the front of the Tay trying to jam in the errant ear bud with a heavy pair of gloves on. I managed it a few times only for it to fall out again and again Eventually out it popped with the rubber bud completely missing.

I'm willing to put my hands up to having mutant shaped ear interiors but this just isn't right. Worse of all despite the casing turning out to be shit for sports they're by far the best sound quality of any of the various headphones I've tried. I wouldn't be ranting away like this if it wasn't for the inevitable upcoming purchase of yet another pair of their shitty "sports" headphones.

In other news the run was pretty good. Yeah it's intervals but even with the warm up, numerous 3 minute steady sections and the above headphone issues I managed an average of 5:19 min/kn. That's great, feeling confident about being able to get a sub 25m 5km again soon :) And I'm feeling a lot better than yesterday. Looking forward to tomorrow's 10km.

Ongoing Running Ramble

Posted on

I felt pretty good today so with the aim of hitting my 30km a week running goal I did 11km this morning.


It's extra to the Runkeeper Programme I'm currently following but I thought that if I took it slow and used the time to concentrate on form rather than speed it could be fun and useful.

And it was. Felt very comfortable throughout, slowed on the slightest sign of weariness and managed to extended out to 11km. Average pace of 5:51k min/km despite it being hampered by the gale like winds on the way out. A bit easier on the way back though :)

As is starting to happen on the the last couple of k and my form really clicked. Effort went down, speed up and felt really exhilarated. Some negative splits confirm that's the case, 5:35 and 5:39 pace for the last two from 5:49, 5:51 for the two previous to that.

In The Art Of Running Faster Julian Goater said when coaching people he'd often place his hand in the small of the runner's back and push from there. He said you need to imagine that you're getting propelled from there as it helps you get your body position right: shoulders open, body upright. If you've form like that it helps you get air more efficiently into your lungs and run more efficiently. I felt like I got that a bit today :)

I'm definitely at a point where the balance between my riding commitments and running now seem manageable as well.

Only downside today was sore nipples. They need to toughen up again :)

Coming Up

  • Long run from the RK plan tomorrow
  • Fartleks on Saturday
  • Completion of Week 3

MCT Oil Then

Posted on

Ordered and received a great big container of MCT oil this week. So what’s that? It’s an oil based around median chain triglycerides that I found out about after reading some internet bullshit about Bulletproof Coffee.

MCT supposed to have a troika of benefits:

  • Easily absorbable as an energy source
  • Doesn't deposit as fat easily
  • Promotes fat burning

It works well with lowish temperature frying or just as a salad dressing. A couple of days ago I had the below and it was incredible.

  • 1/2 avacado
  • Iceberg lettuce
  • Stick of sliced celery
  • 45g of MCT oil
  • 2 rashers of bacon
  • V small dash of Paul Newman salad dressing
  • A few small cubes of stilton cheese
  • Big cup of coffee

Does it work? Hard to tell. I’ve been using for a few days now and it’s definitely coincided with a massive upswing in energy and some steady weight reduction after being on a plateau for a little while. The energy’s lead to a pretty large uptick in exercise but pretty much fatigue free.

Now I have phases like this anyway so it’s hard to say if this is one of those or if the MCT oil is playing a part here. I’ll keep on though, don’t really want to change anything as I’m feeling really good right now and managed to get a few cycling personal records as well :D The only down side so far is it's pretty expenisve, a whopping nealy thirty quid a litre from Amazon. Oh well.

Grumpy Gus

Posted on

Mum flew back south today and driving to the airport meant missing out on a morning run. So I have go out at lunch time and that's kind of left me in a foul mood.

Anyway back now and can I call that a good run? I'm not sure. Let's get the excuses in :)

  • It wasn't meant to be my fastest, just a 20min tempo run post a 5min warm up
  • And it was midday, I hate running at midday
  • Did I mention it was slightly hilly too?
  • And I had to fiddle around with my iPhone, the podcast wasn't playing right!

There we go. The main 20min tempo segment ended up being at 5:14 min/km pace. Which isn't terrible. And the last 2.5km got progressively quicker.

Actually that's not a bad run :D

And of course after this morning's pretty filthy moodI'm feeling all ace again. Looking forward to the long slow 10km on Thursday.

Running / Exercise

Posted on

This week I’ve taken a step forward on my exercise and set some some goals.


I really think I’m starting to understand and appreciate the counterintuitive benefits of running slower to go faster. Yesterday marked the end of week 2 of the RK training programme and was scheduled for a 40 minute slow run. Managed to come back with a 10k after a lovely gentle trot down by the Tay on a particularly pleasant Sunday evening.

The usual Tayside wind wasn’t helpful but it was a great, relaxed run especially the last 3k where my form seemed to really click into place. I think that’s what’s helping me most; not just trying to run as quickly it’s possible to concentrate on form and running as efficiently as possible.

It seems to be working, my speed is starting to go up while effort -seems- to be decreasing. A few weeks back, on a return to running, trying hard delivered a 5:44 min/km pace for a 6k. This run was markedly less effort but gave me a 5:32 min/km with 10k taking around 55m. This is pretty heartening. My goal is < 50m for a 10k. Right now that’s just over 10% increase in pace and it seems completely possible.

The only slight niggle I have is my heart rate. I felt a lot more relaxed than previously but my average heart rate of the 10km was 173 bpm, broadly similar to that of my first run. It’s pretty high as this is supposed to be a 70% HRM run. Not sure what to do about this to be honest. I should probably be around 140 to 150 bpm

Even so I’m pretty happy right now. The run was on top of a relatively intense 45km ride which delivered a PR time between Monifieth to Arbroath. I mean that’s a lot of exercise in one day for me. When I’ve done that kind of pushing before it’s usually left me shattered the next day but I’m writing this now feeling exceptionally chipper devoid of the slight leg / hip / knee aches usually accompanying recovery after a day like that. All very encouraging. Excited to see where I can get to by the end of this programme :)


I set myself a 600km a month goal at the start of April and have now hit 700km yesterday. Quite surprised by this and it’s been a lot of fun. I’ve just commuted every day with a couple of longer rides on the weekend to Arbroath and back and an odd mid week Arbroath trick thrown in for good luck. Not a lot more to say about that apart from it’s been a blast. Might push for 800km in May.


Spent a little time setting some exercise / health goals last week and set a few that come in around the same time as the training programme I’m on, the 2nd of June. I’ve retrospectively set the start date on the running and riding ones to start from Apr 11th when I started running again.So they are:

I need to set a strength training goal as well. Likely going to have another crack at the 100 push ups a day challenge. I got to around 35 consecutive push ups last time I tried. A quick check a few days ago showed I can only do a few over ten right now. I will sort that out :D