News for hackers. Stuff that matters.
Re:macOS 11 (Big Sur) Compatibility News by tialaramex on Friday November 13, 2020 @11:10PM (#25090230)
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?

Re:macOS 11 (Big Sur) Compatibility News by vvanders on Friday November 13, 2020 @11:29PM (#25090298)
There 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.

Re:macOS 11 (Big Sur) Compatibility News by Fordec on Friday November 13, 2020 @11:36PM (#25090326)
I 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.
Re:macOS 11 (Big Sur) Compatibility News by oarsinsync on Saturday November 14, 2020 @12:55AM (#25090594)
Ethics 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.
Re:macOS 11 (Big Sur) Compatibility News by pjmlp on Saturday November 14, 2020 @02:33AM (#25090833)
In 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.
Re:macOS 11 (Big Sur) Compatibility News by IshKebab on Saturday November 14, 2020 @09:52AM (#25092601)
I think an ethics module is pretty rare in CS/engineering degrees.
Re:macOS 11 (Big Sur) Compatibility News by Fordec on Sunday November 15, 2020 @12:14AM (#25098446)
Can you provide data to back up that assertion? Its definitely a hard requirement for European engineering certification anyway
Re:macOS 11 (Big Sur) Compatibility News by WrtCdEvrydy on Friday November 13, 2020 @11:17PM (#25090254)
> 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.

Re:macOS 11 (Big Sur) Compatibility News by Pamar on Saturday November 14, 2020 @03:18AM (#25090994)
Good points! Do you know of any resource where these kinds of "software will eat hardware (and bite your hand)" are discussed/listed?
Re:macOS 11 (Big Sur) Compatibility News by bigbubba on Friday November 13, 2020 @11:16PM (#25090252)
Sounds like a nightmare, I guess SANE is an ironic name?
Re:macOS 11 (Big Sur) Compatibility News by tialaramex on Saturday November 14, 2020 @01:42AM (#25090694)
SANE (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.

Re:macOS 11 (Big Sur) Compatibility News by wahern on Saturday November 14, 2020 @12:43AM (#25090555)
IIUC, 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?
Re:macOS 11 (Big Sur) Compatibility News by bigbubba on Saturday November 14, 2020 @11:47AM (#25093450)
I 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.
Re:macOS 11 (Big Sur) Compatibility News by neya on Friday November 13, 2020 @11:36PM (#25090324)
No 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.
Re:macOS 11 (Big Sur) Compatibility News by Aloha on Saturday November 14, 2020 @12:56AM (#25090596)
They 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.