6 ms·
As I understand it the Kontrol S4 has moving parts (essentially motors) under USB control. Obviously you could design this sensibly so that no legal inputs res
by tialaramex 6y ago
As I understand it the Kontrol S4 has moving parts (essentially motors) under USB control.
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?
- bigbubba 6y agoSounds like a nightmare, I guess SANE is an ironic name?
- wahern 6y agoIIUC, that example seems more like an indictment of the scanner manufacturers, not the developers of SANE. SANE includes that code because some manufacturers didn't implement such a simple, obvious, and crucial constraint in the hardware. Unless maybe the poster's point was that the SANE developers shouldn't try to support such fundamentally broken hardware?
- bigbubba 6y agoI didn't mean to suggest that SANE was a poor project, I guess I just supposed it was sort of gallows humor from developers working on a hard problem.
- tialaramex 6y agoSANE (Scanner Access Now Easy) is named that way because it does what people on minority platforms assumed TWAIN does on Windows / MacOS. 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.
- WrtCdEvrydy 6y ago> many HN regulars are proud that they either didn't pay any attention in class or never attended and are "self-taught". 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.
- deleted 6y ago[deleted]
- vvanders 6y agoThere are those of us who are "self-taught" who are familiar with Therac-25 and other incidents. Don't think that a college degree somehow magically infuses engineers with ethics and judgement. 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.
- Fordec 6y agoI can't speak for other degrees, but mine didn't magically infuse me with ethics. It was the full credited modules solely dedicated to just ethics that aided in that department.
- oarsinsync 6y agoEthics was an elective module in my CS degree. I took it because it seemed easier than some of the more advanced programming courses. 20 years later, I’m glad for the choice I made as a lazy youth.
- pjmlp 6y agoIn countries like Portugal, where Software Engineering is a professional title, just like in other engineering disciplines, ethics is part of universities being allowed to teach the degree and professionals being allowed to call themselves engineers.
- IshKebab 6y agoI think an ethics module is pretty rare in CS/engineering degrees.
- Fordec 6y agoCan you provide data to back up that assertion? Its definitely a hard requirement for European engineering certification anyway
- neya 6y agoNo hardware vendor would actually design that way. Pretty sure there are some driver ICs for those motors which take care of those spikes. Besides, controlling voltage limits via software is pretty expensive to do compared to just slapping a driver IC. The problem is most likely not the motors, but something else.
- Aloha 6y agoThey do, and have, the Therac-25 as noting by the GP is a great example, but this kind of thing is still done, even often.
- Pamar 6y agoGood points! Do you know of any resource where these kinds of "software will eat hardware (and bite your hand)" are discussed/listed?