I wonder how it damages them.
I wonder how it damages them.
Obviously you could design this sensibly so that no legal inputs result in malfunction let alone damage, but that might cost more, so, do it all in software right? And then you're at the mercy of the software and anything (such as the OS kernel) which that software depends on.
We do teach Computer Science / Software Engineering students not to do this, showing them e.g. the Therac-25 incident as an example of why software control isn't enough - but well, check out how many HN regulars are proud that they either didn't pay any attention in class or never attended and are "self-taught".
SANE (the Free Software document scanner software) has run into cases where it's just cheaper to have code that checks "Is this the end of the bed? If so, turn off the motor" than spend five cents on a limit switch or one cent adding a stop so that the scan head physically can't fall off. Somebody reverse engineering a driver sends "Move scan head" and, to their astonishment, it falls off its rail and their scanner is broken. Oops. Now, who feels comfortable shipping that to users knowing if your finished driver didn't catch every edge case you might destroy their scanner?
TWAIN (sometimes said to mean "Toolkit Without An Interesting Name") looks like it's a universal API for scanners, except, the mandatory parts just spin up a graphical user interface and that does all the actual work. There is no actual scanner technology in TWAIN, each scanner comes with its own GUI plus scanner driver bolted into one app.
So in TWAIN there is no API for like "Scan A4 document, 300dpi" only "Make whatever Twain GUI I have appear" and when you buy a scanner it just comes with a CD (I guess these days they tell you to download it probably? I have not set up a new scanner in decades) with the software on it.
But SANE does what people assumed TWAIN did, the GUI application software is neutral, and the code for driving scanners has APIs for scanning documents, because that makes more sense (and also, frankly, "reverse engineering USB code" and "building easy to use GUIs" are not the same skill set). As a bonus it means you can network SANE, just by adding an RPC layer, whereas for TWAIN you'd need like RDP or something. Blergh.
It's because companies want "superstars" (ie: underpaid people with something to prove by spending a whole bunch of unpaid overtime in order to get $50k at the end of 2-3 years when the company is sold)
The truth is in the hardware game, you end up cutting corners in order to deliver something someone will buy because if you're a dollar pricier than the next guy noone will build your plastic AF product.
That comes from a culture of engineering that focuses on learning and continuous improvement, otherwise we'd just be fixed in time the moment we left school.
In general, it's quite common for USB device firmware to be of extremely poor quality; it'll be tested and bugs fixed until it works with the target OSes and drivers, but no comprehensive testing of whether it can deal with all possible standard request patterns is done.
Now let's say you have a high power Amp configured correctly for mixing a -24db classical music recording and then the OS glitches out and you hear 0db noise. That might blow up your speakers, headphones, or even worse, your ears.
My experience writing kernel drivers for audio software is that Windows will accept the click sound and then stop processing if the buffer runs dry. OS X used to have issues that it'll continue playing, meaning it'll reinterpret random memory as sound. Not sure if that was fixed in recent Mac versions, as their approach does have memory & performance benefits. But it means that audio driver glitches on Mac can be physically painful for the user.
I experienced one glitch like that while mixing with headphones, it's hard to describe how loud it was, a bang in my ears that made me fall and left me shackling for a few minutes. If you have ever be surprised by headphones at max volume, imagine it's even (way much) louder (because music at max volume is not a full 0db white noise). To this day I now avoid playing with plugins with the headphones and only put them for the final mix/mastering.
> I’d call it a firmware problem if the motors can be commanded to move too fast
So it sounds like they agree with you.
(Edit: typo)
Also, I initially misread this as National Instruments and imagined a DJ programming in LabView, LMAO.
This made my day. This is one of the funniest things I have ever read.