Wednesday, June 24, 2009

Fording the... ox?



So, now that Tim is living in Oxford, I had a sufficiently good excuse to go and visit, and so I did so last weekend. The weather was rubbish, the company was good, and the town is quite pretty, in a more spread-out way than Cambridge. We went to see the science museum (which had lots of surveying stuff), and otherwise just wandered around the place. Um, not sure what else to add to that really.

Monday, May 04, 2009

We came second!

I don't have photos to post yet, but there are more details and pictures at http://www.challenge24.org/2009/blog

Sunday, May 03, 2009

And the contest was... was... I still don't know!

There were technical problems (a fair number of them) during the contest, so the closing ceremony is only at 12. And since the scoreboard was one of the casualties, we still don't know how we did. But talking to one or two other teams, it sounds like we did reasonably well. Details to follow.

Also, I have now been awake well over 24 hours, with more to come. If you feel yourself going a bit squiggly and turning into a 6-foot chicken, do not be alarmed - I am merely hallucinating.

Friday, May 01, 2009

Hungry in Hungary

I'm sitting in Budapest, in preparation for a 24-hour programming contest. And lunch on the plane was a small ham sandwich, so I'm feeling peckish. Um, I don't really have much to add to that for the moment - more news once we've actually done the contest and done some touristy stuff. Tonight we're just going to crash and get a good night's sleep.

Tuesday, February 03, 2009

Don't let it snow...

... I want my flight to leave on time. So yes, life has been exciting, since yesterday England suffered about 10cm of snow, which apparently is the most in almost 20 years. So needless to say, they're totally unequipped for it, and large parts of the transport network including Heathrow ground to a halt. Fortunately, today had no snow that I've noticed and bright (if anemic) sunshine, so it looks like I'll be catching my flight in spite of the 3.5-hour journey from my house to Heathrow (normally it would be around 2.5).

This seems like it's going to be the things-falling-apart trip. Apart from the transport system, I opened my suitcase up to put my warm things in it just before checkin, and when I came to lock it up again I found that my lock had turned into a collection of bits on the floor. All very educational, but not much fun right before flying into Joburg airport which is notorious for baggage theft. So, any luggage thieves reading this: there is nothing valuable in my luggage. I promise. Don't bother.

Then after that, my watch started falling apart as I was checking in. Fortunately the pin didn't fall out and I was able to stick it back together.

Let's hope nothing else falls apart, like the plane, or my presentation on Friday.

Monday, January 26, 2009

The smallest park in the world

I've just got back from Portland, Oregon, from a business trip. I knew absolutely nothing about it before leaving, and I started with assumption of a typical American sprawl with end-to-end freeways and strip-malls. In fact the central part where I was a very pleasant surprise - good sidewalks, very short blocks, a river with a nice green bit next to it to walk along, etc.

It also features the smallest park in the world (Mill Ends park), which I thought was suitably amusing:


I only had one morning of free time (the rest of it being spent in the hotel eating too much food and trying not to get sucked into pointless arguments). Apart from the park, I went to Powell's book store, which is as large as the park is small. Just the SF/F section was about the size of a small public library, and I discovered a lot of books I'd never heard of, and bought a few for an insanely low price.

Sunday, December 28, 2008

It burns us!

For those of you who don't already know, I've spent the last 11 days or so in Cape Town. The first morning I walked outside, squinted, and went "Ah, so that's what sunlight looks like." It made me realise just how sun-starved I've been in the UK winter.

It's been a great time here, and I've been out or seen people almost every day. Sadly, tonight I return to the land of clouds, roundabouts, pubs and 700-year old architecture.

Sunday, November 16, 2008

Code Jam (like raspberry jam, but better)

Normally I blog about my trips while I'm on them (to kill time in airports), but this one was so short I didn't even both taking a laptop. In fact, I didn't even bother taking checked baggage, instead fitting everything for two days into a backpack. That sounds reasonably enough until you realise that it includes a keyboard and sufficient warm weather gear to stand around waiting for a bus in Cambridge. On the way back I think the backpack was about 99% of its theoretical maximum capacity.

The Code Jam itself is a contest run by Google. I've been to a previous one that ran on the TopCoder engine, but this time they've made a new format which really suits me. It's a lot less time-pressured than TC, and also more forgiving of mistakes. Having won my regional and finished in the top 3 in every round, I thought my chances were pretty good, but unfortunately I panicked near the end (partially because I forgot the contest started late and so I had more time than I thought), and so ended up third. Nevertheless I'm fairly happy since I didn't screw anything else up.

