Recaps and Random Thoughts

Things have been up, down, left, right (a and start) and any which way else. It’s been hectic, let me tell you.

I’m starting my new job in a few days and am consequently filled with both excitement and apprehension. It will cost me about 10 times as much as my commute costs now to get there each month, which will probably end up actually costing me money, even given the extra pay, initially. The commute is quite long as well and while I’m confident I can do it without a doubt (I’ve deliberately been waking up early and going to bed late to acclimatise myself to the longer hours due to travel) I can’t say I’m perfectly happy about it, mostly due to not knowing the route very well have only done it end-to-end once. Also, I’ve not had much time to practice or find out additional information because annoyingly I’ve been very busy the whole of the time since I was offered the position and haven’t been able to do any research, such as whether or not I can buy a season ticket on the Hythe Ferry.

I’m still pretty cut up about leaving SonicIQ. It was my first full time job and the first job of any kind where I was paid to do what I love, so it holds a special place for me. I’ve wanted to help it grow and become something more and invested a lot of myself in it so leaving it behind is a bit of a blow, especially since the only reason I was looking initially was out of fear the company would fail during the recession. This appears to not be the case any more – as my new job approaches we seem to be getting busier and busier. Typical really. However, I have no regrets. Multiplay looks like it’s just as awesome a place to work as SonicIQ is and I’m excited about starting there, the reduction in responsibility (I wont be managing several servers anymore as far as I’m aware) and the increase in pay helps too. Still I can’t help but feel a little bit bad about the whole situation but oh well, life must go on.

In other news, the last ever LUGRadio Live was awesome, as was OggCamp that followed the day after. Hanging out with a bunch of geeks and learning about cool projects and other things for 2 days straight is about as awesome as it gets. Managed to get some hacking in on some google wave gadgets despite the dodgy wireless.

I probably shouldn’t have gone. A few hours before we left, I went to pick up my new bike. As part of the commute to the new job I will be cycling and not currently owning a bike I’d purchased one at Halfords and was going to pick it up. I haven’t ridden a bike in quite a while, perhaps as much 10 years, so I’m a little rusty as you might expect. Anyway, I grabbed my bike and was a little wobbly at first as I got used to it again but was fine after about 5 minutes. 10 minutes into my journey home though I had quite a bad accident. I basically decided to go down a steep hill, a bad decision by itself but compounded by the fact the hill was coated entirely in wet leaves. Thin road tyre + wet-leaves + 40-ish degree decline hill + me going faster than I probably should with super-sensitive brakes = FAIL.

I lost control and hit the ground. I don’t remember the impact and think I may have passed out for a second or two but I remember skidding down the hill on my side for about 2 or so meters and feeling very dizzy and sick. It was quite lucky really as any slower and my fall would have curved me into the road down the hill where two cars were right behind me. Any faster and I’d have slide into the two lanes of busy traffic at the bottom of the hill. I guess you have to see the bright side in these sort of things. I picked myself up but had to stop shortly and sit down lest I faint. I had a mild concussion and was seeing stars but generally fine. Some nasty scrapes that by now are mostly healed and my keychain was terribly bent so I guess I fell on it with some force. The bike was looking trashed at that point, one brake handle was screwed up, the rear gear assembly was poking into the spokes and the chain was going back on. I was too out of it to do much about it so after a sit down I walked the bike the rest of the way home.

10 minutes of owning it and I’d almost killed myself and probably cost myself a lot of money for repairs. Bloody fantastic. This didn’t exactly inspire me with confidence for this commute I was to be undertaking.

Luckily my friend lostprocess fixed the gear assembly partially by bending it back into place and my brother-in-law Owen applied his epic handiwork skills to fixing the rest of it. It’s more or less fine now, bar some scrapes. I feel nervous going down even the faintest slope though. The bike goes incredibly fast down even the most shallow of slopes under no power but gravity itself. I need to practice my braking more.

After that we needed to head up to Wolverhampton for LUGRadio so we left almost immediately, opting not to go to A&E as I was mostly feeling fine by then. However, being out of it I managed to forget my wallet. Luckily I didn’t need it to check into the hotel. Dru managed to forget her money as well when we went out after arriving at the hotel (which was very nice) so we had to borrow stuff from lostprocess, bytey and darksatana. Despite the seemingly unending chain of fail the weekend was awesome, so that was a plus.

I’m apprehensive about NaNoWriMo this year. I’ve done zero planning or prep work as I’ve been too busy, I’m writing a sci-fi romance and I’ve never really been one to read romance let alone write it. With the new job and the long commute I’ll have even less time to complete it than usual. Considering I’ve failed every year til now and those years were not quite as hectic I don’t see this ending well.

One final random thing before I go. I was composing a poem/song on the way to work in a lullaby-esque style about a man who murder/suicides with his baby son because his wife died during childbirth and he resents him for it. I’ve entirely forgotten everything about it except the tune now, annoyingly. Cheerful mornings as always for me :D

Dynamically Defined Targets for Remote Tasks in Vlad

Typically things like Vlad and Capistrano make the assumption you already know where you want to run your tasks. They assume you already have some servers somewhere ticking over just fine and you want to do stuff on them according to some predetermined pattern.

However, what happens when you want to write some tasks you can run on any remote server? What happens if you don’t have any servers and you want to build some dynamically and then run some remote tasks on them?

Well, I’ve been asking these questions and I found an answer that helped me out and thought I’d share it here.

Using the dependency system of rake and the lazy role evaluation of vlad along with the fact that it provides some very useful public class methods (so they are presumably safe, rather than hacking into the internals with send or the like) I wrote the following simple test script:

What’s going on here is that I have a remote task using a role server which as of yet I haven’t defined. When I run rake server that runs the server task. The server task is dependent on the server_config task which sets up a role ‘server’ with the given string (ideally something like The remote task then executes, evaluating the value of the role, which is now set to the users input, and connects to the server you’ve set at run time. How awesome is that?

Of course, this is a contrived example, you could use a system to setup roles automatically from other things rather than pulling in user input but the lesson to take away here is that is is possible to use vlad tasks on dynamically defined targets easily.