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!

Detail from statue at St. Pancras station
Camera: Panasonic DMC-GX7 | Date: 31-12-2013 12:40 | Resolution: 4322 x 2431 | ISO: 1600 | Exp. bias: -66/100 EV | Exp. Time: 1/40s | Aperture: 4.5 | Focal Length: 20.0mm | Lens: LUMIX G VARIO PZ 14-42/F3.5-5.6

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 at the entrance to the station.

View featured image in Album
Posted in Photography | Leave a comment

All Change…

Low light long distance action test of the Panasonic GH4
Camera: Panasonic DMC-GH4 | Date: 08-07-2014 20:21 | Resolution: 1475 x 983 | ISO: 2000 | Exp. bias: 0 EV | Exp. Time: 1/200s | Aperture: 5.6 | Focal Length: 300.0mm | Lens: LUMIX G VARIO 100-300/F4.0-5.6

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 a more rugged camera, and neither of my existing Panasonics has any real sort of environmental protection. However with the announcement of the Panasonic GH4 there was a potential solution to both these challenges on the horizon, and I was gently thinking about getting one later in the year.

That was before last Friday, when out of the blue a close friend asked me “are you selling your Canon 7D”? He’d managed to dunk his in the Winter floods, and fancied buying a second-hand replacement of known provenance to tide him over until either the 7DII has arrived or the new Nikon D8100 has come down in price a bit. Of course, my answer had to be “yes”, especially when I established that Wex Photographic now have the GH4 as a stock item.

So on Sunday I started selling off my Canon kit, and on Monday the GH4 arrived. First impressions?

  • Same superb stills quality with static subjects as the GX7. Panasonic say that the two sensors are slightly different, and the RAW files are very slightly larger (by about 0.5% in each dimension) but I’m damned if I understand why as otherwise things seem to be identical.
  • It’s a nice size, very slightly larger than the GH2 and GX7, and fits very nicely in my hands.
  • It feels like a “professional” camera, capable of taking the odd splash or minor knock without problems. With the 12-35mm lens on it’s officially splashproof and dustproof, although just as with the 7D I’ll probably still put it in a rain cover in very harsh conditions. Also I suspect we won’t be auctioning off 50 year old examples held together with sticky tape, unlike a few Leicas of note…
  • It has a great electronic viewfinder, which really is not much different from using an optical one. However I’m not convinced that the colours in in-camera JPEGs completely match the viewfinders, which I thought was supposed to be one of their strengths.
  • The ergonomics and haptics are an improvement on the GH2 in some respects, but have ended up as a bit of an odd mix of physical switches, physical buttons and soft buttons or menu choices. Some are an odd compromise – there’s still a physical switch for focus mode, but you have to switch between “single shot” and “follow focus” in the menu system, which is very poor. Overall I much prefer the cleaner model of the GX7, but when I get the programmable elements of the GH4 set up to my satisfaction things may be better.

It’s too early to judge action performance. The frame rate seems to be as high as promised, but I haven’t yet been able to confirm whether the autofocus does the job. I tried shooting some dogs and rabbits last night, but in very low light, which meant even at ISO 6400 I was wide open on my lenses and at too low a shutter speed. The above was probably the best, but certainly won’t be submitted for any competitions. More practice required!

At least I won’t be struggling with software. After the long wait for GX7 Phase One delivered Capture One support on Monday, a few hours after the camera was in my hand. No complaints there…

Watch this space, and eBay if you want a lightly used GH2 or Canon 550D!

View featured image in Album
Posted in Photography | Leave a comment

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 compatibility. I suspect that over the past 10-15 years I have wasted more computing effort trying to keep things working which a big company has broken without providing an adequate replacement, than is due to any other single cause.

The latest centre of incompetence seems to be Google. Hot on the heels of my last moan on the same topic, I’ve just wasted some more effort because of a major Google c**k-up in Android 4.4.X, AKA KitKat. My new app, Stash-It!, includes a web browser based on the “Webkit” component widely used for that purpose across the Android, OSX and Linux worlds. On versions of Android up to 4.3, it works. However when I released it out into the wild I started getting complaints from users running KitKat that the browser had either frozen altogether, or was running unusably slowly.

