Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Sunday, April 19, 2020

Modeling: Uses And Abuses

     Because of the atrocious abuses Americans have endured under the “authority” of what some computer model says, there have been a spate of reactions against models and modeling as such. Inasmuch as simulation and modeling were my specialties before I retired, I feel an obligation to present some actual reasoning about modeling: how it can be used constructively, and what happens when it’s abused as it has been over this Wuhan virus nonsense.


     First: What is a model? Have you thought about that at all? Or have you merely regarded it as a source of “knowledge” about some particular phenomenon?

     A model is emphatically not a source of knowledge. It may incorporate actual knowledge, but there are no guarantees. All a model can do is emit predictions: specifically, how a delimited system will behave if the assumptions built into the model are correct.

     The construction of a model is a mathematical exercise:

  1. Make some assumptions about how the system of interest works: i.e., its causal mechanisms.
  2. Express those assumptions as behavior over time, in mathematical form.
  3. Implement that behavior in a computer program that simulates the passage of time.

     That’s only slightly simplified. The complexity inheres in the formulation of the assumptions about the system’s causal mechanisms.

     Here’s a really simple case of modeling: Imagine an organism – say, a lily pad – that resides in a pond of fixed size. Let’s assume, whether or not we have a good reason for it, that the lily pad grows. Assume further that we know the rate of growth and how it relates to the lily pad’s current size. For the sake of this example, let’s set the rate of growth at 100% per day – i.e., the lily pad doubles in size with each passing day.

     To complete the model, we must set some initial conditions:

  • The initial size of the lily pad (i.e., on “modeling day 0”);
  • The size of the pond.

     Let’s set those at 1 square foot for the lily pad and 1024 square feet for the pond. (See what I did there?) Now we run the model.

     Why, lookee here: on day 10 the lily pad has covered the entire pond! Amazing! And on day 11 it’s covered twice the area of the pond! And on day 12 it’s covered four times that area! And…and…and…

     If you’re still awaiting the punch line, you’ve read past it. A lily pad requires the pond beneath it to live, much less to grow. It cannot expand beyond the pond’s borders. So after day 10 the model is producing fantasies about “The Lily Pond That Ate Minnesota.”

     Perhaps the assumptions are too simple, too dismissive of unmentioned considerations. Even if we have the lily pad’s initial growth rate correct, there are other factors we shouldn’t neglect. The pond might not be of a regular shape. The pad might not start from a regular shape that it maintains as it grows. And there’s that little matter of the fixed-size pond to cope with. Clearly, this model will not tell us anything about a real-world situation.

     Everything depends on whether the model incorporates as its operating assumptions the real behavior of a real lily pad on a real pond. Other commentators have called this the “spherical cow of uniform density” fallacy, in reference to some other model I can’t even try to imagine without erupting in uncontrollable laughter.


     So of what use is a model? Of what use could a model possibly be?

  • Models can help us explore the consequences of our assumptions about physical systems.
  • They can prepare data sets to be used in confirming or disproving scientific hypotheses.
  • And when the model incorporates accurate assumptions about the behavior of a system:
    • It can generate data about what we can expect from that system…
    • …but only as long as the model’s assumptions continue to apply!

     For there is this about all knowledge, regardless of its specific character: it will possess a domain of applicability: a range of conditions outside which it no longer applies. Even the best models, built solely upon well-confirmed knowledge about the systems they simulate, can only predict accurately in the near term. The passage of time tends to pull the model outside its domain of applicability, just as the physical limits to the pond destroyed the applicability of the lily-pad model above.

     A responsible expert will not present a model – not even one that has generated accurate predictions in the past – as a source of reliable information about the future. He certainly won’t present it as “proof” of anything. Every sentence he utters will contain the most important of all words: if. Ironically, he might await the data reality “generates” to find the limits on his model’s domain of applicability.

     Knowledge is about causal mechanisms and the power to predict outcomes. Therefore, in the nature of things, a model cannot generate knowledge…only test data.


     Have a final humorous example of the constraints applicable in modeling. A mathematician who fancied himself a demography expert was powerfully impressed by the reproductive rate of the peoples of China. He tried to use it in a classroom setting as a real-life example of an infinite series, thus:

     “Imagine,” said the professor, “that you could form the whole population of China – about one billion persons – into a column of marchers, four abreast, each row six feet from the one before it, and march it off the edge of a cliff at walking speed – about 3 miles per hour. How long would it take for the column to come to an end?”
     After a number of students proposed answers, the professor waved them all aside. “It would never come to an end! The Chinese reproduce so fast that the back of the column would be refreshed at least as fast as the front eliminated itself!”
     The class was impressed by this for an interval. Then a student at the back raised his hand.
     “Yes, Mr. Smith?” the professors said.
     “But Professor,” Smith said plaintively, “how could that be? They’d be marching.

     Have a nice day.

