Tuesday, September 08, 2009

Sun is shining, weather is sweet



Huh. I'm in a good mood. Have had a few of these recently. How curious. I blame the fact that, er, things are going a bit better these days. Or are they? Maybe it's all smoke and mirrors, but I'm not going to spend too long dissecting that. Instead I'm just going to ramble in a "fuck it, I fancy writing a blog post for the sake of it" way about how shit's going.

I got a job! In a bizarre twist of fate, while explicitly searching for permanent work and using the search term "no agencies" I stumbled upon an agency advert for a contract. But I recognised the language in the job description, feeling sure I knew who the employer was. So rather than go through the agent, I contacted a few friends who confirmed my suspicions. A few emails and a job interview later and hey presto, I am back at Yahoo!, 17 months after leaving -- an event which itself took place around 17 months after I had first attempted to quit.

Anyone who's known me for a while or has randomly decided to read old posts on here will know what happened in 2006. But fuck it, I'm in the mood for a recap.

I had a pretty fucked up summer that year. My job turned to shit, my missus of almost 7 years left me, I went to my first ever international football matches (in fact, they are to date still the only ones I've seen) which just so happened to be at the World Cup, one of them being England getting knocked out by Portugal. BASTARDS. While in Germany I started this blog! And when I came back, I attempted to quit Yahoo! (a job I'd started in September 1999). I say attempted because I actually got talked into staying, in a completely different role. But as I'd already booked a cheer-myself-up epic round the world fat cat business class holiday, we all agreed I could disappear for 2 months and come back fresh.

That holiday started exactly 3 years ago today. I had a one way ticket to Gibraltar, with the RTW ticket waiting for me at the BA desk at the airport. I'm not going to say too much more about what happened then because I wrote fucking loads about it at the time. Go look at the posts for September and October 2006. I think I'll do so myself, actually, because I really enjoy reliving that holiday (and I enjoyed writing about it as much as doing it). But ANYWAY.


Huh. Lost my flow now. Fucks sake. What was I going to say? Oh, that was it, yes, so, I'm back at Yahoo!. In a Groundhog Day style thing. And it has made life better. I really love working here. Most of the people I worked with when I left are still here, sat round the corner, including my ARCH NEMESIS at table tennis. The Diet Coke may have risen in price by an infinite percentage, being 40p instead of free, and I may have to go all the way to the 3rd floor to get it, but that's OK. I guess. There's no canteen, but that just forces me to go out into the west end at lunch, oh no! And the drinking is as hard as ever. It's not a good thing that I now mean hard as in difficult as well as copious, but I'm sure it's just an extended "welcome back" phase we're all going through. It'll calm down, I'm sure, especially as Christmas approaches. Hmm.

I love the working environment too, specifically (for the sake of this paragraph) the fact that I can listen to music all day every day with very few interruptions. This is a consequence of (a) having a boss in France, so all communication is done over instant messenger/email (b) having very little interaction, for the work itself, with anyone else in this office (c) everyone else doing the same and most conversation being done over IM anyway. Such has been the nature of my job for most of my career, but I did go through a lean couple of years where there were loads of interruptions and meetings, or just a different management/co-worker style, which meant it didn't really happen. Ironically enough I felt most unable to listen to music all day while working at a fucking radio station. GRR. But anyway, now I can listen to music it's all awesome.


Before I went to Australia in June/July I started ripping all my CDs, from scratch, into a new bit of kit I'd bought. With my mood ever-so-bastard-slightly different when I returned from that trip, I never got back into the hang of it, but now that I'm listening all day to my own music (streamed from home) I'm back into "wait, I own [such and such] and want to listen to it, and I've not ripped it yet!" mode so it's all kicked off again. I spent over 7 hours ripping stuff on Sunday, lots of Ps Qs and Rs -- it seems that back in the day I vaguely alphabetised my collection! So behold, it's all Pussy Galore and Repulsion and Public Enemy and Pearl Jam this week.

