r/programming • • Apr 07 '16

The process employed to program the software that launched space shuttles into orbit is "perfect as human beings have achieved."

http://www.fastcompany.com/28121/they-write-right-stuff
1.4k Upvotes

423 comments sorted by

View all comments

615

u/slavik262 Apr 07 '16

I don't like the dichotomy the article seems to create - that most software is written by egoistic, "up-all-night, pizza-and-roller-hockey software coders", and systems software is written by stuffy "grown-ups". Embedded/systems critical software is generally more robust because:

  1. Its usefulness is predicated on it being (almost/hopefully) bug-free, moreso than desktop, server, or web applications.

  2. More time and money is put into testing and review to ensure the previous point.

Then again, maybe I'm just lacking perspective - I was in kindergarten when this article was written. To the older folks here: has the landscape changed that much in 20 years?

308

u/goodstuff37 Apr 07 '16

I'm probably ten years older than you. I started out writing device drivers for mobile phones, and there was definitely a different mentality. The penalty for a mistake when you're shipping a physical product is huge compared to a web application that can be updated within days, if not hours. The incentive for quality changes depending on the business environment. So in a way, nothing has really changed.

There have probably always been problems requiring higher quality, as well as problems which tolerate lower quality but ship fast and fail fast, and engineers who are drawn to the former and the latter.

310

u/scarytall Apr 07 '16

This. What the NASA engineers did was great. But people who get all uptight about this, in either direction, seem to imply that software development is one-size-fits-all. They built software to that level of robustness because they needed to. Others build software with less robustness because they don't need to. It's not better engineering write code to solve a problem you don't have. It's like thinking a 2-door coupe that can tow 10 tons is engineered any better than a heavy-duty pickup that cannot.

0

u/[deleted] Apr 07 '16

[deleted]

23

u/relativityboy Apr 07 '16

Only exception to this is where user data is concerned. That always needs 5nines love.

10

u/scarytall Apr 07 '16

Correct. And that's the point: there are situations where you need it, and some where you don't. To stay with my analogy, just because I don't need an F-250 Super Duty doesn't mean nobody does, and vice versa. It's similar to premature optimization.

→ More replies (1)

81

u/neonKow Apr 07 '16

To add onto this, one of the great things about the web when it first appeared was how accessible it was to everyone. Here was a publishing platform that wasn't limited to publishers with millions a month to throw at publishing books or articles.

Everyone who thinks web languages are flawed because you can't launch spaceships writing that way are forgetting the forgiving nature of browser interpreted languages is what allowed so much individuality and creativity to bloom and create the internet we know and love today.

→ More replies (56)

0

u/[deleted] Apr 07 '16

[deleted]

→ More replies (19)

7

u/spacelama Apr 08 '16

I've bought physical devices that didn't work for the first 2 weeks, or middle 3 months they were in my possession because some agile startup thought they could get away with breaking firmware and having no backout mechanisms because they thought could fix it some indeterminate time in the future.

Funnily enough, they don't get repeat customers.

→ More replies (8)
→ More replies (33)
→ More replies (5)

61

u/[deleted] Apr 07 '16

[removed] — view removed comment

20

u/Morsdood Apr 07 '16

I'm glad you mentioned this. Today, I've tried to make my team see that some expensive and difficult to maintain UI test is overkill, because both the likelihood and impact of failure are close to zero.

The outcome? "I want to deliver quality. Therefore, this feature must be tested, costs be damned." I'm pretty pissed by the insinuation that I don't care for the quality of the product we deliver, but I'm absolutely baffled by the lack of nuance in the thinking process of my colleagues.

17

u/[deleted] Apr 07 '16

[removed] — view removed comment

10

u/sobri909 Apr 08 '16

We have no unit tests, no automation tests and minimal code reviews.

This too is a two way street. I dealt with a situation where two senior devs (one being me) had been running a successful project for several years, then new devs were added to the team and wanted to introduce stricter process, testing, reviews etc.

The problem was that the extra process wasn't for improving the product quality - the product was already very high quality with excellent stability, few bugs, etc. The extra process was (in my opinion) a shield for the new dev's either inexperience or inability.

We were confident that we could continue to ship a high quality product with fast release cycles, with the same minimal process. The new process wasn't going to improve that. If anything it was just going to slow it down.

Caring about quality doesn't only mean caring about testing and reviews.

→ More replies (7)