Sunday, February 9, 2020

Hostile Technology: A Vent

     I am a retired engineer: a technologist by trade. Thus, I expect to find the technology I confront comprehensible. Sadly, that isn’t always the case. These days, now that there’s software in everything, the software artisan in me is often close to apoplexy.

     Many have been the times when a badly designed website has made me want to ferret out the designer and throttle him to within an inch of his life. This impulse becomes especially strong when the website in question is one that offers something for sale that I’d like to purchase. Worse still is when the website is operated by some vendor with whom I must do business – e.g., a local utility company – and I can get assistance from that vendor in no other way. Such companies have little idea what they’re doing to themselves with their websites’ poor human engineering.

     But today’s adventure isn’t about a website. Oh no. It’s about something even more diabolical. Yet it’s a device you probably already have, and have learned to cope with.

     Yes, that’s right, Gentle Reader: The Last American Without A Smartphone has just acquired a smartphone. I didn’t want one. The proliferation of Internet two-factor security systems that require one has forced my hand.

     “They’re really simple and convenient,” said my beloved wife Beth, whose uses her phone mostly for playing variations on Bejeweled. “It’s like having the world in your hand. You’ll fall in love with it.” I forbore to comment.

     The lovely young lady who assisted me in this purchase advised me not to get a bottom-tier model. (She assured me she wouldn’t get a commission on the sale.) She steered me up the pyramid to what she called a middle-of-the-road device. I walked out of the store $560 poorer, with a device I had no idea how to use even to make or take a phone call. I sit here today fulminating over this purchase, and I shall tell you why.

     First, the phone doesn’t come with a User’s Guide. Oh no. That’s so last year. It comes with a “Quick Reference Guide”...which doesn’t tell you how to turn the thing on, much less how to make or accept a call. So I went to the vendor’s website to search for a downloadable User’s Guide. Believe it or not, Gentle Reader, I had to compel the website’s Help system to connect me to a human assistant to find the damned thing and download it...and it still didn’t tell me how to turn the phone on.

     I figured it out by experimentation, after nearly twenty minutes’ frustration. But that was just the start of my agonies. Now I had to figure out how to make a call.

     The phone’s home screen tells you nothing. It’s covered with icons, but there’s no help available for what they do. Hie thee to the User’s Guide, Fran! Which I did. But would you like to guess how far into that document I had to read to find out how to make a call? I was fifty pages deep into the thing before I threw up my hands. Then I asked Beth, who has a similar model. The procedure is relatively simple, though I wouldn’t call it intuitive. But there’s worse.

     The key to making the mastery of a new device pleasant is consistency of approach. Fundamental operations should be uniform. That makes them easy to master: the application of a common vocabulary of basic actions to a range of operations. How was I to know that phone calls are no longer considered fundamental operations on a phone?

     You’d think that a touch-screen device festooned with tap-and-go icons would use a tap-and-go approach to invoke the operations they govern. And that is indeed the case...with one exception that’s impossible to intuit. The exception: Accepting an incoming call.

     The ring tone sounds, the screen illuminates, and the number of the caller is prominently displayed. Below it are two icons: a green handset and a red handset. Green means “go,” right? So I tapped the green handset...and the ring tone continued uninterrupted. I tapped it again. I tapped it twice in rapid succession. I tried holding it down. No dice: the call went to voice mail.

     I couldn’t decline the call by tapping the Red handset, as I discovered soon afterward. The call still went to voice mail.

     The Quick Reference Guide was no help. Apparently, as with turning the device on, the knowledge of how to accept an incoming call must be transmitted genetically from father to son.

     Where’s that damned User’s Guide again? Read, read, scratch head, read further...did I buy a camera by mistake? Or perhaps a handheld PlayStation? Ah, here we go: Answering a call. I only had to read 77 pages to find it. So what’s the secret handshake?

     What? I have to swipe the green handset icon to the right? Swipe? Everything else this damnable device can do is accessed by tap-icon-and-go, but this, the most important thing anyone has ever done with a phone, has to be different?!

     This is evil. This is a mortal sin against good design principles. This is worthy of a life sentence programming a PDP-8 with nothing but an ASR-33 teletype.

     I hate this thing. I want to return it. But I can’t. I need it now. The world around me has decreed that Thou Shalt Have A Smartphone. I’d settle for slowly torturing the designer to death, but I suppose the satisfaction from that would be fleeting.

     I’m told the top-tier units are even less oriented toward making and taking phone calls. I suppose I should take comfort from that.

     Excuse me? You want to know the make and model? It’s a Samsung Galaxy A50. With this execrable device Samsung has guaranteed that I will never again buy any of its products. But this one, I’m stuck with. And please, don’t regale me with the improved ease of use and incredible new features the coming models will offer. I’d rather use a Dixie Cup on a thread...if it could send and receive text messages, anyway.