Actually, no it's not, it's all kinds of stuff, but those are some of the things I'm reacquainted with. And I'm going to, er, acquaint other people to them(!) because my DJing is BACK. Or at least it will be, when me and ex-colleague Mark get our shit together and make a podcast or two full of all kinds of eclectic choices and mindless banter. We've had to almost stop talking to each other on IM or down the pub in case we use up all our jokes and anecdotes which would be better off left in the show, hah.

Christ, this is a ramble and a half, huh. I should probably head out to get some lunch soon. Except I've just had a delightful pop-up reminder that there's a meeting in 3 minutes. Bollocks.

So, just quickly: my new xbox is great. I like the Batman: Arkham Asylum and WET demos. Also Wii Sports Resort, House Of The Dead Overkill, and EA Grand Slam Tennis on the Wii are great. And I still rock so hard at Guitar Hero. At the weekend I played Shortest Straw on Guitar Hero: Metallica, difficulty level 'hard', and only missed 20 notes. TWENTY NOTES.

Not everything's great. Some really good mates of mine are individually having really hard times of it at the moment, and I've not been much use to them. I've bottled out of attending a few bashes here and there due to fairly powerful but hard to articulate feelings of not wanting to turn up. There are people I've been promising to catch up with and/or go visit and not doing so. I'm single, and my ex's cats are still living with me. And Gregg's in Surbiton doesn't stay open until 4am like the two branches in Nottingham city centre. But this paragraph is making me miserable, so I'm going to stop.

Sunday, July 26, 2009

My awesome summer of 2009

