Traffic Global for X-Plane Dev Diary – July

Originally published on https://www.justflight.com/articles/developers-diary-traffic-global-for-xplane-11

Welcome back, and congratulations on your persistence if you’ve been here from the start! This month’s diary needs to take a bit of a step back which, as will become clear, is very appropriate. I’d like to talk about something that happened during the internal beta, and I need to start by talking about my car.

Some years ago I bought myself a sports car – after long years of saving money, and a used one at that – but nevertheless, I got myself a Lotus. I’d wanted one for years, in fact from before I even had a driver’s license, without really knowing why. I was having it serviced last year when somebody else at the garage started talking about it and then immediately asked me what I did for a living. I said I was a software developer specialising in large databases and his eyes lit up, which is… unusual. Normally at that point people glaze over faster than New York in “The Day After Tomorrow”. Adding that I’m working on flight simulators rarely improves things (present company excepted). I pointed this out to him.

He said he’d found that every time he came across a Lotus owner – the place I take it to does quite a few of them – he asked the same question and almost inevitably, they were programmers, sysadmins, or something similar. I have absolutely no idea if this is actually true, but it’s an interesting question: if it were true, why might it be so?

Some time later I decided it was simplicity. If you’ve ever read Robert Pirsig’s book “Zen and the Art of Motorcycle Maintenance” you’ll know it as “Quality”, capital Q. My little Elise certainly doesn’t win any prizes on the pub bragging scoreboard; it’s not got a high top speed, nor is it the fastest off the line, doesn’t have massive power or a huge engine, it’s not luxurious, it creaks like a galleon under sail and yet… and yet, if you changed anything, it would be for the worse. It’s simple, and it does what it’s intended to do as well as it can be done, with the least possible fuss, and that right there is something that would appeal to software engineers.

Lotus’ design principle is simple. “Simplify, then add lightness”. In other words, don’t lose sight of what you’re actually trying to achieve. They still work to the principles of what the older generation would know as “good old-fashioned British engineering”, which means that everything’s done with physics – OK, occasionally string and physics – simply, elegantly and effectively; there’s no electronic stability control, active suspension, launch control or any of that stuff. Not because they were cutting costs, not because they couldn’t, but because the basic design means it doesn’t need them. Aeronautical examples might be the Spitfire, the Vulcan, the Mosquito – things which for some unexplainable reason just feel right in an undefinable way, which comes straight back to Robert Pirsig’s “Quality”.

Very simple, but very effective. Design done right.

Watch a modern jet at an airshow and it somehow feels different; it’s not elegantly working with nature, it’s using sheer power to bludgeon nature into submission. More capable in every way, absolutely, and yet just not right. Old fart mode on: That principle seems to be something that’s being increasingly lost. I was advertised at the other day about an internet-connected smart doorbell with video and AI facial recognition so you could tell who was there without having to rip your eyes away from the advertising on your phone. Well, back in my day, laddie, you used your knuckles on the door and it didn’t need batteries, wifi, rebooting, firmware updates, security patches, a constant cloud connection, the crowdfunded startup manufacturer to remain in business for the lifetime of the product and presumably a security guard to stop someone unscrewing the ferociously expensive thing and legging it. Knuckles just worked. Old fart mode off.

A couple of weeks ago I solved a bug which had been, well, bugging me for some time. The cause was a subtle arithmetic problem, a mix-up of two almost but not entirely identical values. I’d been battling this one for weeks and getting increasingly focussed on the detail rather than the overview. I’d fix one problem which would then cause another, repeat ad infinitum. More and more “special cases”, often an indicator of a deeper design problem, were being added. Eventually I did realise what the cause of the self-replicating sequence of problems was, so I took a mental step backwards to get back to the overview and… Wow. How did all that crap get in there?

So, for the last few weeks I’ve been going back through things correcting the initial misunderstanding and ripping out all of the special cases, exceptions and corrections that were layered on top of it. Adding Lightness. What’s left is simple, elegant and handles any data I throw at it – with a couple of exceptions, which are caused by one of the few remaining special cases and which are likely to work better without it. Once I complete applying the same basic fix to the rest of the navigation code I’m pretty confident that about half of what remains after that can also come out because it will then be near-identical to the half I’ve already fixed.

And this is why I was banging on about my car. It’s the Lotus design philosophy in action: if the physical design is right, you don’t need to “fix it in software”, eh, Boeing? In my case of course the main product is software but the principle stands. As soon as I’d seen my stupid mistake and corrected it in one place it somehow undefinably felt right – Pirsig’s “Quality” again – and the removal of all the added complexity just fell out the process organically. All of the stress I was feeling about not being able to solve what I knew should have been a fairly straightforward problem, damnit, fell out the process organically too.

Which just leaves the relatively minor stress about getting the details right! Interleaved with applying the fixes to the navigation systems, I’ve been fixing lots of annoyances, adding some small nice-to-haves and generally polishing. Maybe sandblasting in some cases. Both the number and the scale of the remaining open bugs are reducing. The sound system is in and working. The one thing that still needs substantial work is not having airliners taxying through each other, which apparently causes a certain amount of consternation even in virtual form.

I sat for some time a few days ago in a simulated control tower just watching airliners taxi around a busy airport – and I was happy. Partly relief, granted, but at this stage even I think I’m being weird. I’ve also been standing in the garden a lot, staring up at Easyjet flights passing overhead, trying to work out if I’ve got the sound attenuation right. I hesitate to think what the neighbours think I’m up to. Right now though, it’s round about dawn on a beautiful summer morning and I think I might just take the car for a walk to reward it for it’s insight.

Not quite time to ride into the sunset yet.

About the Author: jimkeir

0
0
1
0
1