So...write a bug, lose your software license? Sounds like fun.
What Should We Do to Prevent Software from Failing?
11–20 of 128 posts
Re: What Should We Do to Prevent Software from Failing?
#12"All of these professionals have years of schooling and relevant work experience and have passed rigorous certification exams. [...] To start, coders who work on critical infrastructure should have a professional accreditation framework that issues licenses." "mit.edu" Uh, huh.
Re: What Should We Do to Prevent Software from Failing?
#13Software is a different realm, as other commenters point out. When faced with a problem in the software world, what's the solution? More software!
The accrediting bodies that regulators might want to form should focus on free test suites and tools for gauging security. Static code analyzers, auto penetration testers, something along these lines.
Regulate the quality of the software, not the software developers. It's easier to objectively test.
Re: What Should We Do to Prevent Software from Failing?
#14The analogy between software "engineering" and structural engineering is used a lot to point out the failures of software. I think this analogy is a category mistake caused entirely by the misapplication of the word "engineer" to software developers. We have already solved large areas of common classes of bugs at the language level, through strong static typing, memory safety and safe concurrency (Rust is the vanguar…
There are two parts to this. A wrong idea as in building the wrong product, and a wrong idea as in building the product wrong. There aren't any mechanical processes to protect against the first, but building the wrong product is rarely catastrophic (maybe only from a business perspective), and even if it is, it is usually not the software developer's fault. But as to building the product wrong, there are processes and tools that can help -- a lot -- like TLA+, which is slowly gaining momentum and has completely changed the way I think about software. Tools like TLA+ are extremely powerful at tackling those "complex, difficult to predict side-effects when composed into complex systems", but they don't replace careful thinking, they only help you with attacking complexity once you have decided to think hard about the problem. Getting developers to think hard before or during the development process -- but not while typing code -- is a cultural shift.
Re: What Should We Do to Prevent Software from Failing?
#15The analogy between software "engineering" and structural engineering is used a lot to point out the failures of software. I think this analogy is a category mistake caused entirely by the misapplication of the word "engineer" to software developers. We have already solved large areas of common classes of bugs at the language level, through strong static typing, memory safety and safe concurrency (Rust is the vanguar…
Developer = Mechanic
Computer = Car
Make = Language
Model = Platform
Year = Version
A mechanic is licensed by ASE to work on cars in the USA and there are 50 different certifications [1], depending on the type of car/truck/bus. I don't want to see software development go this route, where developers have to get multiple certifications to prove they can work on a language or platform. It would be draining and force devs into silos, even more than they already are. And as the parent comment mentions, software is an "idea" problem and not a structural/foundational one. Unless your developer is a certified genius, what good is his certification?
[1] https://en.wikipedia.org/wiki/Automotive_Service_Excellence
Re: What Should We Do to Prevent Software from Failing?
#16The analogy between software "engineering" and structural engineering is used a lot to point out the failures of software. I think this analogy is a category mistake caused entirely by the misapplication of the word "engineer" to software developers. We have already solved large areas of common classes of bugs at the language level, through strong static typing, memory safety and safe concurrency (Rust is the vanguar…
In software the mentality is that tests, or formal specs, or even thoughtful design, are luxuries. That it's better to just hire someone who can make the computer do things than spend twice as much on someone who can write "good" code and take twice as long to do so (whatever "good" means, because we have no standard). Of course for "the Uber for X" those standards may be fine. But for autonomous vehicles, or credit bureaus, or the nascent private space industry, they are absolutely not.
Re: What Should We Do to Prevent Software from Failing?
#17Would you drive across this bridge? No. If it somehow got built, everybody involved would be executed. Yet some version of this dynamic wrote every single program you have ever used, banking software, websites, and a ubiquitously used program that was supposed to protect information on the internet but didn’t."
Re: What Should We Do to Prevent Software from Failing?
#181. Make it very small (how small is subjective and language dependent of course).
2. Make the large part fault tolerant and recoverable, e.g triple redundancy. (or make the lower level part fault tolerant).
Leaving a third option of making perfect software in the face of immense complexity sounds more like magic to me, I doubt any solution in this area could be generalised.
Re: What Should We Do to Prevent Software from Failing?
#19Here are some things that can help:
1) Limit mutations, shared state, and side effects to very small sections of code. The majority of code should be pure functions and immutable code.
2) Tooling and IDE's should have "code coverage" to show where code is pure and referentially transparent and where it is not.
3) Learn from mathematics / computer science. Adopt formal methods and proof based techniques.
4) Keep code simple and understandable. Category theory has many insights on how to better compose and structure code. Code that is in harmony with certain laws will be more predictable, simpler, and more reusable. Constraints == freedom.
5) Use strong typing. And by typing I mean types that limit what values can be and even what code can do. Types that are nullable are not sufficient for safety. Types that only describe the data format and not the allowed functionality are not sufficiently safe or descriptive. Dependent typing allows for even greater safety because it can specify acceptable values ("tolerances") not just the data format of the value.
6) Adopt metrics to measure complexity and other factors that affect reliability of code. Once we have metrics we can have better discussions different ways to write the same code and why certain ways might be better under certain circumstances.
7a) Expand your vocabulary of concepts. Words affect the very thoughts you are capable of thinking about (linguistic relativity). We went from machine code to assembly to higher level languages. Each requires more concepts to know and yet it gets simpler and less error prone each time. The more words you have the easier it is to describe, write, and understand code. Category theory has many new concepts that are not in common use that improve communication and understanding. What other fields can we borrow from?
7b) Keep code short and simple to maximize understanding. More code means more surface area for software defects. 'map' is easier to understand and less error prone than 2 different arrays, counters, conditionals, increments, and mutations.
8) Typing and pattern matching provide a framework where the compiler can determine if you have handled all the cases for all possible inputs (total function). Failure to do so is a compile time error.