I'm having a FUCKING GREAT summer. Yeah, really. Or not. I know a bunch of it is pissy little shit that shouldn't matter, that I'm incredibly fortunate to be able to afford the financial side of what's occurred, and that bits are my own fault, some even directly. But fuck me what a fucking soap opera, what a series of varying strength metaphorical kicks in the fucking face I am taking. This sucks.

  • I got made redundant (fine, this was my choice, and I got bribed for staying as long as I did. And I had some savings, and a plan for the summer, and didn't know I would be desperate to fill my days with work just to drown out everyfuckingthing else)
  • I bought Guitar Hero: Metallica and it was delivered with a broken guitar so I had to send it back
  • The light switch in my living room caught fire and I had to fork out for a sparky
  • Hellfest ended with a £225 visit to a French hospital, all thanks to a poxy fucking mosquito and an over-zealous first aid doctor. Saw no bands on the 3rd day and had to spend the following week dry
  • I went on holiday with my missus who I hadn't seen for 9 weeks or so. And I got dumped, if not actually on my birthday then in essence (I think it was actually on my birthday, though). From a relationship that was NEVER in trouble, to my knowledge, until that fucking day
  • My 6 month old niece was thoroughly non-plussed with me
  • I spent the entire bribe I got (see: redundancy) on coming home 9 days early from what obviously turned out to be a predominantly fucking awful holiday
  • The cats brought in 8 mice and birds, in various states of being, in 7 days
  • I'm not 100% crazy about having the cats here, or Ruth's stuff, and I'm not going to get an "I've made a terrible mistake" email no matter how much I (think I) want one. I'm also really fucking miserable about being single, especially having basically been single since March/April WITHOUT EVEN KNOWING IT.
  • I've spent the best part of 3 hours, on and off, on the blower to Sky convincing them to send someone round to fix my signal issues. Paid £65 to get an engineer out who not only couldn't do the job, but left me with no signal instead of just a bad one.
  • I am being fucked about/ignored (for weeks on end) in the recruitment process of what started off looking like a promising new job
  • My fucking xbox 360, the number one time-killer I have left in the house, is fucking fucked. SYSTEM ERROR E71 followed just by a whole lot of buzzing that seems to mean I AM FUCKED SO GO PISS AWAY YET MORE MONEY LIKE WATER ON A NEW ONE WHY DON'T YOU. My 360 is both games console and DVD player.
  • Several of my friends are having a shitty time of things too and I'm doing a terrible job of being any use to them
Huh. I'm in a fucking AWESOME mood about life this morning. I could really do with a way of making PORK more popular, or even pay. I could do with getting a job and a woman. I could do with dropping another 15kg. But mostly I could just do WITHOUT ALL THIS SHIT.

Thursday, June 25, 2009

Heathrow to Suvarnabhumi

Went to the gate as soon as it was announced. As with the rest of T3, it was a zoo, this time full of teenagers or young twentysomethings all off to, as far as I could tell, Thailand. Not really surprising I guess, given the airline and destination: Thai Airways flight TG917 London Heathrow to Bangkok Suvarnabhumi.


The best thing, in fact the only good thing, about getting to the gate early, is that they did early boarding for Royal First, Royal Silk, and people with gold cards. Business class is Royal Silk, and that's what I was booked in, thanks to having forked out ~£500 and half the miles I'd spent the best part of 3 years accruing with BMI. I always feel privileged and lucky to fly in such comfort, but yesterday this feeling was topped up with a significantly high amount of snobbish fuck-me-glad-I'm-not-in-the-same-cabin-as-those-fuckers. Early boarding gave me the opportunity to stride past them with a huge sense of superiority (or, OK, shuffle past them, a little put out by all the "why's he going up when they've called the posh people only?" stares I was getting). Either way: win.

Upstairs on a 747 is so cosy. Every time I've been there (once with Cathay Pacific, a few times with BA, and now once with Thai) I've loved it. It's kind of better than business class because it's such a private cabin, in which you never see anyone else. I felt out of place. Not in a I-don't-belong-here kind of way -- I got over that ages ago -- but more in an "oh, everyone else is Thai, and the staff are speaking Thai, and in fact the staff and the punters all seem to recognise one another" kind of way. I think there were only 2 non-Thais, me included, amongst the 26 passengers. Eek! So there's no reason why this should really have surprised me at all, it just felt more ... foreign, than, say, Singapore Airlines or Cathay Pacific.

I certainly didn't see what was so funny about the guy dishing out champagne having a Chinese name, but it caused semi-uproar among some passengers.

My bag didn't fit in the overhead compartment. I blame Jeremy Kyle. In fact it almost didn't fit in the one between the seat and the window either, and JK had to come out so I could squash it in. In the compartment behind that one I spotted 3 huge Boeing 747 Schematics manuals. Ace.

Aircon was either off or broken. It was sweltering. I had a couple of orange juices and a very cold hot towel (which also happened at the end of the flight) and settled down to check out the entertainment magazine. Unfortunately mine only had the cover, not the actual pages. Oh well.

The entertainment system -- including the giant projector screen at the front of the cabin -- was stuck in soothing music and map display mode while everyone boarded. Much better map than on BA, including the 3D pilot view of win (though, sadly, not an actual camera out from the cockpit). And while I had to make sure my seat remained upright with my footrest folded yadda yadda yadda for take-off, I availed myself of the in-seat massage button. It lasted AGES. I'm sure someone else I flew with in 2006 has a similar thing. Cathay? Qantas? Someone in that part of the world.

The headphones Thai give out are SHIT. Really really bad. I had to have the volume at maximum to have any chance of hearing all the dialogue in Frost/Nixon; after half hour or so I gave up and plugged my own in, and the difference was astonishing. It's only a pair of £30 noise-isolating JBL things, but bloody hell. I turned the volume down to almost the minimum from then on!

Frost/Nixon itself was preceded by a short video about wellbeing in the air. All that stretch your legs, roll your neck, draw circles with your ankles, etc etc stuff. Presented by a wacky cartoon character called STAN THE EXERCISE MAN. A real "what the fuck?" moment, that -- but not as bad as the laughable dubbing in the film itself, where Kevin Bacon clearly says "fuck" or some other disgraceful curse. What I heard was someone completely different, about an octave higher, say "If you cheat us on the 60 per-cent" before KB took over the rest of the sentence. AWFUL.

Didn't see all the film. Fell asleep. Saw the ending, not sure how much I missed though, I think about half hour. A combination of being really tired, not having had much Diet Coke, and the Thai business class seat being preposterously comfortable meant I actually, for the first time ever, didn't see a complete film on a long-haul flight. I tried to watch Anchorman -- which the system said is 191 minutes long, really!? -- and fell asleep half hour in, waking up as it was finishing... so I started it again, and did exactly the same thing. FAIL. Or alternatively, win, since sleep is actually what you're meant to do.

Ah yes, the seat. It goes flat, but not 180 degrees, so there's a real sliding-forwards danger. I avoided that. It also felt comfortably wider than BA's business class seat. I could look up the actual seat pitch etc, but instead I'm going to go "yay, I'm smaller than I used to be!", or something.

At about 7am UK time, I felt a buzzing in my pocket. It was my phone's alarm going off. Oops. By "my phone", I mean the second handset I've brought with me, having bought a Vodafone SIM just before so I can do texts and calls in Australia for a pittance. At home it had been sitting on the side with its battery out, but now that it's back in it remembered there was an alarm set... and it wasn't on silent mode. Thankfully I caught it before, as far as I could tell, anyone else noticed. Though they may have noticed the fat western bloke flinching like crazy and playing with a mobile phone. The upside of this incident was that, well, it woke me up, around 5 minutes before the crew were going to anyway: it was time to serve the pre-descending-into-Bangkok meal.

I've turned the alarm off now.

The cabin crew were wearing different uniforms when serving breakfast. What the hell? Seems like a lot of effort to go to. Sure you might want to change into something fresh, but something actually different? Nice touch I guess.

When the staff were making an announcement, the monitor said PA IN PROGRESS. Without much of a gap between PA and IN. My leg's fine, ta.

Wednesday, June 24, 2009

Surbiton to Heathrow

My cab turned up on time. The driver even knocked on the door! Nice bloke, drove a strange route but got me there quickly enough. Heathrow T3 is a fucking ZOO, and strange things were afoot at entrance D -- people just wandering up and going in, but one special queue for one airline in particular, not sure which. Maybe Etihad?


Anyway it's a horrible, shabby terminal. I checked in at the Thai business desks which used to be the Singapore Airlines desks -- I know because Ruth checked in there last year. I'd already done it online, with baggage, all the way to Australia, despite the website telling me last night I hadn't done the second leg.

The first security question I was asked was "have I asked you the security questions?". Nice. Got directed to Lounge B near gate 11 after the formalities were over. She'd said "You know where the lounge is?" to the bloke in front of me, but not to me, just straight out with the directions. Possibly he had status with Thai Airways on his boarding pass, but more likely he looked the part while I don't. BASTARDS.

Up to departures and another scrum. Fast track was merely faster track. In 2006 I had this down pat -- all metal out, shoes off, laptop out, straight through, bingo. These days I'm clumsy and stupid: dropped me laptop, prepared to take shoes off without noticing that no-one else was doing it (ie, we didn't have to), and I left the m2-to-USB-stick adapter in my pocket which set the bloody alarm off. Grr. Tiny little thing had to go through separately again while I was putting my belt back on.

