Friday, 27 November 2009

MS Access Running Queries

MS Access is the worst piece of software I have ever had the misfortune of using. It is so ubiquitous that M$ see no need in improving its appalling user interface. People use it because people have always used it, and the money just keeps flowing in.

Thursday morning saw me wrestling with an Access report to fix a formatting bug. It is the hardest thing in the world to get any help from the internet on Access because it is used by so many newby and first grade programmers who know NOTHING about programming that the useful information (if indeed there is any) is buried under a huge pile of misinformation bad advice, wrong advice and general bullshit.

After a couple of hours of trial and error here is how I found to run a query and process the resulting data.

' This runs the query I wanted to run. The key is knowing to use CurrentDb.
Set rst = CurrentDb.OpenRecordset("qryLicenceProductKeys_GetOrderID")

' You can access the fields with
rst!FieldName eg rst!OrderID etc

I hope this snippet may be of some use to those of you out there who cannot for the life of them work out from the internet detritus how to perform, what obstensibly should be a simple task.

Tuesday, 17 November 2009

I 'Feltham First'

This is the kind of vegetable I like. A pea that you can put in the Autumn to harvest early the following Spring with the added bonus of a humorous name.

The peas (about 100 of them) went in three rows in mid October. We have never grown peas before (runner beans but not peas) so it will be interesting to see the results.

Wednesday, 30 September 2009

Mission Skegness

Skegness is about 80 miles from Nottingham so we spread our journey over two days by splitting the journey into two legs with an overnight stay in a B&B at Woodhall Spa. The first part of our ride although the longest at 50 miles went well with a slight tailwind and good roads. In Newark we stopped off at the usual watering hole, Thomas' (opposite Morrisons) where one of the staff, when hearing of our plans, said we were on a 'mission' .

The much dreaded hill at Navenby proved a lot easier than expected, rewarding us with panoramic views over the Lincolnshire flatlands. From then on it was incredibly flat as we sped along the impossibly straight and never-ending fen roads, through Scopwick and Timberland, over the modern Kirkstead bridge and on to Woody itself.

Woodhall Spa is nothing to shout about. It's a pretty enough place, set in a wooded area, but it is a bit flat and slightly too laid back (dead in fact) for our liking. The town doesn't really shout about its attractions, such as the Spas and the delightful Kinema in the Woods and does suffer from being host to the 'International Golfing Center' which fits well, I guess, with its inherent dullness.

English Electric Lighting Nr Tattershall
English Electric Lighting Nr Tattershall

The Bed and Breakfast, Lavender Cottage, didn't have much lavender and wasn't really a cottage - more of a bungalow in fact. Also we simultaneously arrived at the conclusion that our landlady's heart wasn't entirely in this B&B thing. Vegetarian or not breakfast consisted of mushrooms, bacon, egg, grilled tomato and a sausage. Standard issue from the local Budgens I suspect. Admirably, A. who doesn't like bacon tackled hers stoically without a word of complaint - bless her. The room itself was clean and smart, the bathroom was a bit small though and the electrics packed up in the night. At breakfast we met a middle aged couple from Ipswich whose son was at the Golfing Center and who travelled frequently on the Eurostar to their second home in Poitiers.

After breakfast and a good crap in the increasingly smelly bathroom (no electrics for the extractor fan remember) we set off on the next 30 mile leg of our journey to the plastic gun capital of Lincolnshire. Navigation was easy enough through Tattershall (where we spotted an English Electric Lightning in a field) and North of Coningsby, through Stickney and a myriad of tiny Fen villages and a pumpkin patch to the level crossing at Thorpe Culvert where we finally went completely awry and ended up in Wainfleet-All-Saints. Disorientated, it took us three passes through this rather grim village until we ended up on the A52 to Skegness which though busy was a surefire way of getting to our destination before sundown.

Skegness was busier than on our last visit, but that is hardly surprising considering the last time we were here was in April 2007. It looks much better in the Summer. Both hungry and thirsty we located a half decent looking restaurant (The Windsor), ordered some food and soaked up the seaside ambiance. After a stroll along the wonderful huge sandy beach and £1 worth of penny pushing excitement in one of the arcades at the Pleasure Beach we headed for the railway station to catch the 1615 back home contented that this was an enjoyable weekend well spent.

Monday, 14 September 2009


Lichfield is a pretty city. With two expanses of water (or Pools) sitting right next to the town and adjacent to the Cathedral it is well worth a visit. The Cathedral itself is spectacular and at night, with it's pointy spires, when not illuminated, looks rather like one of the Shadow ships from Babylon 5 thrusting up from out of the earth. A bonus is that unlike Great Malvern there are actually lots of places to eat in Lichfield, including the award winning Chandlers which is the place we chose for our evening meal.

Lichfield is fairly easy to cycle to from Nottingham - about 48 miles all in all if you go the scenic route via Shardlow, Aston, Repton and Burton on Trent. It isn't too hilly since it follows the Trent river valley, however be prepared for a few slopes around Repton and Burton. Also be prepared for the very bumpy roads which led to A's seat bolt snapping rather fortunately about 50 yards from a a cycle shop in Long Eaton.

Repton hosts a lovely tea-room, the Brook Farm tea rooms, an ideal stop-off for the wary cyclist and Repton also has the distinction of being the ancient capital of Mercia with a four king crypt in the impressive church.

