185 points · by philofsofia · 3y ago · 146 comments
bool check_the_landing_gear_before_shootyshoot(double weight_from_sensor, double threshold) {
//FIXME: Remember to implement this before we go live
return false
}
So when the pilot pressed the button the function disabled the weapons as if the plane had been on the ground. Because the "correctness" checks were against the Z spec and this function didn't have a unit test because it was deemed too trivial, the problem wasn't found before launch, so this cost several millions to redeploy the (one-line) fix to actually check the weight from the sensor was less than the threshold.[1] Yes this means that scene from the cheesy action movie (can't remember which one) where Arnold Schwartzenegger finds himself on the ground in the cockpit of a russian plane and proceeds to blow up all the badguys while on the ground couldn't happen in real life.
[2] Not the actual code which was in some weird version of ADA apparently.
Spark: https://en.wikipedia.org/wiki/SPARK_(programming_language)
And it's Ada not ADA which makes me think of the Americans with Disabilities Act.
I think you meant "Tomorrow Never Dies" and the actor was Pierce Brosnan. Took me forever to find that, is it the right one?
Well maybe this is the other, compounding problem. Engineering complex machines with such a high cost of bugfix deployment seems like a big issue. It's funny that as an industry we now know how to safely deploy software updates to hundreds of millions of phones, with security checks, signed firmwares, etc, but doing that on applications with a super high unit price tag seems out of reach...
Or maybe, a few millions is like only a thousand hours of flying in jet fuel costs alone, not a big deal...
A bunch of JavaScript dudebros yeeting code out into the ether is not at all comparable to deploying avionics software to a fighter jet. Give your head a shake.
> It's funny that as an industry we now know how to safely deploy software updates to hundreds of millions of phones, with security checks, signed firmwares, etc,
Either you're completely wrong, because we "as an industry" still push bugs and security flaws, or you're comparing two completely different things.
> doing that on applications with a super high unit price tag seems out of reach...
is true because of
> a few millions is like only a thousand hours of flying in jet fuel costs alone
like do you really think they spent millions pushing a line of code? or do you think it's just inherently expensive to fly a jet, and so doing it twice costs more?
GP's comment was expressing sardonic disbelief that a modern jet wouldn't be able to receive remote software updates, considering it's so ubiquitous and reliable in other fields, even those with much, much lower costs. Not that developers don't release faults.
Pretty much tbh. For example, the development of the Saab JAS 39 Gripen (JAS-projektet) is the most expensive industrial project in modern Swedish history at a cost of 120+ billion SEK (11+ billion USD).
It was also almost cancelled after a very public crash in central Stockholm at the 1993 Stockholm Water Festival [1]. A crash that should not have happened because the flight should not have been approved in the first place, because they weren't yet confident that they'd completely solved the Pilot-Induced Oscillation (PIO) related issues that wrecked the first prototype 4 years prior (with the same test pilot) [2].
It was basically a miracle that no one was killed or seriously hurt in the Stockholm crash, had the plane hit the nearby bridge or any of the other densely crowded areas then it would've been a very different story.
Call the bug fix a development team of 20 people taking 3 months end to end from bug discovery to fix deployment. You'll probably have twice that much people time again in project management and communication overhead (1:2 ratio of dev time to communication overhead is actually amazing in defense contexts). Assume total cost per person of 200k per year (after factoring in benefits, overhead, and pork), so 60 people * 3 months * $200k/12 months = 3,000,000 USD.
It takes a lot of people to build an aircraft.
This state "weight on wheels" is used in a lot of other functionality, not just on military aircraft, as the hard stop for things that don't make sense if we're not airborne. So that makes sense (albeit obviously somebody needed to actually write this function)
Most obviously the gear retraction is disabled on planes which have retractable landing gear.
I wasn't sure if there might've been a scene I'd forgotten.
This demonstrates that sometimes "if you see something, say something" isn't enough - if a large piece of metal penetrates into the passenger compartment of a train from underneath, it's better to take the initiative and pull the emergency brake yourself.
Furthermore, this sort of counterfactual or "if only" analysis can be used to direct attention away from what matters, as was done in the hounding of the SS Californian's captain during the inquiry into the sinking of the Titanic.
Here, one cannot fault the passenger for first getting himself and his family out of the compartment, and he correctly determined that the train manager's "follow the rules" response was inadequate in the circumstances - in fact, the inquiry might have considered the incongruity of having an emergency brake available for any passenger to use at any time, while restricting its use by train crew.
RCA quite properly focuses on the causes of the event, which would have been of equal significance even if the train had been halted in time, and which would continue to present objective risks unless addressed.
> Dittmann could not find an emergency brake in the corridor and had not noticed that there was an emergency brake handle in his own compartment.
The learning from that should maybe instead be to keep non-technical management out of engineering decisions. The Wikipedia article fails to mention there was a specific manager who pushed the new wheel design into production and then went on to have a long successful career.
We could also easily construe your argument as "engineers would never design a flaw", which is demonstrably untrue. We should both work to minimize errors, and to provide a variety of corrective measures in case they happen.
That’s not what I wanted to say at all - the op talked about the willingness to pull the emergency brake, but my understanding is that he was willing to but due to human error failed to find it. I didn’t mean to suggest in any way that emergency brakes are not important.
> We could also easily construe your argument as "engineers would never design a flaw"
Another thing I didn’t say. The whole original link is proof that engineers make mistakes all the time.
F-22 navigation system core dumps when crossing the international date line: https://medium.com/alfonsofuggetta-it/software-bug-halts-f-2...
Loss of Mars probe due to metric-imperial conversion error
I've a few of these myself (e.g. a misplaced decimal that made $12mil into $120mil), but sadly cannot devulge details.
I was working for a webhosting company, and someone asked me to rush a change just before leaving. Instead of updating 1500 A records, I updated about 50k. Someone senior managed to turn off the cron though, so what I actually lost was the delta of changes between last backup and my SQL.
I was in the room for this though: https://www.theregister.com/2008/08/28/flexiscale_outage/
It's like a single individual managed to delete the monolithic cloud where everyone's files are stored.
And no, just plain complexity or fast-moving environment, is a factor but not the issue. It's that steps are skipped which are not skipped in other branches of engineering (eg. continous improvement of processes, learning from mistakes & implementing those. In software land: same mistakes made again & again & again, poorly designed languages remain in use, the list goes on).
A long way still to go.
My first job was at a major automotive manufacturer. Implementing half the procedures they had would slow down any software company 10X - just look at the state of most car infotainment systems. If something is safety critical, obviously this makes sense but the reality is 85% of software isn't.
How do you know that?
Building regulations: similar.
Foodstuffs (hygiene requirements for manufacturers): similar.
Car parts: see ISO9000 standards & co.
Software: eg. memory leaks - been around forever, but every day new software is released that has 'm.
C: ancient, not memory safe, should really only be used for niche domains. Yet it still is everywhere.
New AAA game: pay $$ after year(s?) of development, download many-MB patch on day 1 because game is buggy. Could have been tested better, but released anyway 'cause getting it out & making sales weighed heavier than shipping reliable working product.
All of this = not improving methods.
I'm not arguing C v. Rust here or whatever. Just pointing out: better tools, better procedures exist, but using them is more exception than the rule.
Like I said the list goes on. Other branches of engineering don't (can't) work like that.
I do think qualification would make sense for more narrow swathes of the "software engineering" practice. For instance, "Automotive Control Software Engineer", etc.
Many software engineers these days are often flying by the seat of their pants, moving quickly and breaking things. Thankfully this seems to largely be in places that aren't going to affect life or limb, but I'm still rubbed the wrong way seeing people (including myself mind you) building run of the mill CRUD apps under the title of engineer.
Is it a big deal? Not really. It's probably even technically correct to use the term this way. But I do think it dilutes it a bit. For context, I'm in Canada where engineer is technically a protected term, and there are governing bodies that qualify and designate professional engineers.
Not of nasty bugs like the F-22 -- those are fun stories, but they don't really illustrate the systemic failures that led to the bug being deployed in the first place. Much more interested in systemic cultural/practice/process factors that led to a disaster.
Most of these feel like "They didnt act fast enough or do a good enough job. They should do a better job".
Makes a fun list of big disasters though and I respect this guy's eye for website design. The site design was probably stronger than the link content, there is a lot to like about it.
Obviously the larger the disaster the more complex the failure and the harder to analyze the root cause. But one interesting takeaway for me from this list is that all of them were preventable and in all but few of the cases the root cause may have been the trigger but the setup of the environment is what allowed the fault to escalate in the way that it did. In a resilient system faults happen as well, but they do not propagate.
And that's the big secret to designing reliable systems.
Every disaster is preventable. Everything on the list was happening in human-engineered environments - as do most things that affect humans. The human race has been the master of its own destiny since the 1900s. The questions are how far before the disaster we need to look to find somewhere to act and what needed to be given up to change the flow of events.
But that doesn't have any implications for software engineering. Studying a software failure post mortem will be a lot more useful than studying 9/11.
No, there is such a thing as residual risk and there are always disasters that you can't prevent such as natural disasters. But even then you can have risk mitigation and strategies for dealing with the aftermath of an incident to limit the effects.
> Everything on the list was happening in human-engineered environments - as do most things that affect humans.
That is precisely why they were picked and make for good examples.
> The human race has been the master of its own destiny since the 1900s.
That isn't true and it likely will never be true. We are tied 1:1 to the fate of our star and may well go down with it. There is a small but non-zero chance that we can change our destiny but I wouldn't bet on it. And even then in the even longer term it still won't matter. We are passengers, the best we can do is be good stewards of the ship we've inherited.
> The questions are how far before the disaster we need to look to find somewhere to act and what needed to be given up to change the flow of events.
Indeed. So in the case of each of the items listed the RCA gives a point in time where the accident given the situation as it existed was no longer a theoretical possibility but an event in progress. Situation and responses determined how far it got and in each of the cases outlined you can come up with a whole slew of ways in which the risk could have been reduced and possibly how the whole thing may have been averted once the root cause had triggered. But that doesn't mean that the root cause doesn't matter, it matters a lot. But the root cause isn't always a major thing. An O-ring, a horseshoe...
> But that doesn't have any implications for software engineering.
If that is your takeaway then for you it indeed probably does not. But I see such things in software engineering every other week or so and I think there are many lessons from these events that apply to software engineering. As do the people that design reliable systems, which is why many of us are arguing for liability for software. Because once producers of software are held liable for their product a large number of the bad practices and avoidable incidents (not just security) would become subject to the Darwinian selection process: bad producers would go out of business.
> Studying a software failure post mortem will be a lot more useful than studying 9/11.
You can learn lots of things from other fields, if you are open to learning in general. Myopically focusing on your own field is useful and can get you places but it will always result in 'deep' approaches, never in 'wide' approaches and for a really important system both of these approaches are valid and complementary.
To make your life easier the author has listed in the right hand column which items from the non-software disasters carry over into the software world, which I think is a valuable service. A middlebrow dismissal of that effort is throwing away an opportunity to learn, for free, from incidents that have all made the history books. And if you don't learn from your own and others' mistakes then you are bound to repeat that history.
Software isn't special in this sense. Not at all. What is special is the arrogance of some software people who believe that their field is so special that they can ignore the lessons from the world around them. And as a corollary: that they can ignore all the lessons already learned in software systems in the past. We are in an eternal cycle of repeating past mistakes with newer and shinier tools and we urgently need to break out of it.
That said, a challenge I have frequently run into, and I feel is not uncommon, is a tension between the desire not to repeat mistakes and ambitions that do generally involve some amount of risk-taking. The former can turn into a fixation on risk and risk mitigation that becomes a paralyzing force; to some leaders, lists like these might just look like "a thousand reasons to do nothing" and be discarded. Yet history is full of clear cases where a poor appreciation of risk destroyed fortunes, with a chorus of "I told you sos" in their wake.
It is a difficult part of leadership to weigh the risk tradeoffs for a particular mission, and presenting things in absolute terms of "lessons learned" rarely makes sense, in my experience. The belt-and-suspenders approaches that make sense for authoring the critical control software for a commercial passenger aircraft or an industrial control system for nuclear plants probably do not make sense for an indie mobile game studio, even if they're all in some way "software engineering".
It's really hard to drive a balance between "pushing untested shitcode into prod multiple times a week" and "that ticket to change our CTA button color is done but now needs to go through 4 days of automated and manual testing." I think as an industry most of us are probably too far on the latter side of the spectrum in relation to the stakes of what we're actually doing day to day.
https://en.m.wikipedia.org/wiki/RCA_Spectra_70
Then I finished the headline and opened this Wikipedia article
In software the root cause is often a very simple one: assumption didn't hold.
Safe Systems from Unreliable Parts https://www.digitalmars.com/articles/b39.html
Designing Safe Software Systems part 2 https://www.digitalmars.com/articles/b40.html
1) Considerable pressure from NASA to cover up the true sequence of events. They pushed the go button even when the engineers said no. And they failed to even tell Morton-Thiokol about the actual temperatures. NASA dismissed the observed temperatures as defective--never mind that in "correcting" them so the temperature at the failed joint was as expected meant that now a bunch of other measurements are above ambient. (The offending joint was being cooled by boiloff from the LOX tank that under the weather conditions at the time ended up cooling that part of the booster.)
2) Then they doubled down on the error with Columbia. They had multiple cases of tile damage from the ET insulating foam. They fixed the piece of foam that caused a near-disaster--but didn't fix the rest because it had never damaged the orbiter.
Very much a culture of painting over the rust.
The Deepwater Horizon was the result of multiple single points of failure, that zippered to catastrophe. Each of those single points of failure could have been snipped at little to no cost
The same with the Fukushima disaster. For example, venting the excess hydrogen into the building, where it could accumulate until a random spark.
http://catless.ncl.ac.uk/Risks/
It's very much old-school.
Because of this, there are "B.Seng" programs at some Canadian universities, as well as the standard "B.Sc" computer science program.
The degree was very new when I attended uni, so went for Comp sci intead as it seemed more "real". The B.Seng kids seemed to focus a lot more on industry things (classes on object oriented programming), which everyone picked up when doing internships anyways. They also had virtually no room for electives, whereas the CS calendar was stacked with very interesting electives which imo were vastly more useful in my career.
In practice, no one gives a hoot which degree you have, and we tend to just use the term SWeng regardless.
It honestly kinda feels like a bunch of crotchety old civil engineers trying to regulate an industry they're not a part of. I have _never_ seen a job require this degree.
I think you're actually not even supposed to call yourself an engineer unless you're a professional engineer.
Hoping the author of that page sees: https://youtu.be/TqaFT-0cY7U
Organizational disaster and organizational decay: the case of the National Aeronautics and Space Administration http://www.sba.oakland.edu/faculty/schwartz/Org%20Decay%20at...
some highlights:
> There are a number of aspects of organizational decay. In this paper, I shall consider three of them. First is what I call the institutionalization of the fiction, which represents the redirection of its approved beliefs and discourse, from the acknowledgement of reality to the maintenance of an image of itself as the organization ideal. Second is the change in personnel that parallels the institutionalization of the fiction. Third is the narcissistic loss of reality which represents the mental state of management in the decadent organization.
> Discouragement and alienation of competent individuals
> Another result of this sort of selection must be that realistic and competent persons who are committed to their work must lose the belief that the organization's real purpose is productive work and come to the conclusion that its real purpose is self-idealization. They then are likely to see their work as being alien to the purposes of the organization. Some will withdraw from the organization psychologically. Others will buy into the nonsense around them, cynically or through self-deception (Goffman, 1959), and abandon their concern with reality. Still others will conclude that the only way to save their self-esteem is to leave the organization. Arguably, it is these last individuals who, because of their commitment to productive work and their firm grasp of reality, are the most productive members of the organization. Trento cites a number of examples of this happening at NASA. Considerations of space preclude detailed discussion here.
Schwartz, H.S., 1989. Organizational disaster and organizational decay: the case of the National Aeronautics and Space Administration. Industrial Crisis Quarterly, 3: 319-334.