Sent a message to twitter (and therefore Facebook) before I even got the lounge. As if anyone expected anything different.

This lounge has self-service beer -- like all* business lounges. Better yet, this lounge has self-service beer taps. I've been in one like that before, the AAdmirals Club in Tokyo Narita. That was better, in that I was allowed a beer when I was there. But I'm on antibiotics now and being a good boy. Bah.

Cold food. The little potatoes of varying colours in the potato salad are olives. And we have to eat with plastic fucking cutlery! At least there are cheeses. Diet Coke from a tap, not mixer-size cans, is an improvement over many lounges. My laptop still works (for now?). Despite epic extra emergency expense of last few weeks (sparky, health treatment, € exchange rate at Hellfest) a tiny part of me was hoping it was broken, as an excuse to buy a VAT-less new Macbook Pro in Dixons Tax Free. But that would have been financial suicide: I don't have a job, nor the means with which to live without one for longer than a couple of months. Less, if I'd bought one. This thing'll have to do until I get a job offer.

Yesterday the doc said "not ideally" when I asked if I can have a drink while on these thrush pills. That's not an outright refusal, right? And she at least said I could have one or two on my birthday. Would it be really bad if I had one or two between now and then? Possibly. It is, frankly, stupid to chance it. I have shit skin and a skin issue for which I am being medicated. Best carry on being the good boy.