Netherstowe House where we stayed was quite grand and provided a lovely room (The Garrick) but with a small bathroom. it is set in the middle of an housing estate but you couldn't tell.

We enjoyed Lichfield so much that we are looking forward to returning one day to see more of the sites and events that this historic town hosts.

Thursday, 3 September 2009

Runner Beans

After a disappointing start to our Runner Bean crop when I prematurely planted out the seedlings in a warm spell in May only to have them severely knocked back by a frost a few days later we are now inundated with them.
We have put them in stir-fries, curries, any and every meal we have and still they come.
They are delicious though, and high in protein. As a bonus the roots of Beans fix Nitrogen and so improve the soil in which they grow.
For me Runner Beans come highly recommended. Get some.

Thursday, 13 August 2009


Whilst checking out the new programming language Scala I suddenly had this strange urge to write a program to solve Sudoku problems. It occurred to me that the solutions to Sudoku could be found fairly easily using a recursive brute force algorithm. Anyway I put the Scala stuff to one side and reverted back to my old favorite Groovy.
Writing the code was fairly simple - the algorithm is rather straighforward...

solve( board )
foreach blank space on the board
for the numbers i = 1 to 9
if i is eligible (meets the row/col criteria)
set the blank space to i
if solve(board) returns true then return true
try the next number
if all numbers tried return false
if all spaces tried return true

The funky thing is that given a blank board the program will generate an entire Sudoku number set for you. Alternatively you can place numbers at random places on the board and then get the program to fill in the rest. An interesting thing to try is to attempt to find a pattern on numbers which takes the longest number of iterations to solve. Naturally, if the initial pattern fails the essential Sudoku criteria then no solution will be found by the algorithm and you will end up with the program making something in the order of 9^81 attempts before failing.

You can download my completed version from here.


Finally, my old Vaude panniers gave up the ghost so I decided that now is the time to splash out on a new set just before our (not so epic) Dorset holiday.

Though the Vaudes have been good they do have a few niggling design flaws (Vaude, are you listening?)

  • The side pockets are so tight as to be practically useless for stowing anything but the thinnest maps in them.
  • The zips on said pockets are quite flimsy.
  • The strap lengths that fasten down the top covers are short and poorly fitted to the pannier body.
  • And, finally - my biggest gripe - the hook mechanism that attaches the pannier to the bicycle makes the pannier very difficult to remove. The only way I ever found to remove a pannier from my bike was to give the handle a really rather violent tug. Similarity re-attaching the said pannier was difficult as the mechanism and claws are so tight.
Anyway - Evans Cycles managed to provide me with a lovely set of Ortlieb panniers (Ortlieb have been referred to as the 'Rolls Royce' of pannier makers). I must say I really am impressed with these panniers so far (1 Dorset holiday and 2 weeks of cycle commuting later). They address all of the niggles listed above. I particularly like the mechanism for attaching to the bicycle rear rack - it is designed to be robust yet easily adjustable without requiring any spanners or keys of any sort. The detach-attach mechanism is so smooth as to leave you wondering whether the bags really are firmly attached to the rack. Needless to say , all the time I have been using them, and that's over some rather rough terrain at times, I have never dropped an Ortlieb pannier. On top of this there is the legendary Ortlieb waterproofability and a set of carrier straps which can be hooked onto the pannier so one can carry around as a shoulder bag.

Of course - I've not had these panniers too long to make a decision about their durability, but I'll keep this blog informed as to how they are getting on.

Monday, 15 June 2009


Yesterday saw us engaging in a cycle trek to Asfordby. Originally we intended the final destination to be Melton Mowbray, but a combination of bad map reading and hills caused us to truncate our journey here.
We both found Asfordby a little disappointing. After pretty little village after village on our cycle through the Wolds to settle on Asfordby is kind of anti-climactic.
If you do ever get sidetracked on the way to Melton I would advise that you don't plump for this rather ugly little piece of suburbia as a substitute.

Wednesday, 10 June 2009

Monday, 8 June 2009

Network Forwarding

To me Networks are a black-art. So when I arrived upon the problem of connecting a newly acquired non wireless enabled Apple Mac to the internet which is on a wireless router I knew I would have a problem.
My proposed solution was to have a network cable between the Mac and one of the NICs in my Linux box (which is wireless enabled). Wiring this up wasn't a problem - the hard bit came when I needed to configure the system to route properly. Step by step here's what I did...

  1. Configure the Mac with an IP address, say
  2. Assign the NIC IP address in my Linux box to another address on the network, say
  3. Back on the Mac, set the router to point to the Linux NIC ( and the netmask to Set the gateway to your internet router gateway IP (ie
  4. Set IP forwarding on the Linux box.
  5. Add an entry to your router table on the Linux box which will direct all packets targeted for the Mac to the NIC card to which the Mac is connected (netmask
  6. Send all other IPs with address 192.168.11.x to your wirless NIC.
  7. Set the default Gateway to the internet router address (
  8. From the Mac you should now be able to ping your NICs on the Linux box but not or anything outside.
  9. Finally, to solve this probem, use the ARP Proxy settings to make the Linux NICs forward messages from the Mac.
Needless to say I would never have worked this out without the intervention of my good friend and Network Guru Steve Glass.

Wednesday, 3 June 2009


Just for the record; bought a new tyre today after a severe rear puncture in Thorneywood. Evans Cycles is a good source of Specialized Armadillo 700x25C , my favourite tyre.