Why is it that good software quality is generally an afterthought in so many systems?
Why is it that good software quality is generally an afterthought in so many systems?
In software on the other hand, we're spoilt by how easy to is to fix bugs (compiling your code to generate a binary takes minutes/hours, not months, and it doesn't cost you millions of dollars), and also how easy it is to deploy fixes to customers (just release a patch and when someone complains, tell them to download it). Hence why if you're working at Google/Amazon/Apple/99%-of-software-teams, the rational thing to do is to treat reliability/testing as a 2nd class priority, not a 1st class priority.
Except that there's a small number of software applications where this doesn't hold. Where testing really does need to be treated as a 1st class priority. Problem is, the engineers and managers working in these teams belong to an industry that has a completely different mindset. A mindset that translates itself into all parts of the software stack, which these engineers are then forced to rely on. A mindset that will creep into everyone's minds, by osmosis, no matter how much they try to fight it. A mindset that works fine 99% of the time, but every now and then, leads to events exactly like this.
The famous Worse is Better, aka. 80% solution that isn't even correct (it's fine as long as it doesn't segfault in that 80% of cases) today is better than a proper solution next week.
Here's an analogy: A weather forecaster can predict "no hurricane" every single day and have a near-perfect success rate. Needless to say, that's next to useless. (False positives and false negatives have wildly different costs in this context.)
What is your definition of "pretty much"? In my experience none of those things you mentioned have ever worked pretty much flawlessly.
A couple decades of work on compilers, dev tools, drivers, firmware, and other sorts of system software may have warped my perceptions somewhat.
(Edit: I don't say that to pretend some kind of superiority; my code is just as buggy as everyone else's. I've just had many occasions to dig around in other people's code and figure out why it stopped working, after we tried to change something that shouldn't have affected it. Hardware, too, you can't trust that either.)
Though in truth that's mostly unrelated to this instance. Real-time control systems for satellites have always been a tough problem, and there have traditionally been growing pains for organizations tackling new designs. Even NASA has had its fair share of stumbles in that regard, for example the loss of the Mars Polar Lander and even the Mars Climate Orbiter (the famous metric/english units fuckup) were substantially due to problems with the software and operational management of the spacecraft.
Edit:
Someone alse pointed this out but it's worth reiterating - hardware systems are simulated extensively and analyzed in various ways for performance, cost, reliability and other factors. Software less so, and test cases, if they exist, might not necessarily capture all the power loss/inconsistent state problems that can occur in the real world. Maybe in the future embedded applications could be analysed with a fuzzer or something to help weed out that kind of once-in-the-field-never-in-the-lab bug.
There's so much that can go wrong in a satellite that expecting software to function well is very naive.
Besides, it's not like testing a satellite is easy as running unit testing on a Python module - there are countless operational and environmental variables that are very difficult to synthesize.
If anything, it tried to do what it was supposed to: stop the satellite from spinning.
From the report:
> Feb 28, JAXA sent the commands to update the RCS control parameter based on the center of mass changes by deployment of the EOB. Through the post-incident investigation, it is confirmed the RCS control parameter on Feb 28th was not appropriate.
So the software worked as designed, but was fed crappy data.
The whole system has to be considered for success.
With complex software, it's pretty dang hard to layout an entire program in specifications without going down the provably correct approach, which likely will run into limitations when the real world is involved. Waterfall dev for operating systems of the past come to mind.... Probably the best you can do is be very stringent with your coding standards, something space agencies are the masters of.
For quite a bit of software these days, the correct program and the description of the correct program are pretty similar artifacts.
My brain was going mental mobius strip when I was originally responding and thinking of something along these lines. Maybe what I was getting at is that the an idea like the Halting problem doesn't apply as viciously to hardware?
Then you get the stuff that lurks in the middle that could be a software, electrical or mechanical problem (or all 3), and that is where the bugs like this occur. I think its more a result of splitting up work into domain silos, so they do not think about problems that arise in the other domains that can be fixed easily in another. This can lead to one or more domains getting no time at all to implement their part of the system as they spent most of the time budget waiting on another domain to finish. Watchdogs and other "things are going crazy" sort of belt&braces protection are the first parts of a design to get dropped when in a time crunch.