Best go. Laptop says 19 minutes of battery life left, and history tells me it means I WILL DIE ANY SECOND AND YOU WILL LOSE EVERYTHING YOU'VE WRITTEN. Forgot the plane-socket-adapter too, so this is it 'til Bangkok probably. Oh well. Maybe I'll go have a dri...FUCK IT.

Friday, June 12, 2009

Doing shit offline

I was just thinking it was cool that I'm already the 3rd hit, at the time of writing, for "do shit offline" when searching on Google. But then I snapped out of it. Yes, my generation game post yesterday was about websites, but not all software engineering is about the web. The stuff I bang on about needn't spit out HTML or PHP or anything of the sort. I have an mp3-fixer-upper (mentioned below) which spits out a shell script. That's because these are just software engineering techniques (patterns, if you will) for generating lots of similarly structured output from minimal input: lots of unique data, but comparatively few templates.

I work as a software engineer whose career has mostly led him to working with websites; I do not work as a web developer. And despite currently being on the dole, I figured I might as well pimp some software that helps with doing shit offline, huh. These are 2 projects I've been intimately involved with as both developer and user.

r3

Yahoo!'s r3 is ostensibly an internationalisation/localisation tool, but to my mind its real power comes from the fairly complex, at first glance, inheritance path concept. This brings object-oriented techniques to file generation, and there's the key word: r3 is first and foremost a file generation tool. In go templates, out come files.

I was one of the core engineers on the team which developed and maintained r3's predecessors, which were internal CMS tools at Yahoo!. I had fairly heavy involvement in some of the architectural and design discussions and decisions made during r3's genesis, and was the sole internal customer representative at the team's first "next steps" planning etc session 18 months later. I'm quite a fan, even if the public docs aren't quite up to scratch.

pork.py

This is something I knocked up in Python in the last couple of months. I even blogged about it before. So much for "don't repeat yourself", huh? It's a simple script which marries YAML to a template, and creates some output. The output can be STDOUT or a file, and 4 template engines (of sorts) are supported. It's meant to be standalone, but deliberately usable as the central pivot of a get-some-data, produce-some-output, put-it-somewhere pipeline. In fact, when used this way you don't even need YAML - just a couple of python dictionaries. See my mp3-fixer-upper for an example of how.

Thursday, June 11, 2009

The Generation Game

Let me tell you a story (or "lie", if you prefer). In 3 acts.

Act 1

I live on a roundabout. Like that bloke who lived on a roundabout, or the fella from Parliament Square. And I'm famous. People come up to the roundabout from one of the 5 roads, and before they make their way round it they ask me my name. But I'm mute, so I have to write it down on a sign for them and hold it up. They read it, and go on their way, so I throw the sign away. But then someone else turns up on another road, and I have to get round to them and do the same thing.

It's really very tiring, writing my name on signs over and over again all day. The worst thing about it is the traffic around this roundabout flows very slowly, and people get annoyed at how long it takes to drive round me. All they want is to know my name, but they have to wait 'til I've told loads of other people before they even get to ask. I've even heard that a lot of people just aren't even bothering to come my way any more.

Act 2

I still live on a roundabout. People still drive up to ask my name. But y'know what? I've got a couple of mates now. No-one's interested in them, which is good, 'cos it means I can just get them to write the signs for me. They write about 25 and then have a rest. Now, when people drive up to ask me my name I just take one of the signs out and show it to them, then throw it away.

