Programming Challenges 4 - 6
Tuesday, November 8th, 2011Following immediately on from the previous challenges, I had hoped to redeem my rather miserable performance on Challenge 3.

Read on to see how I did with Challenges 4 - 6.
Following immediately on from the previous challenges, I had hoped to redeem my rather miserable performance on Challenge 3.

Read on to see how I did with Challenges 4 - 6.
I downloaded a copy of Skiena and Revilla’s book Programming Challenges from here. I wasn’t hugely taken by the book as it is mostly about coding in C, rather than C++ which I prefer, so I’ve only really skim-read it. However, I did take the time to solve some of the challenges after the first chapter, which was a far more valuable learning experience.

I decided that as the first few challenges looked fairly straightforward that I would make it my goal to solve each one 100% correctly on the first go. Unlike the Ancient Messages challenge where comprehensive test data was supplied, this time each challenge only came with one or two examples. This means that coming up with a good way to test the program is essential if one wants to pass the judge’s tests first time. In a programming competition failure to pass tests means a time or score penalty. But I’m more concerned with real life where a programming error could mean death, financial loss, or worse, the wrong coloured background on a dialog box!
So, how did I do?
Earlier this year I wrote about Project Euler. I’ve kept up my problem solving, with an additional 23 Project Euler problems solved in the four months since I wrote that article. I’ve also tackled some problems from other sources that don’t have restrictions on me writing about them.

First up, I had a bash at one of the easier looking problems from this year’s ACM International Collegiate Programming Contest. You can see a description of the problem here on the UVA Online Judging website which provides automatic verification of submitted solutions.
The solver’s task for the problem I chose is to decode some “Ancient Messages”. So, how exactly did I do that?
I’ve just spent a very pleasant forty minutes listening to Deep Purple’s classic rock album, Machine Head. Exciting on a good day, but today it sounds extra special as I’ve been listening to a brand new high quality re-release of the album in 24 bit / 96 kHz download format.

So, why is this so exciting?
I decided that home cocktail making is a skill that no gentleman should be without. The Mojito, seemed like an excellent place to start, bringing back happy memories of drinking cocktails on the beach in Mexico.
Read on to find out what went into the making of the delicious looking concoction you see above…
This is Banqueting House in London, site of the execution of Charles I in 1649.
I visited there by chance with my Mum as we were passing by on our way to see the Watercolours exhibition at Tate Britain. We received an impromptu history lesson plus the opportunity to take some photographs with my new Nikon D5000 DSLR camera. Hopefully the quality of the photography on this blog will be improving over the coming months.
I received a copy of this book for Christmas: The Weekend Artist: Creative Inspiration, Techniques and Simple Projects Designed to Unleash Your Inner Artist by Gerard Smith.
Above you can see the results of my first attempt at creating modern art, following one of the projects in the book. Read on to see what was involved in this project.
I have discovered where London’s city meets the countryside.
It starts here in the Asda car park …
I’ve just come back from a week’s visit to Washington DC to see my brother and family. Here are some pictures I took while I was there.
These flags surround the base of the Washington Monument.
Recently I paid a visit to Bletchley Park near Milton Keynes, home of the British World War II team responsible for cracking the German military Enigma code.
As you can see, the park is of more historical interest, than scenic, though being fair, there is a picturesque lake and a more ornate (than the huts!) mansion that I didn’t take pictures of. Read on for more pictures …