It took a bit of effort to get a test platform running. In the end I went for a VM on my PC running the very useful Androidx86 distribution (as the Google SDK emulator is almost unusable even when it’s working), and after a bit of fiddling reproduced the problem. Sometimes web pages would load, sometimes they would just stop, with no code-level indication why.

After various fruitless attempts to fix the problem, I discovered (Google.com still has some uses) that this is a common problem. In their “wisdom” Google have replaced the browser component in KitKat with one which is a close relative of the Chrome browser, but seem to have done so without adequate testing or attention to compatibility. There are wide reports of deadlocks when applications attempt any logic during the process of loading a web page, with the application just sticking somewhere inside the web view code. That’s what was happening to me.

The fix eventually turned out to be relatively simple: Stash-It feeds back progress on the loading of a web page to the user. I have simply disabled this feedback when the app is running under KitKat, which is a slight reduction in functionality but a reasonable swap for getting the app working… However it’s cost a lot of time and aggro I could well have done without.

Can anyone arrange a plague of frogs and boils for Google, please?

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

Busy Bee…

Busy bee in the Loseley Park gardens
Camera: Panasonic DMC-GX7 | Date: 25-05-2014 15:12 | Resolution: 3274 x 3274 | ISO: 200 | Exp. bias: -33/100 EV | Exp. Time: 1/500s | Aperture: 8.0 | Focal Length: 35.0mm | Location: Loseley House | State/Province: England | See map | Lens: LUMIX G VARIO 12-35/F2.8

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 a query out of the blue from an ex-colleague I hadn’t seen for 10 years, and I was back under contract in a couple of days. (OK, technically that qualifies as “some time”, but you know what I mean…) I can’t say too much, but it’s a very exciting web- and service-based initiative in the automotive sector, which is new to me. It’s very interesting, but hard work between learning a new business, sorting out a problem project, and travelling backwards and forwards between the UK and Germany.

Hopefully normal service will be resumed when things settle down, but no sign yet!

Between last weekend’s storms, Frances and I managed to capitalise on the one sunny and dry session to visit Loseley Park. I took the Panasonic GX7 and the Lumix G Vario 12-35mm/F2.8 lens. This is far and away the best “normal” lens I have ever owned. Despite its relatively small size it really is just like a series of high quality prime lenses in a single box, sharp at all lengths and apertures and with vanishingly little aberration, even before processing. If and when I get a Panasonic GH4 the pairing will also provide me with a “rainproof” micro four thirds kit.

Photographing other busy bees at work requires a bit of patience, as they are constantly on the move, and I had my share of blank frames! However when I did get the subject in frame and in the focus zone, the hit rate was fairly high. Even though the 12-35mm is not a dedicated macro lens, you can see individual pollen grains on the bee’s back, which can’t be bad.

Enjoy these, and I hope you are busy enough, but not too busy.

View featured image in Album
Posted in Micro Four Thirds, Photography, Thoughts on the World | Leave a comment

The Achilles Heel

"Reverse Lartigue" at the Barbados Guineas 2014. And no, that's not the name of the horse, although it would be a good one!
Camera: Panasonic DMC-GX7 | Date: 28-04-2014 21:01 | Resolution: 3713 x 2476 | ISO: 200 | Exp. bias: -33/100 EV | Exp. Time: 1/250s | Aperture: 5.0 | Focal Length: 35.0mm | Lens: LUMIX G VARIO 12-35/F2.8

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 got to the stage yet where I could operate with just a Panasonic system and get rid of the big Canon kit which works well but is so heavy. The main question mark has always been over the Panasonic system’s ability to handle action. Unfortunately I can now confirm that this is not something the GX7 does very well.

As a deliberate experiment I took the Panasonic GX7 and GH2 rather than the Canon 7D and 550D on our latest trip to Barbados. (I did take the Canon S120, which is turning out to be a very capable little camera, but that’s a separate story.) For pictures of buildings and flowers, the GX7 works well, and as already established, in very low light conditions or where a “small” camera has a practical or psychological advantage it betters the large cameras. Then we took it horse racing…

I was prepared for the moderate frame rate of around 5fps, which while slower than the Canon 7D is a reasonable match for most other cameras. The slight lag of the electronic viewfinder was also expected, but is not a major problem and would be mastered with a bit of practice.

