Author Archives: Andrew

Caught by The Law!

Don’t get too excited. Those of you hoping to see me carted off in manacles and an orange jumpsuit will be sadly disappointed…

No, the law to which I refer is Moore’s Law, which states effectively, if you need reminding, that computing power doubles roughly every eighteen months.

Recently I’ve been doing some work to model a system in which two sub-systems collaborate by exchanging a very large number of relatively fine-grained web services. (I know, I wouldn’t have designed it that way…) The two partners disagree about how the system will scale, so it fell to me to do some modelling of the behaviour. I decided to back my analysis up with a practical simulation.

Working in my preferred environment (VB.Net) it didn’t take long to knock up a web service simulating the server, and a client which could load it up with either synchronous or asynchronous calls on various threading and bundling models. To make the simulation more realistic I decided that the service should wait, with the processing thread under load, for a given period before returning, to simulate the back-end processing which will occur in reality. The implementation should be simple: note the time when the service starts processing, set up the return structures and data required by my simulation, check the time, and then if necessary sit in a continuous loop until the desired total time has elapsed.

It didn’t work! I couldn’t get the system to recognise the time taken by the internal processing I had done, which threw out the logic for the loop. Effectively the system was telling me this was taking zero time. The problem turned out to be that I had assumed all processing times should be measured in ms. 5ms is our estimate of the average internal processing time. 6ms is our estimate of the round trip time for the web services. It seemed reasonable to allow a few ms for the processing in my simulation. Wrong!

It turns out that VB.Net now measures time in Ticks, which are units of 100ns, or one tenth of a microsecond. So I rewrote the timing logic to use this timing granularity, but still couldn’t quite believe the results. My internal processing was completing in approximately 1 Tick, or roughly 10,000 times faster than I expected.

Part of this is down to the fact that my simulation doesn’t require access to external resources, such as a database, which the real system does. But much of the difference is down to Moore’s Law. The last time I did something similar was around 10 years ago, and my current laptop must at least 100 times faster.

The moral of the story: beware your assumptions – they may need a refresh!

Posted in Agile & Architecture, Code & Development, PCs/Laptops, Thoughts on the World | Leave a comment

That’s Better!

After the less than excellent photo on the previous post, here’s one I’m quite pleased with. We did a trip to The British Library and St. Pancras Station on New Year’s Eve. Here’s a fascinating detail from the great statue Continue reading

Wednesday, July 9, 2014 in Photography

All Change…

Since I got the Panasonic GX7 I’ve been thinking about whether I could switch entirely from the big Canons to smaller cameras. Two things were stopping me: the GX7’s poor performance with action, and the fact that occasionally I need Continue reading

Webkit, KitKat and Deadlocks!

I don’t know what provision Dante Alighieri made, but I’m hoping there’s a special corner of Hell reserved for paedophiles, mass murderers and so-called engineers from big software companies who think there might ever be a justification for breaking backwards Continue reading

Tuesday, June 17, 2014 in Agile & Architecture, Android, Code & Development, Thoughts on the World

Busy Bee…

I’m sorry things have been quiet on the blogging front recently. I got back from my very restful holiday in Barbados expecting to take some time to find new work. Within two hours, before I could do anything, I had Continue reading

Thursday, May 29, 2014 in Micro Four Thirds, Photography, Thoughts on the World

The Achilles Heel

As regular readers will know, I’ve been very impressed with the Panasonic GX7, which is a remarkably capable little camera. It did the bulk of the work on my Morocco trip, and I have seriously been considering whether we have Continue reading

Thursday, May 1, 2014 in Micro Four Thirds, Photography

Man Up

This is a comedy thriller very much affecting the style of Carl Hiaasen. Hiaasen’s latest, the hilarious Bad Monkey, uses almost exactly the same Floridan and Bahamian locations, and reading this book almost immediately afterwards did feel a bit like Continue reading

Tuesday, April 29, 2014 in Reviews

Resistance

This is a fascinating book, although its title and blurb are rather misleading. I was expecting something along the lines of a Welsh Defiance (the story of the Belorussian Otriads which successfully battled the Nazis behind the Eastern Front), or Continue reading

Saturday, April 26, 2014 in Reviews

My First Android App: Stash-It!

After a couple of months of busy early morning and late night programming, my first Android app has finally been released. Please meet Stash-It! Stash-It! responds to an odd side-effect of the difference between the iOS and Android security models. Continue reading

Thursday, April 10, 2014 in Agile & Architecture, Android, Apps, Code & Development, My Publications, Thoughts on the World

The Concert for Jon Lord

Last Friday we attended a wonderful concert celebrating the life and music of the late Jon Lord, “musician and gentleman”. This unique event filled the Royal Albert Hall, both in front of and the stage, which as befits the man Continue reading

Tuesday, April 8, 2014 in Thoughts on the World

Getting Ahead of the Curve – Final Update?

When I purchased my Panasonic GX7 on the day of release, I did expect there to be a slight delay in getting software support (see here), but I got frustrated when no fewer than three versions of Capture One came Continue reading

Tuesday, April 1, 2014 in Micro Four Thirds, Photography

Scarily Bad

Reversing the scarily effective performance of Google Now, I just had a dangerous experience with Google Voice Typing. I attempted to make a note in a busy café with a lot of background noise. After I stopped talking it sat Continue reading

Sunday, March 30, 2014 in Thoughts on the World