Saturday, May 14, 2011

The myth of "up" and "down" in computer graphics

Today is another of my rare technical rants, er, blog posts. It's a topic that I struggled with a number of years ago until I understood how to think about it properly, and which I still see people struggling with regularly.

The OpenGL coordinate system causes a lot of confusion because it uses a "bottom-left" origin, which is seen as "upside-down" relative to other coordinate systems typically used in window systems. This leads to people putting in lots of extra code to "flip images over" to make them right, often in the wrong part of a pipeline and requiring further reflections elsewhere to correct for it; as well as mis-guided requests for features in various APIs.

The way to stop your brain hurting is to stop labelling things as "up" or "down". Up and down are functions of an eyeball, and so it can only be directly applied to things that you see on a screen. Windows on a screen are visible, and this is the one place where OpenGL really is a bottom-up coordinate system. However, textures are not directly visible on the screen, either for normal sampling or for render-to-texture, so the use of up and down in the specification is purely a convenience for describing the behaviour. When uploading a texture, the first texel that is provided has texel coordinates (0, 0), and when this texture is treated as a rendertarget, that same texel has window coordinates (0, 0). This is true in both OpenGL and in Direct3D - there's no need to make any changes.

Things get more complicated at interface boundaries with other formats that do specify an up and a down. For example, PNG files do not have a standard coordinate system, but they do have a well-defined top and a bottom. So if a PNG file is used as a texture, where should the coordinate system origin be placed? That's not obvious, and needs to be consistent for an entire toolchain e.g. if your 3D modelling package shows you previews in which texture coordinates of (0, 0) map to the bottom-left of your image, then you should probably do the same thing in an application that consumes those models. Note that not all image file formats work the same way: formats created specifically for use with textures (e.g. KTX) may specify an origin rather than an up/down orientation (KTX also has an optional hint to tell viewer/editor applications how to display the image). The asset format may also provide a convention e.g. COLLADA explicitly indicates that (0, 0) corresponds to the lower-left corner of a texture image.

So, to summarize:
  • Avoid using the terms "up" and "down" where they are not absolutely necessary. They'll just confuse you.
  • Correct applications never flip images "upside-down" - they just sometimes have to re-arrange pixels in memory to conform to an interface. An upside-down image is a bug.
  • When defining interfaces between systems which have a defined "up" and "down" (e.g. a PNG file) and systems which have a defined coordinate system (e.g. OpenGL textures), make sure you know what the correspondence is (using precedent set by thirdparty tools or file formats where possible), then stick it to throughout your toolchain.
Hopefully this will reduce the amount of confusion in the world.

Sunday, March 27, 2011

Going home!

Yes, after 3 years of cold, cloud, not quite so cold, travel, cloud, work, pub lunches, bad pizza, more cloud, rain, snow, more cloud, more work, more travel etc etc, I'M GOING HOME! That's right - as of 5 May, I'll be back in the Mother City, back to my old haunts with my old friends and enjoying and missing my Cambridge friends, instead of the other way around.