Beyond that, however, the GX7 displays two very different failure modes depending on how you operate the shutter.

With the traditional mechanical shutter in use, the cycle is as follows. First the shutter closes, and the camera resets the sensor. Then the shutter opens for the required time, exposing the whole sensor. The shutter closes and the camera reads the sensor, then the shutter opens, and the camera updates the display/EVF, metering and focus. In burst mode as soon as everything is stable the cycle starts again. The trouble is that the autofocus is either insufficiently quick or insufficiently accurate to hold a moving target, and the “miss” rate is very high, exceeding 50% in my tests so far.

The GX7 also offers an electronic shutter mode, in which the mechanical shutter stays open, continuously driving the display, metering and autofocus, and to take a shot the camera resets the sensor, and reads the data after the required exposure time. For some purposes where the subject is essentially static, like an HDR bracket or trying to capture a changing portrait expression, this works very well. However with a moving subject it fails miserably. The problem is that the camera resets, exposes and reads the sensor progressively, starting from the top and working down, and takes over 1/10s to do so. If during this the subject has moved you get an effect I have termed “The Lartigue” as it resembles the “leaning back” look common in action photos from Jaques Lartigue and other early 20th century pioneers of motion photography. Track the subject, which is something Lartigue and his contemporaries could not easily do, and the result is a “Reverse Lartigue” – see example above.

Oh well… I always knew that this would be a stretch, and taking the GX7 to a sporting event was a deliberate experiment with some risk of failure. Also I’m setting the bar very high by comparing with a Canon 7D, which despite being a five year old design is still near the top of the class in this respect. I did get a few decent shots, but the conclusion is that the 7D stays for now, and gets an outing at least when I know the subject is action. What will be very interesting is to repeat the experiment with the new Panasonic GH4. Watch this space…

View featured image in Album
Posted in Micro Four Thirds, Photography | Leave a comment

Review: Man Up

By Alex Cay

Fun, but a very high body count!

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 a slightly distorted echo. It would be refreshing to see some authors writing this style of work but against less stereotypical backgrounds, and I hope Alex Cay does so with his future books.

That said, Man Up! is a good example of the genre, and well worth a read. It zips along at a good pace, with enough plot intrigue to keep the reader entertained, even if some twists are rather predictable, and is regularly punctuated with almost slapstick comedy which made me laugh out loud on several occasions.

The central character is a sports agent, and in this case was dealing with ice hockey. In Britain this is very much a minority sport, and the copious ice hockey references and terminology in the first couple of chapters put off at least one reader I know. Keep going and once the real action starts the sports context is no longer such an issue, but if the author wants the widest readership this is something to watch in the future.

I liked the writing style, and was impressed by how Alex Cay had captured the nuances of dialogue for the English characters versus the American ones very well. On a slightly more negative note he has adopted a habit of writing for emphasis One. Word. At. A. Time., which is rather off-putting, and I’d suggest trying to find a smoother alternative.

The book is populated with a range of interesting characters, but in many cases you don’t get to learn much about who they are, or how they have got to where they are, and a bit more background would work well. There are no “supermen”, and a number with very real mental limitations, but almost all the men are enormously well provided in the trouser department, which seems to destroy the good judgement of several otherwise single-minded female characters. I did like the animal characters, including two homosexual bull mastiffs and a shark nick-named Elvis!

This is a tale of stupid wealthy people, corrupt spies and incompetent hitmen, and a large helping of sex and violence more explicit than some other books in this genre is unavoidable. The high body count is actually quite comical, but be prepared for some writing which is not exactly “family friendly”.

Overall I enjoyed the book, and I look forward to reading some more of Patrick Finn’s adventures in the future.

 

Finally, I’d like to say a big thank you to the author Alex Cay for providing a review copy of this book in Kindle format. I do most of my fiction reading when travelling, and it’s really annoying that most publishers and review commissioners, notably and inexplicably including Amazon themselves, still insist on providing review copies in hardcopy form. Thanks to Alec for doing the right thing.

Categories: Reviews. Content Types: Book, Crime / mystery, Fiction, and Humour.
Posted in Reviews | Leave a comment