Wednesday, December 18, 2019

Incandescent Fury Edition

     I’ve been told – more than once – that a man of my years should not allow himself to become furiously angry. It’s bad for the cardiopulmonary system, they say. I am quite willing to believe it...but all the same, there are incidents that simply demand an angry response. And I’ve just had one.

     I’m a retired software engineer. I was a damned good one, at that. For many years I was considered a high authority in my field (real-time software). So I retain a powerful appreciation for that field, its disciplines, and the constraints under which software artisans must labor.

     Among the absolute, inviolable commandments of software engineering, there is one that every practitioner must absorb so deeply into his psyche that it can never be expelled:

Thou Shalt Not Lose The Customer’s Data.

     It’s the gravest sin in the field. The customer’s data is invaluable. It represents his time, judgment, labor, and much else. Sometimes it’s the bedrock of his business, without which he’d be on the bread lines. So a practitioner who loses the customer’s data is going to catch hell. He’s often unable to continue in the software trade.

     Well, this morning a program lost my data. And I’m ready to chew girders and spit rivets.


     The Brave browser, which I’ve used for a couple of years, first attracted me by promoting its integrated ad-blocking and some innovative security features. As ads are consuming an ever greater fraction of Internet bandwidth, and Web security is as great a concern as ever, I liked what I read about it. So while it was still in the beta-test stage I downloaded it and endeavored to transition to it.

     Beta-test software is still “under development.” The engineers are still laboring over it: adding features, fixing bugs – when they can distinguish them from features, at least – and refining aspects of the program such as ergonomics and esthetics. So I was rather cautious about my use of Brave for quite some time. Over time it advanced in reliability, and my level of caution diminished.

     This morning I was running Brave V1.1.22: an official, post-beta release and the most recent one. As many writers do, I keep a rather extensive set of bookmarks in my browser, divided into folders according to their application. That’s “customer data” as it pertains to a Web browser. If there’s anything a browser is absolutely forbidden to do, it’s to lose that data.

     But Brave did so – and for the third time in the past two months, at that. The details follow.

     I had a page open that I wanted to add to my “Future Columns” bookmark folder, where I keep links to pieces about which I intend to write later. That folder already contained five links. I sought to add a sixth. So I right-clicked on that folder, clicked on the pull-down menu choice that says “Add page”...and the whole folder was deleted.

     The first time that happened, I persuaded myself that it was my fault. Perhaps a visual aberration had caused me to click the wrong menu choice. I resolved to be more careful thereafter.

     The second time it happened I was incensed. I was certain I’d done what I intended, and that most certainly wasn’t to delete a folder full of valuable links. Fortunately I was able to recover most of those links from an export I’d performed a week earlier. However, I held back from dismissing Brave as my default browser. I should have known better.

     This third time I was unable to recover any of the data Brave had deleted.


     Not only have I been a Brave user these past couple of years; I’ve also promoted it to friends who’ve complained about the proliferation of ads that made Web browsing an annoying chore. This morning I regret having done so. I’ve already reported my experiences and my anger to Brave’s support community. However, I shan’t return to using Brave unless and until I receive absolute assurance that:

  • Brave alerts its user community to the existence of this elusive, randomly striking fault;
  • The problem has been investigated and reproduced;
  • The nature of the fault has been determined and the problem has been fixed;
  • Brave’s developers issue a mass mailing to their users about the repaired edition.

     To lose a customer’s data is the gravest of all software sins. I will not forgive it without a sincere admission of fault and a crash effort to find and fix the problem. Nor will I back up my bookmarks every few minutes just to be on the safe side. So for the time being, it’s back to Chrome.

     Beware, Gentle Reader.

