In another place:
My reply there was complaining about sloppy or lazy programmers, however it did remind me of something a lecturer said many years back while I was at uni;
There are only 3 programs:
- The Input and Validate
- The Update
- The Report
And while this was really aimed at COBOL programming at the time (very early 80s), I do wonder just how true that still is today in other languages and systems and that maybe we’ve forgotten?
Sensors → (MQTT) Database → Display
Hours worked → Update Payroll → Print Cheque
I get the feeling that the validate is missing a lot of times - a recent example I noticed was viewing vehicles on ebay - Mileage: NaN. What does that tell you? The Input wasn’t validated or the Display wasn’t checked for an invalid (or more likely missing in this case) value? (And what’s the side-effect of a missing value when updating the database?) And similarly we read about utility companies sending bills for 100x the expected amount, or a much worse example might be the Horizon/Post Office scandal:
where at least one person died through suicide as a result.
Sloppy/Lazy programming? You decide…
-Gordon