Pictures to follow - unfortunately not many or very exciting, since I didn't take my camera to the Googleplex on the assumption that they wouldn't allow photography (and indeed they didn't allow it inside the buildings).

Monday, October 13, 2008

How I learnt to stop worrying and love AMD's shader compiler

Normally I just post about travel and other daily trivia here, but I feel the need to get some good old tech ranting in. So, normal people (i.e. non-nerds), feel free to stop reading now :-)

I've been trying to do some OpenGL development at home, with the ATI X1600 in my laptop, and I've managed to find 3 serious bugs within about an hour. Firstly, my program would just crash while trying to compile a shader. After tinkering with my program for a while to try and eliminate anything I might have broken, I started removing bits of the shader. And guess what? If you index an array with a ternary expression, it crashes the driver.

Ok, I can work around that by moving the ternary into a temporary variable. Fix a few genuine compilation errors, and get to this message:

Fragment shader failed to compile with the following errors:

Well, that's helpful. Would be more helpful if it was followed by a list of errors, as is traditional in such cases. However, by again randomly removing pieces of code, I determine that a loop with an indeterminate number of iterations will cause this. Some hardware doesn't actually support loops (it just unrolls them), so fine, I'll run up to the maximum number of iterations I might need, and just early-out once I hit the number I actually need. Even when unrolling, such hardware normally supports forward branches, since it can just conditionalise the instructions hit by the branch. But not this sorry excuse for a compiler, it just gives me the same error. However, if I wrap the loop body in an "if" statement, it's happy to forward branch there.

Now, I finally have both my shaders compiled, I'm ready to link! It's much harder to make linker errors than compiler errors, although I did accidentally end up not writing to a varying that I was reading and which the linker helpfully complained about. I fix that, and is was well. And if you believe that, you haven't been paying attention. Of course it isn't. In spite of the cheery "Fragment shader was successfully compiled to run on hardware" from the compiler, the linker now asserts that "Fragment Shader not supported by HW". Why not? Well, remember that ternary expression? It turns out that while refactoring it fixed the crash, it's still not supported. It appears that the fragment shader can't do dynamic indexing, at least on varying arrays. So, some more refactoring, to move the array lookup inside each branch of the ternary, and now it all compiles and links.

I haven't tried running it yet, of course. I'm not sure I want to.

Saturday, October 04, 2008

Photos from Montreal





As usual, I'm happy enough to take photos, but very lazy about getting them off my camera. I've finally got a round tuit, so here are some photos.

Monday, September 22, 2008

The South African who went up a hill and came down... a hill?