Tuesday, October 16, 2018

Quickies: A Problem In Natural-Language Processing

     A famous example of how much context matters to the interpretation of a “simple” communication goes like this: A standard “nuclear family” – husband, wife, two minor children – is depicted with the wife saying to the husband, “We’ll have cake as soon as the children wash their hands.”

     To whom is the wife really speaking? What is the actually intended audience, and what is the true intended consequence?

     That one is fairly obvious, yet it would be difficult for a software language processor to decode. A lot of context is required to make sense of it, yet we Mark One humans would have no difficulty figuring out what’s really being said and to whom. That includes the postulated minor children.

     Here’s another from just this morning. While getting ready to leave for work, the C.S.O. said to me, “I’ll get my contacts after work.”

     I can think of three different ways to interpret that statement, only one of which is consistent with the context. How many ways could you interpret it – and what are the odds against a program getting it right?

Tuesday, May 31, 2016

Quickies: Heads Up, Gentle Readers!

     Because if you haven’t yet heard about this, it’s time that you did:

     For months now, Microsoft has done everything in its power to shove Windows 10 down your throat. The free update is mandatory at this point, and we’ve heard from many Windows users who discovered their computers updated to the newest version automatically, without their knowledge or explicit permission. Microsoft kept offering excuses for these annoying occurrences, and even said it will stop pushing upgrades to Windows users who refuse to hop aboard the Windows 10 train.

     Now, the company has come up with its most evil trick yet to get you to update your PC to Windows 10, and it’s based on the same methodology hackers use to trick people into installing malware.

     Pop-ups often appear when you visit malicious websites and when you click the “X” to close them, malware is installed on your computer. Well, Microsoft just tweaked its Windows 10 upgrade alert pop-up so that the update is triggered when clicking the X, PC World explains.

     I’ve used, and mostly approved of, Microsoft products since 1978: thirty-eight years. I’ve also defended the company against some of the specious criticism it’s received. But this is a step too far. Should this “upgrade” be forced on me, and should it prove incompatible with any of the programs I rely on, I intend to wipe Windows from all my computers and install something else – something that doesn’t allow anyone to override my decisions about what I want or don’t want installed on them.

     Had this been an openly announced policy, I would never have done business with Microsoft. As it is, I feel that my trust has been violated. Such behavior must be punished, lest it become commonplace.