Saturday, 13 June 2020

Are we nearly there yet?


I have suffered (may be too strong a word) a sequence of changed aspirations for a simple development task. This is not uncommon in the realms of corporate IT departments where projects often grow willy-nilly to a point where they ultimately collapse under the weight of their own ambition. That was less critical.

I set out to do a straightforward demonstration of programming SVG from JavaScript. This topic did not get any coverage in my book on learning to program JavaScript but felt afterwards to be an omission for anyone who read that book primarily to develop the basics of HTML5 game programming. This aspiration coincided with my rediscovery of a slide rule that had been among my late Father’s effects.

It turned out that drawing slide rule scales using SVG was effective but proved a poor demonstration of SVG in general. So I wrote a blog post that went on from the introduction to tackle more of SVG. I still wanted to complete the slide rule though with the eventual result of a virtual and interactive version.

Inevitably, I went further and added some displays to clarify the slide rule “output” during its operation. Not content with that I then added some sample problems that (with a bit of user interaction) could demonstrate how slide rules were used for anyone born much after the middle 1960s. Job done, so I posted the web page for anyone who might be interested.

Trouble was – the web page started to niggle. Things had shifted from demonstrating SVG, through demonstrating a slide rule to the quality of the web page as an interactive demonstration. It fell a little short.

The basics were OK. The slide rule worked fine. The display of scale values needed a tweak or two to better match the ability of a human to estimate positions between rule graduations at different locations along a given scale. The big issue was the invitation to the page visitors to try some specific slide rule based calculations. The most obvious paradigm for the modern age would be an electronic calculator but I had ducked that the first time around as “off topic”. It was time to revisit that decision.

The new version was also a good opportunity to clarify that tangents for angles greater than 45 degrees could be found using the existing scale (well up to 84 degrees anyway) and that the S scale can be used to obtain cosines. I also added log10(x) and 10x (antilogarithm) function keys to the original trial set to exercise the L scale and because (if you are happy to play with logs) you can get other powers and roots of numbers.

The virtual calculator probably has some idiosyncrasies and it should certainly be remembered that it is only as accurate as the virtual slide rule. Results can and will differ from your personal calculator or spreadsheet.

No comments:

Post a Comment