Review: Resistance

By Owen Sheers

A Fascinating but Disturbing Alternative History

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 Secret Army, but in reality the “Resistance” of this book’s title is most notable by its almost total absence. This is in many ways a much scarier story, about how a German invasion of Britain might have succeeded, but I understand totally why the author didn’t choose instead to call it Collaboration.

At one level, this is a masterful and almost believable re-telling of the progress of the Second World War with a completely different outcome, reminding us how many of the key points individually turned on the narrowest of margins provided either by blind fortune or inexplicably poor German decision-making, both of which could easily have been reversed. How, for example, D-Day could have been scuppered by poor weather, or a single effective German spy operating on the right part of Britain’s South Coast. With only a couple of such reversals the Britain of the story leaves itself open to a successful German invasion in 1944.

The bulk of the story is then a study of how war-weary British communities and German soldiers progress, as much through pragmatic accommodation and grudging acceptance as overt surrender or collaboration, to some form of settlement. As a study of human behaviours in hard times it’s excellent, but it’s empathically not a stirring tale of derring-do. The book also ends with the disposition of most of the central characters left open – I would have preferred a more definite outcome, but that would perhaps have closed things down where the book deliberately tries to portray sources of ambiguity.

The story focuses on a small farming community in the Brecon Beacons, between Abergavenny and Hereford, an area with which I have strong family connections, including a great Aunt and Uncle who farmed in a small valley in the Beacons, very like the central community. As such I very much enjoyed the portrayal of so many places I know. I have even drunk in the only pub which gets mentioned by name!

The author, Sheers, is primarily a poet, and his writing paints a very expressive verbal picture of the land, the events and the people of the story. My usual taste in fiction is more focused on action, but accept the style of the book and you will be fully absorbed by this story, even though it is not a comfortable one.

Categories: Reviews. Content Types: Book, Fiction, Historical novel, and History.
Posted in Reviews | Leave a comment

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. On the iPad, there are a large number of applications which offer an “all in one” approach to managing a group of related content. These are a bit frustrating if you want to share files transparently and seamlessly between applications, but there are times when you want to manage a group of files securely, and then the iOS approach is great.

Android is the original way around. The more open file system and component model encourages the use of specialist applications which do one job well, but it can be a challenge to keep related files of different types together, and hide them if you don’t want private client files or the like turning up un-announced in your gallery of family photos!

Stash-It! tries to plug this gap, by providing an “all in one” private file manager, tabbed browser and downloader for Android. You can get all these functions independently in other apps, but Stash-It! is the only one which brings them together in one place. It’s the ideal place to keep content you want safe from prying eyes: financial and banking records, health research, client documents. I suspect a few will even use it for a porn stash, but that’s not its only use! 🙂

There are built in viewers for most common image and movie formats, plus PDF and web files, so you don’t have to move these outside the application to view them. However when you do need to use an external application Stash-It! has a full suite of import and export functions to move your files or open them with other applications.

It took a while to design the security model. Stash-It! encrypts the names of files so that they can’t be read, and won’t be visible to the tablet’s gallery and similar applications, but the content of your files is untouched, so there’s little risk of losing data. Hopefully this strikes a sensible balance between privacy and risk.

Even if you’re not too worried about privacy Stash-It! is a great place to collect material related to as particular project, with all your different file types and web research in one place. You can bookmark web links, but also positions in video files or PDF documents. Web pages can be saved intact for reference or offline reading. Again you can do a lot of these things in separate apps, but I believe Stash-It! is the first one to bring all these functions together where you might want them.

I’ve got a lot of ideas in the pipeline to improve it further, but its now time to test the market and see whether I’ve spotted a gap which needed plugging or not.

Take a look and let me know what you think!

 

Here’s the Google Play Page. You can also read the helpfile.

Posted in Agile & Architecture, Android, Apps, Code & Development, My Publications, Thoughts on the World | Leave a comment

The Concert for Jon Lord