6

u/kt24601 Apr 07 '16

Today, I've tried to make my team see that some expensive and difficult to maintain UI test is overkill, because both the likelihood and impact of failure are close to zero.

The answer there is to measure the time building/maintaining the UI test, and measure how many bugs it catches over time. Then you can tell them, "your tests are a waste of time, you could have manually tested it cheaper."

In my experience, UI auto-tests usually aren't worth the effort.

→ More replies (6)
→ More replies (2)
→ More replies (11)

44

u/RenaKunisaki Apr 07 '16 edited Apr 07 '16

It all depends on what you're making software for.

A video game that can easily be patched? Just hurry up and get it looking finished. If there are any major bugs we can put out a patch.

A commercial office suite? You want to test pretty well before shipping, but if something goes wrong it's not the end of the world.

Guidance control for a rocket? You damn well better get it right the first time, even if it takes a long time and huge budget.

Also, rocket guidance systems usually are running on purpose-built, military-grade, radiation-hardened machines that only run the guidance system, and are directly used by a few dozen people. It's a very different situation from an app that's expected to run on hundreds of thousands of peoples' home computers, which are in hundreds of different languages and which are also running essentially infinite variations of OSes and patches, hardware, other apps, configurations, use cases, viruses, and users.

People often ask "why do today's word processors require so much more memory/storage/CPU/updates than the one on my C64?" and the answer is they do so much more. The one on your C64 probably didn't...

  • support every human language in common use, including ones like Chinese, Korean, and Arabic that have very different methods of drawing and arranging letters than English (including several of these in the same document!)

  • support embedded images, comments, links, notes, revision history, macros, fonts, charts, and videos

  • support more than one font in a document, especially fonts that weren't built in

  • run on a wide variety of different machines and OSes

  • have to deal with other apps in the background

  • have to handle any conceivable arrangement of monitors, resolutions, and colour depths

  • support spell check (with ability to edit the dictionary), rich WYSIWYG formatting, various page layouts, and print previews

  • have more than a few levels of undo/redo

  • support collaborative editing, both offline (merging your version with someone else's) and live (multiple people editing the same document at the same time)

  • allow editing in the middle of the document without a bunch of disk juggling

  • import and export a bunch of other programs' file formats

  • perform translations and text to/from speech

  • have a crash recovery function (that could also save your ass after eg a power failure)

  • some didn't even support more than a few pages in one document

The same applies to design. Speciality software like rocket guidance control can be made much more reliable than the apps you run on your PC because it only has to do one job in one situation, and has the entire machine not just dedicated to but built for it.

(edit: added a couple more items)

→ More replies (19)

27

u/[deleted] Apr 07 '16

To the older folks here: has the landscape changed that much in 20 years?

Extreme Programming and the Agile Manifesto and Scrum and all that was coming out around the time this article was written.

In my experience the received wisdom at the time (as reflected in this article) was that all software should be written this way, which is utter foolishness. Most software, most companies, can handle a much higher failure rate if it's balanced by faster time to delivery. The dot-com explosion of the late 90s / early 00s proved this.

Personal story - my shop (semiconductor fab) had a very rigorous waterfall process. I'd been asked to do a project. To make a point, I followed the process to the letter. I wrote that req document and sent it out for signatures and refused to write a line of code until it came back. Because that was the process. After giving a status update 3 weeks in a row of "Waiting on the req document" our director got really mad at me, but wouldn't you know it, the process changed shortly thereafter.

Alistair Cockburn developed a set of "Crystal methodologies" which scaled along several axes. E.g., if you have a really small team on a really short project and nothing significant happens if the code fails, you can afford a much "lighter" engineering process than if you have 250 people on a multi-year project and people will die if the code fails.

Analogously, you wouldn't design and build a doghouse with the same care you would design a home.

Our profession does need to "grow up" in many ways, and in some of the ways this article touches on (e.g., estimation, some disciplined practices), but that doesn't mean we need a heavy software process for any and all projects.

→ More replies (2)

51

u/K3wp Apr 07 '16

Then again, maybe I'm just lacking perspective - I was in kindergarten when this article was written. To the older folks here: has the landscape changed that much in 20 years?

Bell Labs veteran here.

The "systems" guys that wrote the software that powers the modern world were, for the most part, stuffy "grown-ups". Middle-aged 'greybeard' computer scientists.

The only exception I can think of is Linus Torvalds, who bucked the trend and caused much consternation among the "Olde Guard" of system guys. Something many people are surprised to know is that while the Bell Labs Unix guys hated Windows/Apple products, they hated Linux even more. As they felt it was both a sloppy effort and derivative.

But Linus should really only get partial credit, as he was both heavily influenced by Andy Tannenbaum and dependant on the Gnu project (Richard Stallman, etal) for the user-land stuff.

I will also admit that I am extremely fatigued with the prevalent mythology that the Internet was invented/pioneered by drop-outs and children. All the core protocols and RFCs were developed long ago by stuffy "grown-ups", not pizza-and-roller-hockey software coders. Silicon Valley wouldn't exist without the foundation built by the systems programmers.

6

u/[deleted] Apr 08 '16

stuffy

I only knew one guy from Bell Labs, and "stuffy" is the last word I'd use to describe him. Although he was Australian, so there's that.

I still remember when I asked him a question about C++ and he fired off an email to Stroustrop to find out the answer.

→ More replies (6)
→ More replies (29)

10

u/youlleatitandlikeit Apr 07 '16

I think the landscape has and hasn't changed. I think that frameworks and methodologies are way more common now in mainstream amateur programming than they were 20 years ago.

260 is a lot of people. Also, they probably had extremely rigorous limitations on requirements.

→ More replies (2)

10

u/[deleted] Apr 07 '16

I've been in and around software development for over 20 years professionally, and as an amateur a good 10 years before that. The landscape HAS changed, but only to open up new ways of doing things, because new technology allows new methods.

Back in the 80s and early 90s, you couldn't really do agile iterative work because you had no method to do continuous improvement. Once you shipped software, that was it. No patching, no updates, no new features. So everything was effectively waterfall heading for that one delivery checkpoint. Sure you could iterate during your dev periods but once you "went gold" that was it. Whether you were doing embedded systems, games or whatever, once it was signed off you were done.

Once you had a method to deliver updates and patches then there was a reason to accelerate release - lower your costs and increase your risk as you could mitigate it in a patch. And once you started having software delivered as a service, well, the client doesn't even control the software so you just update it for them.

The old ways are still valid for some use cases. I wouldn't want the space shuttle or my bank's financial reconciliation software to have bugs that got ironed out in v2. However most new use cases do not require this due diligence and extremely front-heavy development. What the article doesn't spell out is that the shuttle program is an exceptionally inefficient way to write and release code. It is ridiculously expensive and slow. $35m per year for 30 years ($1B) for a few hundred thousand lines of code? It is done this way because it HAS to: the software protects many lives, national PR failures and billions of dollars of hardware. Therefore its method is the correct one.

New methods are better at solving newer problems, and doing it in a competitive and cost-effective way. If you have no constraints over expenditure and release cadence (or at least no commercially realistic ones) then you can afford to do things this way. Almost everything used to be done this way, and changed to new methods when they became available, as they didn't have the same risk profile.

11

u/kyrsjo Apr 07 '16

Another funny thing is how the article talks about the "two databases" which they claimed were the key to their success. Then they basically describe version control and an issue tracker. Things which today are standard and cheap/easy-to-use.

→ More replies (1)
→ More replies (3)

19

u/lykwydchykyn Apr 07 '16

It's a shame that the article seems to focus on the software developers in that sense, since the actual content is an indictment less against developers and more against managers and stakeholders. If someone is asking me the question, "Why are there bugs in the software? Why isn't it perfect?", I can point to this article and say "Here's what it takes to get perfect code. Are you willing to do this?"

Because the problem isn't my T-shirts or pizza or whatever non-white-collar accoutrements you want to name, the problem is that the stake holder changed scope 6 times on a whim, can't describe the requirements beyond the vaguest terms, and wants it delivered by next week for the original price.

→ More replies (3)

6

u/[deleted] Apr 07 '16

Apparently people that work on the software used in airplane cockpits write 2 lines of actual production code A WEEK, the rest of the time being used to write FORMAL proofs of correctness. As you would prove a mathematical theorem.

8

u/kt24601 Apr 07 '16

Think of that next time you hear someone say, "self-driving cars will be in production in three years."

Once the problem is completely solved, making it production-worthy is not easy.

→ More replies (9)

0

u/[deleted] Apr 07 '16

[deleted]

→ More replies (1)
→ More replies (34)