So, Sunday was see-Montreal day with Neil. A friend of his loaned us his bike, so we were able to cycle around town. Montreal has some great cycle lanes - unlike Cambridge, where it's usually just a demarkated cycle lane, these are actually separate to the road, blocked off by a concrete ridge so that motorists can't park in the cycle lane or cut you off or anything (and you don't have to share it with pedestrians either).

Montreal is named after the local "mountain", Mont Royal. which Wikipedia tells me stands at a whopping 233m above sea level. It's covered in trees and has a very pleasant gravel road that winds its way gently up, which we spent some time going up (on our bicycles), and of course going down. I'll post some pictures when I get the motivation to get them off my camera.

Today until Friday is basically meetings, so I won't have much more to post for a while.

Saturday, September 20, 2008

Pass the fish, it's raining frogs!

Yes, it's another Bruce update! Hasn't happened for a long time, because frankly I haven't done much terribly exciting for a while. Ok, Mike and Carl both came to visit and went punting, but since nobody fell in I didn't make another post (it was close though - Mike nearly lost a right-of-way argument with a bridge, and during a collision Carl fell forward and managed to gets his hands down onto the other punt and push himself back up again).

So, as usual, the update is because I'm travelling. This time it is to Montreal. It's my first business trip, so I'm enjoying being able to use taxis and hotels and so on rather than trying to penny-pinch - in fact I was slightly offended that the room wifi appears to be free :-). Of course, the downside is that I'm not going to see much of the predicted sunny days here since I'll be sitting in meetings. But tomorrow I'm going to meet Neil, a friend studying at McGill, so it's not all bad.

Right, now my body thinks it's 1am, so I'm going to bed. Good night.

Saturday, August 02, 2008

Random mutterings

Well, it's been a few weeks since I posted, and nothing really significant has happened, but I though I'd post anyway. It's been a warm few weeks - in fact last week was somewhat unpleasantly muggy (I guess like Durban but 10 degrees cooler). Of course, I then made the mistake of suggesting that friends from London should come to visit, and it promptly started poring with rain, and the train lines closed for maintenance.

After getting back from Cape Town, the next weekend was a mad one in London with Carl for the 72-hour ICFP programming contest. This year the problem was to control a Martian rover as it navigated around boulders and craters and 14-fingered Martians. It was a great time, although I didn't enjoy the problem as much as last years, and there was absolutely no feedback on how we rated compared to other teams.

Since then it's mostly just been slogging away at work (although I did get promoted) and doing programming contest stuff. The Google Code Jam is running at the moment, which is an interesting new format.

Monday, July 07, 2008

I came, I saw, I got rained on

The good news: I spent a week in Cape Town and saw some people I hadn't seen for months (unfortunately not as many I would have liked). The bad news: it's rained almost the entire time, and I barely saw the sun. Everyone accuses me of bringing the bad weather with me, but actually it was a glorious few days in Cambridge just before I left. Worse news: it looks like I will, however, be bringing bad weather back with me.

No pictures, unfortunately - there wasn't much picturesque, what with being inside out of the rain the whole time.

In other news, Terminal 5 is pretty much as I expected: well planned out in terms of being quick and pleasant to check in and minimal hassle at security (apart from the first metal detector I've been through that considered my wrist-watch a threat to world safety), but shops aimed more at the jetsetter than a low-budget geek like me.

Friday, June 27, 2008

The Java Embassy

Today at work somebody mentioned seeing that somebody at Sun had the job title "Java Ambassador". This lead us to thinking about whether there is a Java Embassy in London, and if so, how it would work. I've expanded on that to bring you an alternative to that old classic, how to shoot yourself in the foot:

Java embassy: let's say you work in the embassy and want to adjust the height of your chair. Chairs are immutable, so instead you order a completely new chair, which is higher than your old chair. When it arrives, you leave the old chair lying around. Eventually, when the building is too full of chairs, work stops for the day while the garbage collectors go around and throw away all the chairs that aren't in use. Visitors to the embassy are not scanned for weapons or cameras; instead, they are put in straitjackets and blinkers to make it impossible for them to do anything illegal.

C embassy: you're supposed to obtain forms from the central office, complete them, and return them. However, if you forget about a form, it will lie around the embassy forever, and will never be touched just in case you're coming back to finish it. Eventually, the embassy will collapse under the weight of the incomplete forms.

C++ embassy: similar to the C embassy, except that some forms will self-destruct if you leave the embassy, making it easier to prevent space shortages.

Python embassy: every single item (including a pen) has a big piece of paper attached to say what it is and how many people are using it. Every time you want to use a pen, you have to order a new pen, use it to write something down, then throw it away. When it was discovered that this is inefficient, management decided to keep around pens for a few common colours. Also, the staff tend to dress strangely and say things like "this passport has expired and gone to meet it's maker. It's bleeding expired."

Functional programming embassy: this embassy does not maintain any long-term records at all. However, it's very simple to find your way around: every embassy is either empty, or consists of one office and another embassy.

Perl embassy: this is the ugliest embassy in the neighbourhood, with all kinds of bits glued on and strange corridors that don't always go to the same place. In spite of this, it's usually possible to get things done. If you ask for directions, you're probably be told, "well, the simplest way is to go up three flights of stairs, to the end of the corridor, then take the lift. Or, you could walk around the outside, in the unmarked door at the back, then left. Or if you know how to read this map, you can look around for something that matches it. Or, ..."

Ok, that's all my ideas for now, but add comments!

Monday, June 09, 2008

It burns us!

Wow, time flys. Then again, so does a banana, if you throw it hard enough.

So, things have been happening. I've been to two formal halls in Cambridge. One was quite large and had a high table way up at the front where they muttered some Latin at each end of the meal. The other was crazy-small - just our group of about seven plus about three others, and none of the ceremonial stuff.

Yesterday the weather turned out beautiful. One thing about the English weather is that being generally crummy, you really appreciate it when it's nice. We went punting for about 5 hours, had a picnic on the punt (wasn't anywhere that nice to get out at the time), and I managed to get sunburnt.

Tuesday, May 13, 2008

Down and out

Semifinal: I wasted lots of time on a 950 (means that it should be easier than the usual 1000, but wasn't), and didn't have quite enough time to discover the bug in my 550, and as a result went into the wildcard instead of advancing directly.

In the wildcard, I got shafted by another poker problem, which took me ages just to understand and longer to debug, and I went in with the wrong structures for the 1000, so I'm out of that too.

Las Vegas is the same as last year: gawdy and not much to do unless you're a gambling addict, and I'm stuck here for two days after the TC stuff ends. As you can guess, I'm not in the best mood at the moment. The single cloud on the horizon is that I'm spending a lot of what's going to be left of my prize money on going to see Spamalot on Friday.

Down in the park

If a year ago you'd told me I'd get sunburnt in England, I would have laughed at you. Not any more. As the first leg of getting to Las Vegas for the TCO 2008, I stopped off in London and spent the day with Carl. The weather in England has glorious (which means 25° plus). We spent the afternoon just picnicking in Richmond Park, which is absolutely huge and, unlike Cambridge, has some geography. Somehow we managed to meet up with some friends of Carl's, starting from instructions like "we at a pond".

After that it was off to the Las Vegas. The transatlantic flight was heavenly, since it was basically empty and I could get 3 seats to a row to myself for some shuteye. And even though it was late, I still have enough time to make my connection without panic, and all my luggage arrived. So it's a good start all round.

Sunday, May 04, 2008

Birthdays and things


Last weekend I had a birthday party, which I try to do approximately once a year. Carl and Mike came up from London, and Much Fun Was Had By All. We ended up playing Jenga (or rather, a knockoff Eastern European copy my parents brought back from their trip), and we succeeded in building a maximal tower, shown right.

This weekend is a bank holiday weekend, so various people invited friends from London to visit Cambridge, and the weather was nice enough to go punting. I'd been once before, but didn't actually do the punting. This time everyone took a turn, including me. It looks pretty precarious standing on the back of a wobbly punt, but it's actually surprisingly hard to fall in. At one point I got too close to the bank and was nearly taken out by an overhanging tree, but still managed to keep my balance.

Friday, April 18, 2008

A stitch in time saves how many? ... London.

The title is a reference to Father Ted, which of course everybody should watch. It's also appropriate since this post is about 2 weeks late, and I forgot to take my camera to boot.

Yes, a trip to London on a Saturday. This turns out to be an expensive proposition, considering that it takes as long to get from Cambridge to London as it does to get from there to the other side of London. I only went for the day, since day returns are about half the price of other tickets. It started off with a visit to the British Museum, which those who know me will know is not my usual cup of tea. But Carl wanted to go see the Terracota Army, so he paid for a ticket for me too (after queueing for 3 hours), and it was rather good. If you haven't read Pratchett, then to fill you in: the first Emperor of China had serious issues with death, and he was buried with 7000 terracota people to run his empire in the afterlife: footsoldiers, archers, cavalry, wrestlers, acrobats, civil servants, the works.

After that it was the London Eye, to look around and go "what's that big building? I don't know." It was nice to just chill out and do nothing for a while. Then we headed off to Carl's shared house in Wimbledon (one of his housemates and her boyfriend where with us for the day). I've been told how Wimbledon is basically Little South Africa, and it didn't take much to convince me when I get off the train and in the station, where you'd normally except to see a M&S or a pie shop, there is a South African shop selling biltong and boerewors rolls. It made me positively homesick.

Dinner was homemade pizza, preceeded briefly by some writing collaboration with Carl (together with Marco we submitted a description of the South African Computer Olympiad to a programming contest conference). Then back to Cambridge, a long, slow process: first an overland train to Farringdon station (the English have such, well, English ways of naming things), then a tube to Liverpool Street, then wait around half an hour because the incoming train from Cambridge is late (apparently there was a "security alert" in Cambridge), then an hour or so on that train, then stand around for 10 minutes because I'd missed the bus I'd been planning for, then about 20-30 minutes on the bus home.

Since then, not a whole lot of news, although I have booked flights home (and back) for early July.