Deep Purple Mark 3.5 + orchestra giving "Burn" some wellie!
Camera: Canon PowerShot S120 | Date: 04-04-2013 20:41 | Resolution: 3785 x 2524 | ISO: 800 | Exp. bias: 0 EV | Exp. Time: 1/25s | Aperture: 5.7 | Focal Length: 26.0mm

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 who dedicated himself to merging orchestral and rock music, was largely filled by an impressive 80 piece orchestra, with only a small space at the front for the soloists and rock musicians.

After a few emotional introductions, the concert started with the first movement of the Concerto For Group And Orchestra, which led into a first half entirely devoted to Jon’s orchestral music. The highlight was undoubtedly a stunning rendering of Sarabande. The last time we saw Jon Lord was at the Sunflower Jam 2011, when he did a spine-chilling version with a solo violinist. This was quite different, as conductor and musical arranger Paul Mann used the full power of the group and orchestra at his disposal, and re-cast Sarabande as a rolling battle between the strings, and everyone else.

The second half followed a very different vein, with a focus on Jon’s rock music. Things got off to an excellent start with Paul Weller re-creating The Artwoods and running through a couple of their rocking 60s numbers – which I have on 8-track cartridge! Next up was the music of Paice Ashton Lord. Ian Paice and original bassist Bernie Marsden were supplemented by Don Airey, and a young Irish singer, Phil Campbell, who did great justice to the lyrics and vocals of the late Tony Ashton.

The focus then moved on to Deep Purple Mark 3/4, firstly with an orchestral version of Soldier of Fortune, then with the arrival of original bassist and backing vocalist Glenn Hughes, Bruce Dickinson joining on vocals, and a second keyboards slot filled by Rick Wakeman. This set included the ballads This Time Around and You Keep On Moving from the under-appreciated post-Blackmore album Come Taste The Band, for which Hughes and Lord obviously shared writing duties, but the crescendo was Burn. This was a great choice – a true Purple anthem which we will never hear from the current Glover/Gillan line-up, it showcases Hughes’ falsetto vocals which are undiminished from the 70s, and it has two organ solos, one each for Wakeman and Airey… Add an enthusiastic full orchestra and, I swear, the Albert Hall’s enormous pipe organ, and the sound was felt as much as heard.

Finally, the stage re-filled with the current Deep Purple line-up. They started their set with a couple of more recent tracks, including their own tribute to Jon Lord, Above and Beyond. They then got stuck into a selection of more classic tracks. Some, like Black Night, were played straight by the band, but appropriately most were re-cast to exploit the orchestral musicians. The two which particularly stick in my memory are Perfect Strangers, with the haunting riff perfectly suited to a large string section, and a unusual but very effective version of Lazy, with the lead guitar part played largely by a violin!

The culmination of the evening was an “all hands” version of Hush, featuring the full orchestra and for which many of the other solo musicians were invited back on stage. With more than 10 rock musicians and almost 80 orchestral ones this threatened to lift the Albert Hall’s famous roof, and clearly great fun was being had by all. Those who have criticised Jon Lord’s attempts to merge rock and orchestral music could not have been proven more wrong.

All in all, a fitting tribute to the great man.

View featured image in Album
Posted in Thoughts on the World | Leave a comment

Getting Ahead of the Curve – Final Update?

Picadilly by the light of the video wall, Canon S120 wide open with both aperture and zoom
Camera: Canon PowerShot S120 | Date: 08-02-2013 17:07 | Resolution: 4824 x 3015 | ISO: 250 | Exp. bias: 0 EV | Exp. Time: 1/100s | Aperture: 1.8 | Focal Length: 5.2mm

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 and went without it.

However my patience has finally been rewarded with V7.2.1. This not only delivers full support for the GX7, but has also dramatically upgraded the support for my equally new Canon S120. This produces RAW files which at the wide end of the zoom have very dramatic geometric distortion, so strong it was impossible to correct manually, but in the new version the built-in C1 support corrects them perfectly, with neither geometric nor chromatic aberration evident even at pixel peeping levels.

While I’m still slightly peeved about the time it took (a grand total of 6 months!), I’m very impressed with the results.

View featured image in Album
Posted in Micro Four Thirds, Photography | Leave a comment

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 and tried to take in some of the other sounds as well, and then tried to parse what it had heard.

The result: one four letter word, a colloquial term for excrement! That’s not what I said…

Posted in Thoughts on the World | Leave a comment