I'll be doing a post-doc in the computer science department at UCT. When people ask me exactly what it is I'm going to do I find it hard to explain (possibly because I don't precisely know yet myself), but you can read the job advert here.

I've decided that nanny states are a real pain. Time was, people just made sure they had something put away for when they couldn't work any more. Now governments have very complicated rules by which you get a tax break if you put money into a pension scheme which you then can't withdraw from and can only spend in certain ways, and it creates a huge amount of red tape. Frankly dealing with red tape is the most stressful part about moving back - the actual moving is stressful but a doddle by comparison.

Anyway, if you're friend/acquaintance in the UK and want to see me before I leave, get in touch; and if you're a Cape Town friend/acquaintance I'll see you soon!

Saturday, September 25, 2010

Bored in Vegas

As usual, my advice on Vegas is, don't bother. This trip, I've gotten sick (something flu-like), been fed far too much, sucked in a lot of signature smoke, been too hot outside and too cold inside, and now my flight home is indefinitely delayed due to mechanical problems (I'm now in the airport).

Unfortunately, I'm coming back in 2 weeks for the TopCoder Open. Oh well.

Sunday, September 05, 2010

Visualising sorting algorithms

This is another one of my rare technical posts, as opposed to news of which countries I've been visiting.

If you're in computer science, you've probably seen an animation of sorting algorithms, maybe heard a rendition, or seen a visual representation. I have, somewhat by accident, discovered a different way to visualise a sorting algorithm: plot points for memory accesses, with address on the X axis and time (counted by accesses) on the Y axis, and different colours for reads and writes. It produces some rather pretty pictures. Note that these are not to scale relative to each other - the Y axis has been compressed to fit the entire sort into a fixed height.

Ye olde bubblesort. Some of the patterns are an optical illusion due to aliasing, but the green spikes are a feature of the algorithm.

Insertion sort - the version optimized for mostly sorted content. Although the data is random, you can see that in many cases it reduces the search distance.Shellsort, clearly showing the phases.

Selection sort:Heapsort: the solid lines at the top are the heap-building phase, while the rest shows the extraction. Note the very slight slope to the bottom-right line: as the heap gets smaller, the heap extraction gets faster, but only as O(log N).
Divide-and-conquer algorithms have a pretty fractal nature. This is quicksort - the perturbations in the fractal indicate the random selection of pivots (it just picks the middle, rather than median-of-3). Mergesort: this diagram is twice as wide as the others because it uses temporary storage on the right.



Monday, May 03, 2010

Budapest (again)


Yes, it's blog time again! Once again, it was the 24-hour Challenge in Budapest.

Like last year, there were some very interesting and tough problems. This year they did a much better job of implementation, and there were far fewer issues with things crashing and so it was more enjoyable. Unfortunately we didn't do as well as last year, but we still managed to come 5th.

After the contest, we finally got our cruise on the Danube. This time we came better prepared with info on where to catch the tourist boats. It turns out we were just looking in the wrong area, and if you go to the right place there are scores of them.

Friday, April 16, 2010

IT Challenge over

It ran smoothly, so not much to report. Stellenbosch won, UKZN came second and UCT third. Now I get a week of holiday in Cape Town; too bad half my friends have moved to other places.

Saturday, April 10, 2010

IT Challenge 2010

I'm off to South Africa next week to help run the finals of the Standard Bank IT Challenge. This is a contest for teams of 4 university students. We've already run the heats to select one team from each of 9 universities; on Thursday the teams will meet at Standard Bank headquarters to do the final.

It's been some crazy hard work (including just about every free moment for the last week or two), but it should be a really great contest. We're hoping to have live standings during the contest (although we'll stop them an hour before the end) at http://sbitc2010.dyndns.org/ (yes, that link won't work right now, and probably won't after the contest either).

After that it's off to Cape Town for a week of hard-earned relaxation.

Wednesday, November 18, 2009

All Jammed up




Following my usual trend of only blogging when I travel and have some pictures I need to post, here's some photos from my last trip to the Googleplex for Google Code Jam. I was somewhat off form, but still managed to make 10th. If you want to see some seriously scary problems, take a look at the site. There is also an article about it here, including a video showing some of my ugly mug.

Sunday, August 16, 2009

Photos from Bulgaria






I'm back in England. The contest was great fun and I'm going to miss the Bulgarian warmth and sunshine.

Wednesday, August 12, 2009

How not to be seen

Don't turn up.

That seems to be the view of most of the people I've talked to about the IOI planned excursion to the Black Sea. It apparently involves 4-6 hours on a bus. Each way. Not including the time you spend waiting around at the beginning until everyone gets on the bus. And leaving at 6am. When the time comes, I for one won't be found wanting. I won't be found at all, since I will be sleeping the sleep of the just, or possible just very tired.

Apart from the attempt to inflict long periods of time on buses (which in my case normally consists of periods of boredom interspersed by vomiting), things have been going pretty well here - in fact far smoother than usual. The SA team also did pretty respectably on the first day, and the second day is finishing in a few minutes. I haven't been on any of the excursions so far (being on the scientific committee seems to involve lots of work, but it's all been fun), but I plan to take myself off to the old town tomorrow (hopefully with some other leaders to make it more fun).

Saturday, August 08, 2009

Bulgaria, land of enormous hotel rooms

It's blog time again! As usual, it's because I'm travelling - this time to IOI again, in Bulgaria. Haven't been here long, but so far I've been blown away by the size of the hotel room. More news when I've actually been out and about more.

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.

Sunday, March 30, 2008

Junk to the left of me, junk to the right of me

and everywhere there was junk. By which, of course, I mean that my shipping arrived, and now I need to figure out where it is all going to go, and I can barely move for all the stuff lying around in piles.

Apart from all the stuff I shipped over that is probably going to go straight under the bed or into the cupboard under the stairs, there is of course some useful stuff. Strangely, it's the little things that I've been missing the most, like having a bed-side lamp so that I can read in bed and then just turn it off without having to get out of bed again.

This weekend I also had my cousin visiting from the USA. Yesterday was typical English weather, grey and cold and windy and dreary and depressing, but today was just perfect. I was walking around in just my tracksuit (which as you may know, is also about what I wear in Cape Town in summer), and very little wind. We just wandered around town looking at things and had lunch at a nice Italian place right on the Cam.

Monday, March 24, 2008

My God, it's full of snow!

On Saturday when Mike came to visit and it snowed, I thought that would be it for the year. It turns out that was just a warmup (if that's the right word) for the real thing on Sunday:


Saturday, March 22, 2008

Timing

So, Mike came to visit for the day, and managed to pick the one day this year that it actually snowed. We started off looking around town a bit, came back to my place for lunch, and ended up watching TV all afternoon because the weather just looked too dicey.

This is what the view out my window looked like:


And here's me earlier in the day in front of King's, bundled up against the weather:


And no, we didn't go out and make snowmen or throw snowballs. It was a rather soggy, unpleasant sort of snow, not to mention the howling winds. A bit of a disappointment really, but I guess one should except such things from the English weather.

Tuesday, March 18, 2008

Craziness in America

Craziness in America item #1: flights to the Topcoder were going to require me to leave Heathrow at 8.30am. Subtract 3 hours that you need to be there before your flight: 5.30am. Subtract 1 hour on the train from Cambridge and 1 hour on the tube: 3.30am (assuming the tube runs that time of day, otherwise it's a bus). Subtract 15 minutes to get to the train station, 30 minutes to get ready at home, and another 15 minutes slack time, and it's not even worth going to bed.

The good news is that I've managed to get it changed to an 11.15am flight. That's still not great, but it's sane, and if I spend a night with a friend in London it starts to look downright decent.

Craziness in America item #2: NVIDIA are making sure they stay in touch and had one of their managers talk to me just to touch base. He said it took him ages to figure out how to dial my number because he never makes international calls. Somehow that's just so stereotypically American I had to laugh.

In more topical news: no plans to go away for Easter (unlike just about everyone else I know), but Mike is coming up from London to visit for a day, and then a cousin of mine from the US is coming to visit the following weekend as part of a business trip. And my shipping has arrived in a warehouse somewhere, but I can't get at it yet because I have to pay more money due to some weasel-words in the contract about currency fluctuations and the fact that the rand has lost about 15% of its value since I left.

Saturday, March 08, 2008

Las Vegas (again)

So, for those of you who wonder what mischief I've been getting up to on Saturday nights since arriving in the UK, the answer is... trying to take over the world. No, wait, I mean... programming. In fact, taking part in the 2008 TopCoder Open.

I had a less than stellar round today, but still managed to place 19th, which is enough to put me through to the semi-finals in Las Vegas in mid-May. If you've read my previous posts, you'll know that I found Vegas to be as tacky, lurid, and gambling-obsessed as it looks in the movies, so I'm not so keen on the location, but the contest itself is always fun. They've expanded it again this year (48 to 72 algorithm finalists), which I think might be a mistake as even with 48 you don't really get to know everyone, especially since difficult language groups tend to form cliques (Russian, Polish and Chinese for example - in fact there are precious few native English speakers (looks like probably one English, one Aussie, one or two American and me this time), although the Dutch are usually fun and this time it looks like there will be at least four of them.

Thursday, March 06, 2008

I can't be bothered to think up a title

Right, I couldn't be bothered to think up a clever title, because it's almost midnight on a week night. The reason I'm still up at midnight is that I've just been to see The Bank Job. It doesn't have anything terribly surprising in it (people rob a bank then run into problems afterwards), but a decent way to pass an evening. There was one line I liked particularly, when they were digging a tunnel into the vault:

"I've just got one question. What are we going to do with all the dirt we dig out?"
"That's all planned for. We're going to dig another hole over there and bury it."

So, go see it if you have a chance.

Other news? I bought a HDD/DVD recorder, although I probably won't have much to record because I don't have a decent TV guide like the one that comes with DSTV in SA. Even on the internet I can't see more than about 2 hours on a page, when actually what I want is a list of all the movies and series that are on for the month. But at least now I can play DVDs on the TV instead of my laptop. And in theory the ship with all my stuff should have made port around today, so in a week or two I should have lots of furniture. And Saturday is the last online round of the Topcoder Open, so assuming I do okay there I'll be off to Vegas again in mid-May.

Right, I need a cup of tea and then SLEEP.

Wednesday, February 27, 2008

It still moves

Well, know we know why the Tower of Pisa falls over: it's made of spaghetti. Well, that sounds really confusing, so allow me to explain. The last two days of work have been further induction, covering such necessary and also riveting topics as training, the employee handbook, health and safety, and IT policies. To try to liven it up, they had one of those silly yet sometimes entertaining "team-building" exercises, in this case, to built as tall a tower as possible from spaghetti and marshmallows, within a limited "budget". Our team had the tallest tower:



Unfortunately, by the end of the competition it was looking more like this, so we didn't win.


And for those who might want to know, yes I did feel the earthquake, just as a slight vibration which woke me up, after which I couldn't get back to sleep.

Tuesday, February 19, 2008

And... here it is


I'm normally a cheapskate who never buys anything even if I can afford it, but to celebrate my new job, what better extravagance than this?

Friday, February 15, 2008

Random photos

I've taken the odd photo with my cell-phone camera when the opportunity has arisen, and have finally gotten around to extracting them. This was always a pain, and it's become even more painful since it appears that something I've upgraded broke the program I used to use (it now tells me that there was an error, namely, "Success"). My N-formats memory card reader doesn't deal with it either.

So, here's one of my house again (the one on the left). Note the ice on the car windscreen. I don't think I'm in Cape Town any more...

Second one is something crossing the road. Looks like it might be a hedgehog or something similar.

Monday, February 11, 2008

It's off to work we go

So, things have been a bit quiet on the blog front for me since I've settled in and started a job. It's gone pretty well, much better than my first week at NVIDIA, I think because I'm working on a small self-contained project rather than a million-lines-of-code driver. It's also OpenGL-related so I walked in with most of the knowledge I need to do the work, so I'm already rewriting big chunks of code.

This week is going to be a bit different: I'm doing an ARM-internal training course on the ARM architecture, which should be fun because I know a reasonable amount about the x86 architecture (not enough to write an OS, but the basic instruction set and registers performance characteristics), but pretty much zero about the ARM architecture.

Other than that, I didn't do much last weekend. Saturday I pottered around for the morning because I'd made a mix-up with my contact lens cleaning which meant I couldn't wear them for 6 hours, and in the afternoon I bought a scarf. Sunday I took part in the worst-run international programming contest I've ever seen (some Indian thing called Bitwise) which ran for 12 hours, but at least I managed to place well enough to win a 4GB flash drive, which I've been debating buying for a while.

And maybe, finally, I'll actually have my ATM card and be able to use the bank account I opened months ago other than by debit order and internet banking.

Friday, February 01, 2008

Washing... but not as you know it

Well, I'm in my new house, which doesn't come with a microwave, but does come with a combination washer-dryer (I'm not implying that they're interchangeable in any way, although I guess you could try microwaving your clothes dry or reheating your leftovers in the dryer). However, it seems that the American obsession with safety has reached Britain. Unlike normal dryers, which are kind, and clever, and fun to be around... no wait, that's a quotation which isn't relevant. Unlike normal dryers, where you can just open the door, check on progress and pull out things that are dry and close the door on the rest, this one protects you from (gasp!) warm clothing. The door will lock while you're drying your clothes and for two minutes afterwards. This is even after having the last 10 minutes be a no-heat spin, so the clothes are already cool by the time you get them out. And it can't get very hot in the first place, because I had some clothes in there for about 2 hours and they still weren't 100% dry.

Other than that, there are about 8 wireless networks here, all encrypted. My laptop automatically picked up an unencrypted network for a few minutes and was able to tell me I had new mail, after which I lost the connection again.

Virgin Mobile are a bit useless. When I called the first time to arrange to get a bundle on my phone, they insisted they had to send me a new SIM card. It arrived today... and has a totally different phone number. So I call up to complain, and this time they tell me they can add it to my existing account, and within minutes its active. Now I just have to decide whether it's worth the effort to harangue them to get back my £10 on the new and unopened one. On the plus side, I've been pleasantly surprised to find that I haven't had to
wait in a long queue to get service.

UPDATE: I'm now posting this from home on my shiny new 2Mbps broadband connection. Here are some pictures of my house:





Friday, January 25, 2008

In-sewer-ants

Good news. I've signed the lease, and I've organised insurance, which surprisingly isn't really cheaper than in South Africa (for household insurance at least). That might be because its covers more though - it seems they assume you have at least £10,000 worth on stuff, and there are various things they cover like legal fees. They didn't include a nude lady though.

The bad news is that the bank is causing me grief. They didn't send a debit card (which is also an ATM card), so the only way I can get money out is through electronic transfers. First they said it was in the process of being issued (almost a month after I'd opened the account?), now they say they don't have the application form from me. So I've had to go and fill in the form, and it'll take another week before I get it.

Next week I'm moving in, and I'll need to organise broadband. That's probably the last thing that I'm really stressed about, especially since it's a 1 year contract so if I make the wrong choices I'm rather stuck with it. It also means that from Tuesday you might find me slow on replying to emails if I don't get it set up right away.

Wednesday, January 23, 2008

Sitting around

Well, today was not terribly exciting. I collected my bicycle this morning (yes I did actually do some exercise, don't get a heart attack). Hopefully it hasn't been stolen yet: the guy at the bike shop seemed to indicate that they'd steal pretty much any part of your bike that wasn't locked to something, including your lights and your pump. Makes my feel like I never left home :-)

Other than that, I'm just waiting to get the lease to sign (was supposed to be last night, now supposedly tonight). I also looked at broadband options today, and if you thought this could be confusing in South Africa, you haven't seen anything. I'm planning on going with Virgin (they do cable, which I've heard from two different people is better than ADSL). They have options for TV (depending on how many channels you want), internet (speed), phone (free calls), and an option to get free minutes on Virgin mobile. However, ONLY
the phone options can be taken on their own. Everything else is either "costs X when you also have Y" or is part of a bundle. And you can't combine bundles. So you can get low-grade TV free with the phone line, or broadband for £4.50 with the phone line, but not both. And you can't have both low-grade TV and the phone line.

Once I've signed the lease I can start looking into things like insurance, and actually ordering the broadband, and planning what to ship, join the library, etc etc.

Tuesday, January 22, 2008

The House of Merry

So, without mucking about too much, I have obtained accommodation for the next six months (well, I will have once I've received the lease and signed it and paid a deposit etc). It's a one bedroom house in Lucerne Close. And if you thought South Africa had some crazy road naming, go look up "Lucerne Close, Cambridge" in Google maps and zoom right in. It's not a road, it's a tree of roads with 7 dead-ends.

This afternoon I intend to buy a bicycle, if the weather holds up.

Monday, January 21, 2008

Hectic in Cambridge

Right, the flight was relatively uneventful, apart from the obligatory screaming infant. The bus to Cambridge ended up taking 3 hours, which wasn't much fun, but on the other hand my room was ready for me when I arrived.

So far I've been to collect my mail from Blaise (banking stuff) and have lunch with him in St Johns. I don't know if it's just because this is an offshore account, but banking seems worryingly slow here. My mail included various things including detail for getting on to online banking, but apparently the debit card could still take a few days. A little worrying when that is what I was planning to use for spending round here.

Sigh... I've just got a phone call to cancel one of the viewings I had planned for tomorrow. That leaves me with basically two at the moment (one I must confirm now), and one of them only actually opens later in February. So I'll be doing lots of flat-hunting this week.

Sunday, January 20, 2008

Off to Cambridge

I'm off to Cambridge to earn my living, until I get sick of the weather. I'm in the departure lounge in Cape Town, Firefox on Linux doesn't want to start, and I'm expecting my flight to be called any minute. I'll write more later.

Sunday, November 04, 2007

Free stuff

Despite having finished my PhD, I haven't graduated yet, which means I'm still required to hold to the post-graduate code: grab anything that's free. Today I'm grabbing the free wireless internet at Orlando International Airport. Very nice, since every other airport I've used in the US requires you to pay for it.

I've taken the opportunity to upload all my photos to http://people.cs.uct.ac.za/~bmerry/photos/tccc2007/. There aren't that many, since one programming contest looks pretty much like another, and I didn't spend a lot of time in the parks.

That's probably all I'll be posting until my next jaunt overseas, which is probably when I move to Cambridge to start work.

Thursday, November 01, 2007

You win some, you lose some

And, today I lost. The round was just a disaster for me. The hard problem (normally 1000) was worth 900, which sucked me into thinking it would be an easy problem. In the end, my approach was not sophisticated enough, and I had to abandon it. That left me without enough time to work on the medium. I was a few minutes away from putting the finishing touches on by the end.

So, the TCCC07 is basically over for me. But as somebody pointed out, that also means I can relax and enjoy the rest of it instead of stressing.

So far I haven't felt motivated to take any pictures. When I've been outside there hasn't really been time, and the contest area looks basically the same as every other time.

Wednesday, October 31, 2007

They put a man WHERE?

Well, I am now less than impressed with America. This is the nation that invented fast food and instant service. But on arriving in Washington, along with roughly 1000 other people, we find that the number of INS offices available is... 4. 3 of which are only serving US citizens. Fortunately, somebody there realised the situation, took decisive action, and increased the number to... 5 (2 for non-US). I was in that queue for an hour, and if it had been much longer I might even have missed my next flight.

Now I know why foreigners who wants to take a tour up to the ISS goes to Baikonur rather than on the shuttle. I can just picture the scene:
Tourist: My shuttle leaves in 15 minutes and I have to be on it! I paid $20 million and I have command duties.
INS: I'm sorry sir, you haven't completed item 16 on your INS form. You'll have to go to the back of the line. You'll be booked onto the next shuttle.

But, here I am in Disneyworld, and it's just as packaged and tinkly and glitzy and fake and horrible as I expected, except that driving through it, all you see is trees and grass and canals.

Tuesday, October 30, 2007

Going nowhere really ****ing fast

So, SAA did not, in fact, manage to take me to Washington yesterday. This is in spite of assurances that
  • the plane from Cape Town would leave at 3 (the TV screens), or at 3:15 (announcement), or at 3:30 (what another passenger was told when asked), it in fact left at 4:15.
  • the outgoing plane to Washington would be delayed and we'd have time to get on it.
So, I'm well cheesed off. I spent the night in Johannesburg, and to make things more fun, the flight to Washington was held just long enough for them to rush my luggage on board. So I'm wearing mostly the same clothes as yesterday and until whenever I succeed in meeting my luggage, while my luggage is going round and round a carousel in Washington, or possibly it's in the baggage enquires office, or possibly it's been blown up as unattended baggage (hopefully not). Of course, nobody tells me any of this when I go to the transfers desk. It's back and forth, out through passport control and customs, over to domestic, back to international, upstairs, downstairs, back into international baggage hall, find this out, then back through customs again.

Hopefully the next post will be a little more positive and from a little further away...

Monday, October 29, 2007

And for my next trip...

Actually, I missed blogging about my last trip: a quick hop over to Cambridge for a job interview with ARM. I'll post some photos at some stage, since Cambridge is a rather pretty and historical place. For those not in the loop, I've accepted the job and will be moving there indefinitely in January.

However, this trip is the next TopCoder tournament, the TCCC 2007 in Disneyworld. So far I'm still sitting in Cape Town, because my flight to Joburg has been delayed an hour. It should be an interesting time in Joburg because I'll have very little time to make the connection, and getting from domestic to international requires negotiating a maze where all the signposts are lies.

More to following, but probably not from Joburg...

Saturday, June 30, 2007

A tragedy of errors

The final was quite disappointing, at least partially because I came 7th out of 8 and lost over 100 rating points. In the end, everybody solved the easy problem and nobody solved anything else, so the winner (Jan Kuipers) was simply whoever saw the solution to this problem the fastest. The tragedy is that tomek and I both solved the medium and darnley solved the hard, but all of us had teeny tiny errors: tomek thought that a certain case wasn't worth worrying about so he disabled a check for it (enabling it makes it right), I got a second root from an equation and thought it wouldn't matter if I just tried both (a one-character change disables the bogus root and fixes it), and darnley had some tiny error too.

The closing reception was a dinner at the next-door hotel/casino, Treasure Island. It turned out to be outside by the pool, which was rather warmer than I was hoping for, but at the end of the evening we went inside to the Ben & Jerry's (ice-cream shop). On returning to the hotel to go to bed I had a surreal if somewhat typically Vegas experience: two men and a woman get into the elevator with me, looking a bit drunk; one of the guys then starts telling me how they have hookers in their room and wants me to come and watch.

Today I plan to try to see a few things (there's supposed to be tigers on show near a side entrance to the casino, and if I have the energy I'll go to the Bellagio to see the fountains this evening), but mostly catching up on email and blogging and work and reading and so on. Also I'll be trying to figure out how to use the iPod shuffle that I apparently won in the Verisign trivia competition. Unfortunately all the music on my laptop is in Ogg, which the Shuffle won't play, so I'm converting it all to AAC.

Friday, June 29, 2007

I see blue people

First up: the wildcard round. tomek failed 2 of the 3 problems, but was fast enough on the remaining one (the medium) to take second place and advance to the final. That is going to significantly increase the level of competition.

The Blue Man Group was more or less as I expected, i.e., a heck of a lot better than the Tournament of Kings. Some amazing visual comedy and mime (not something I'd usually see, but which I really enjoyed), some music, mainly drumming (looked skilled but didn't excite me), and some just plain weird stuff (some of it pretty amusing). At one point they had TV screens suspended from the roof in front of each guy's face, with the face on the TV screen. There was amazing synchronisation: one guy would squirt some shaving cream onto another's face (with the cream appearing on his TV-screen face). Then he changed the third TV to an advert for the razor, plucked the razor out of the add (with the hand on the TV screen perfectly synched with his real arm), and proceeded to shave the second guy. Oh, and actually only two of them were on stage at this point - the third guy was just the head on the TV. Sorry, no photos allowed, but I do have some other random pictures I'll post later.

Thursday, June 28, 2007

Wootness

This post is written by the #2 ranked TopCoder in the world, until at least 5:40pm. I won my semi-final room, so I'm advancing straight to the finals, and a minimum of $1000, along with darnley. As a result, it also boosted my rating to 3366, just ahead of tomek (and still way behind the #1 Petr with 3753).

The final is tomorrow, at 1:30pm PDT. There will be a live web-cast on http://dev.aol.com (sorry South Africans, you may well not have enough bandwidth), and if you're already a TopCoder, you can watch the action in the arena applet. Not much more to say at this point; more info after the wildcard round.

Between our quests we sequin vests and impersonate Clark Gable

Firstly, the second semifinal: tomek, the highest-ranked coder in the contest, came third, and will therefore have to compete in the wildcard round for a place in the final. He was unlucky in having a silly bug in his easy problem and also failing the hard problem (along with everybody else) - he only made the wildcard because there were a lot of failures, and only one person got even two problems right.

Now, for the non-geeks reading my blog: last night we went to see "Tournament of Kings" at Excaliber, which is, wait for it... a casino! Not only is it a casino, but it's done up in a very fake garish Disney-esque castle with garish colours that probably didn't exist in the middle ages, or indeed before 1960. The actual show featured a bunch of "knights" (who were at the same time kings of assorted countries) doing jousting and sword-fighting and stuff, along with some plot involving some evil lord with demonic laughter, all of which played very loose with history, culture and mythology (it was supposedly King Arthur in charge of it all, and for some reason the kings from these other countries were the Knights of the Round Table, hence the title). The whole thing was excessively loud and seemed aimed at 10-year olds. There was also a bit tacked on the end with a bunch of acrobats, who climbed on top of each other a lot, although not in any depraved way.

The plus side of the whole adventure is that I actually got to see a genuine Vegas casino wedding chappel. Folks, this is not a mythical stereotype, it really exists. You can see it directly behind me, next to the Pizza Hut.
Tonight is The Blue Man Group, which I suspect will be a bit arty for my taste, but will hopefully have a degree of intellectual engagement more appropriate to the generally intelligent people at the TCO. Also, I compete in my semifinal in just over 3 hours. Since I still have jet-lag, it's currently 6:40am and I'm drafting this entry to kill time, and also sitting in the dark so as not to disturb my roommate.

Wednesday, June 27, 2007

Upset in first semi

Most of the readers probably don't know the structure of the algorithm contest at the final. The 48 contestants are split into 3 semifinals with 16 competitors each. The top 2 from each semi advance to the final. There is also a wildcard round, with positions 3-6 from each of the semis, and the top 2 from there also advance to the final.

The first semi was this morning. ACRush, the top seed remaining in the tournament (after Petr, who is miles ahead of everybody else, made a mistake in the last online round), has been knocked out completely. That leaves tomek as the most likely favourite; he will be competing this afternoon. I'm on tomorrow, so fortunately I don't have to go up against him, although there are plenty of scary people in my semifinal. Wish me luck!

Tuesday, June 26, 2007

Wear sunscreen

This morning I walked for a couple of kilometres into Vegas, partly to see the place and stretch my legs, and mostly to go to Barnes and Noble to look for books that are either expensive or unobtainable in South Africa. If I'd known
  1. How far it was
  2. How hot it was outside (it's apparently 40 degrees right now)
  3. How small the B&N was, especially the SF section
I don't think I would have bothered. In the end I didn't buy any books, although I did buy a DVI cable from the Best Buy next door. But I do have some photos, which I'll paste in here just as soon as I figure out how MacOS works, which I'm using because the WiFi driver seems to handle weak signals better than the Linux one. Actually iPhoto looks pretty nice.

Ok, here's the lobby. It has this amazing mini-rainforest in a dome, and then on the left you can see bits of the casino, which completely ruins the effect.


And here's the hotel from the outside:
There was also an amusing moment at the Subway yesterday, apart from it being in a casino. I order a small drink and start trying to put Pepsi in it, but only fizzy water comes out. The guy says to use the other dispenser machine, and also gives me a new cup that isn't half-full of fizzy water. But since he's already feeling bad for accidentally putting mayo on my sub, he replaces my normal-sized cup with a bucket, or at least that's what it looked like. So, I've got a nice, fresh, healthy low-fat sub (apart from the unwanted mayo)... and a bucket-full of sugary crap. And people wonder why America has an obesity problem.

Monday, June 25, 2007

On second thoughts, let us not go there. It is a silly place.

And Vegas is just as silly as all the TV and stereotypes led you to believe. The hotel part of the Mirage is build as three wings on top of the casino, which meet at a bank of elevators. But the elevators are nowhere near the lobby. They actually make you walk past hundreds of slot machines to get to the elevators. The lobby is actually really tasteful and impressive though (maybe some pictures tomorrow), it's a pity to spoil it with the tacky, garish, noisy casino nonsense.

That I was kind of expecting. The surprise came when I went to Subway to eat dinner. I'd already found one from Google Maps that was about 500 metres from the hotel, on the Strip. What it turned out to be in practice is a casino with a Subway stuffed into one corner - if I hadn't spotted the signature subway decor I would have thought I'd walked into the wrong place.

Anyway, now I must try to convince my body clock that it is 7pm, which is in fact too early to go to bed. If I get really desperate I could always work on my thesis, but in the meantime I have the remaining half, or about 600 pages, of Peter Hamilton's The Reality Dysfunction - when he writes a space opera, he doesn't muck about. If you're into space operas it's not half bad (in spite of his somewhat disturbing obsession with sex), although so far not as good as Pandora's Star and Judas Unchained,

Sunday, June 24, 2007

The horror, the horror

Well, not a good start to the trip. I start off in Jhb trying to find the VAT office to register my new laptop and camera for re-importation. I made the mistake of asking the first warm body I found, who cheerfully told me that it was after security. So I go through security, don't have to wait for too long at passport control despite the strike, and find... a VAT refund office for tourists, who cheerfully inform me that the place I wanted was before security. At this point I have insufficient time to fight my way back through security twice and stand in a queue to have my goods inspected, so I guess I'll just have to hope that the customs officials on my return are either friendly or on strike.

Next I arrive in Frankfurt, my least favourite airport. The only free places to sit are full of stale cigarette smoke, but that part only comes later. I arrived in a terminal full of signs to places like A19-26 but nothing actually helpful and couldn't find a Condor Airlines checkin in the international area, so I went through passport control to navigate the maze to find a Condor checkin. "This isn't an eticket," they say, "you need to collect a paper ticket". So I get directed off the Condor ticket desk, who say they don't have it, but since it was booked through Lufthansa, they might know. So I tootle over to Lufthansa, in a different part of the airport, who tap some keys and tell me that the ticket was issued to the travel agent, and the only thing they can do is treat it as a lost ticket, for which privilege I may pay E100. Wishing to get on the flight, I have now done so. Two passport controls (thank goodness for an EU passport!), three counters and a security check later (and by the looks of things, possibly a second security check???), I'm slightly cheesed off, and am getting on to the coffee and biscuits.

Oh, and the internet isn't free either. I'm sure I somehow got on free last time I was in Frankfurt, but apparently it is not to be.

How the other half live

I'm posting on my blog, which means it must be time for me to go gallivanting again. This time it is time for the TopCoder Open 2007, to be held in Las Vegas, Nevada. Not only do TopCoder fly everyone out, they are also putting us up and holding the contest in the Mirage! If you're going to follow the contest, I'm in Semifinal room 3 (on Thursday), and the final is on Friday.

This time I have new perks. I've now done so much flying with SAA and partners that I've been upgraded to Silver class, which gets me into the business class lounge even though I'm flying economy. I'm sitting in the lounge in Cape Town now. I think I'll go and get myself a cup of tea, while I can still get it made right (see my previous posts for rants about how Americans can't make a cup of tea to save their lives).

Friday, May 04, 2007

The wonderful world of corporate sponsorship

Yes, I'm travelling again, this time to Johannesburg, where the weather is nice but incredibly dry. The event is the Standard Bank IT Challenge, a programming contest which Standard Bank throws insane amounts of money at. They put us in the Park Hyatt (where a room for the night is more than my rent), flew judges out from England business class, and handed out MacBook Pros as prizes.

The regional (to determine which team advances from each university) was on Saturday, and was actually the tougher part. UCT fielded some very impressive competition, and we (myself, Carl Hultquist, Chris de Kadt and James Gray) only just won in the last ten minutes. If the results from all the regionals were merged, UCT took the top 5 places. Us and one other UCT team solved 4, the next other university was Stellenbosch with 2.

With that out of the way, the finals felt almost like taking candy from babies. We solved all 6 questions with about an hour to spare (much to the annoyance of the judges, who thought they'd upped the difficulty to challenge us) and we somehow did it without a single wrong submission; Stellenbosch came in second with only 3. So, the moral of the story is that UCT rocks at programming, and us old dogs can still show the young guys a thing or two. Also, MacOS X is shiny, but I don't think it will be too long before I'm installing Gentoo as well (about the first thing I did was download Firefox for Mac so that I could actually have TABS).

So, as may be inferred, I'm now sitting in the hotel playing with my shiny new MacBook Pro, killing time until it's time to go to the airport. After that the hard work starts, since we're going straight from this to coach at an olympiad training camp.

Sunday, November 19, 2006

Bad tea

Firstly, the TCCC final: it sucked. The "easy" problem took forever to get working, a stupid bug killed the medium, and all this left me without time to do the hard, so I ended up stone last. Oh well, at least I made the finals.

The more I go to the USA, the more I agree with Douglas Adams that tea is not part of American culture (the way it is in British culture) simply because they don't drink proper tea. I actually had some decent tea in New York with the Google Code Jam finals, but this time it was back to the rubbish. To start with, it seems that herbal stuff is now fashionable, instead of good old British-style Ceylon tea. Then, they don't know how to make it. To make a proper British cup of tea, the water has to be boiling when it hits the teabag. An insulated container with a tap, filled with water that was boiling half an hour ago, just doesn't cut it. Apparently there is also a nation-wide shortage of plastic spoons, because both at the hotel and on United Airlines, the only implement provided to stir the tea was a short, thin plastic straw. Think about this: the larger the cross-section, the better the stirrer. A thin plastic straw is almost completely useless. My finger would be more effective.

I had a wonderful cup of tea on SAA and a spoon with which to stir it, which just proves that it can be done right even in a low-pressure environment where water boils at a lower temperature.

Anyway, I'm posting this from back in South Africa, which means that this is the last I'm likely to post until either I go away again (nothing planned at the moment) or something annoys me enough to write about it.

Thursday, November 16, 2006

The Enigma

No, not an enigma, the Enigma. As an advertising stunt, the NSA has borrowed a genuine working WWII German Enigma machine. These were used to encode a lot of German military signal traffic, and was broken by the Allies - quite possibly changing the course of history.

Here's me with the Enigma:

Curses, said the red coder

The curses are about the evils of jet-lag. Tuesday night I woke up a few times but managed to get to sleep again each time. Last night I woke up at about 2:30am and never really managed to get back to sleep.

Nevertheless, it seems that I haven't completely lost my touch, because I managed to pull off second place in my semi-final (despite making a mess of the medium problem, although it turned out not to matter). That puts me straight through to the finals, without having to compete in the wildcard room this afternoon.

For those of you with a decent internet connection, the final will be webcast tomorrow. It's at 1:30pm PST (11:30pm SAST - a bit late I know). Hopefully I can kick butt, especially since several of the top seeds have already been eliminated and some others must compete for the 2 slots from the wildcard round.

No photos yet, partially because I haven't been out to see any sights (I don't think there are many), and partly because I haven't had time to download them off my camera.

Gotta go - the NSA is giving a presentation. Should be... interesting.

Wednesday, November 15, 2006

TCCC round 1

I'm now at the TopCoder event. The first algorithm semi-final took place this morning. They've got monitors spread around the room that mirror what is on the contestant's monitors, which makes it into more of a spectator sport that I would have expected. It's only really other programmers who are likely to find it that interesting though. The organisation is actually extremely slick: big screens at the front which show the standings, booths for the sponsors, the works. I'll post pictures when I get around to it. The first semifinal was quite interesting: the number 1 seed was knocked out completely. Hopefully the same thing doesn't happen to me tomorrow morning.

Tuesday, November 14, 2006

Tales from a confusing airport

I'm currently in LAX (that is, while writing this - it's unlikely to be the case when you read this). I think it is one of the worst signposted airports I've been through. I knew (but only because I'd previously read my itinerary and made a note of it) that I had to get to terminal 8. After walking out of customs there was ground transportation etc, but nothing to indicate how to get to any other terminal. After asking someone, I learned that I should go up an escalator, which deposits me at the curbside where people get dropped off, then walk in a particular direction. I was at terminal 6, after a short walk I was at terminal 7, then... that was the end of the building. I ended up walking inside and noticing I sign for a particular gate range which included the gate I'd noticed was the departure gate for my flight, so I followed that and ended up where I needed to be. Heaven help anyone who doesn't speak English or use the Latin symbols for numbers.

On the plus side, the WiFi is free :-)

Anyway, if you haven't been following, this trip is for the TopCoder Collegiate Challenge. Unlike the Google Code Jam, they've put me on the flight schedule from hell: Cape Town - London - Los Angeles - San Diego, and returning San Diego - San Francisco - Frankfurt - Cape Town, with about 7 hours of temporal homicide in Frankfurt and arriving in Cape Town at 6am. The
only good news is that my first round isn't until Thursday. I don't know what internet access will be like, so I'll post more if and when I can.