It's much better. I get to tell so many people my name now, way more than before. It's still not perfect though -- when one or both of me mates is ill I have to scramble around as before. And once 25 drivers have come and gone, the 26th one has to wait ages while a sign gets written for them. But still. I'm loads more popular!

Too popular.

The council gave me a second roundabout. And a third. I'm a tourist attraction. So now there are people driving up to three roundabouts, and I've had to draft in a lot of introvert mates. And every time 25 people have gone past one of the roundabouts my mates have to draw another 25 signs. They're getting burnt out. I'm going to have to start paying them (more).

Act 3

I haven't got many mates any more. Just one, in fact. Got 10 roundabouts though, and well prepared for any more. I had a bit of a brainwave, see.

Me and my mate made 50 signs. And we attached them to posts, facing the roads at each roundabout. So now, when people come up, they can ask my name but it's already there. Right in front of them. Sometimes there's an accident and I have to replace one, but in general it works a treat.

People don't even need to ask me the question any more, and if I change my name, well, I only need to tell my mate. He can make some new signs. And he doesn't take much looking after.

The analogy explained (in case it wasn't obvious)

I used to be a fully dynamic website. Database queries on every request. I had a bit of traffic. Not much though.

Caches were my friends. They're databases, and I still had to do queries, but smaller and faster ones. But I had to maintain the databases which just duplicated the data I already had. And they kept emptying and coming back to ask the main database the same query as they asked half hour ago. They needed a bit of looking after.

I'm now a damn fast website. I get through a lot of traffic. My one companion is a generator/publisher. It prepares stuff in advance which doesn't change, and just places it there, right in front of all the traffic. And if I get twice the traffic? He can probably cope. Five times the traffic? Maybe then I'll need another one.

The moral

Seriously, just do shit offline. The Q in SQL is for "query". Like question. Why would you want to ask the same question multiple times if you know the answer doesn't change, or changes rarely -- and, crucially, if you know when it changes? Why even use a cache if it's only going to expire, and you need to maintain both the databases and the code which populates them? Moreover, the code and database are there to do nothing but store exactly the same information as you already have. What happened to "don't repeat yourself"? Is that only for code?

The master/controlling source of a website's data (eg a CMS for a media site), knows when data changes, so just push it out. Not to some intermediary - again, why bother? Just push it out all the way to the front. Generate it. Build it. Publish it.

I'm not arguing for no dynamism in websites. I'm just saying look, make the dynamism appropriate. Base it on the user, their behaviour, their request, or whatever -- but not on the things you already control. Changed your name? Don't wait for someone to ask you, get it out there before they even ask.

Want to know a query whose answer rarely changes? "What's the main body of the content at URL /2009/06/fail/?" One which changes regularly? "What's the most recent bit of content on the site?" Just think. about which parts of your site, and which parts of each page, actually change based on some kind of external input, be it the time and date, some facet of the current user, or some other unique facet of the individual request. You can do more of those, and provide more functionality, if you generate/build/publish the stuff that you control.

Do shit offline. Capiche?

Saturday, May 16, 2009

GPS cocks

Hot on the heels of PORK and Did someone say pub?, here's my latest bit of extra-curricular online action. It's juvenile, it's big, and it's clever: it's GPS cocks.


The premise is simple. As I say on my twitter profile, I consider myself to be a 1974 vintage London native who is yet to mature. That is to say that I've retained a juvenile sense of humour (aided and abetted by a Viz subscription). So when, the other week, my mate Nige set me a challenge for a walk to spell out a word, I took that ball and ran with it. And turned it into two balls and a shaft. I decided to scribble a virtual cock on the landscape.

The Cerne Abbas Giant may have got there way before me, and this guy may have been drawing things with GPS trails for years (and taking it all very seriously), but as far as I can tell I am a pioneer in the fledgling scribbling-genitals-with-technology-like-a-schoolkid-on-an-exercise-book space. I'm also giggling a lot.

So, behold, gpscocks.com. Buy a GPS (from my Amazon store ;-) ), log your tracks, and send the parts which look like parts to me. FAME AND FORTUNE AWAITS.