I work for an electrical contractor and I don't think being annoyed by shitty UI is nearly the same problem as electrical fires. Why govern the whole set of software with 1 set of rules?
Software isn't safety critical until it is, but we already have code to regulate software on electrical equipment, planes, etc. Why do you recommend software have a code? I'd much rather each individual thing that's safety critical have regulations around software in place than have to learn a 4000 page manual that changes every time you cross a jurisdiction, where enforcement varies, etc.
Software engineers can't even agree on best practices as is.
Imo, put the code around the safety critical thing (e.g. cars, planes, buildings). Restricting "critical" software will only get abused the way essential workers did during covid.
Also keep in mind the way buulding code gets enforced: you get an inspection upon completion or milestones. Software has a tendency to evolve and need maintenance or add features after; I don't want to trust this to a bureacrat. I don't like google or apple getting involved on "their platform" and I certainly don't want an incompetent government getting involved.
Before we have a software code, let's make and adopt some guidelines we can agree to. In construction, plenty of builders have their own sets of internal rules that are de facto codes. When one of those gets popular enough for life safety software, let's consider pushing for that.
We already know what the failures are. We already know what the solutions are. We know it because people have been born and died in the span of time we have been dealing with these same problems. There is no need to assemble guidelines (that no company would follow anyway without being forced to).
> Software engineers can't even agree on best practices as is.
I'm not talking about "best practice"; I'm talking about, before you ship a build to customers, you must at least run it once to look for errors. This is kid stuff, yet the companies don't do it, and subsequently half the flights in the USA are delayed for weeks. There is no need to argue about this, there is no question that there are basic practices that should be considered malpractice not to do. We must make this law or they will continue to disregard these basic practices and we will continue to suffer for it.
> Software has a tendency to evolve and need maintenance or add features after
That is a flaw in business practice, it has nothing to do with software itself. I can run a suite of Perl programs today that I wrote 20 years ago, and they run flawlessly. No need for maintenance, it just works. The reason is, we just happened to treat this one language as something that should not break, and should last a long time. No reason we couldn't treat other software the same way. The fact that other software doesn't is a choice by a lazy industry and uncaring business models, and this choice needs to be challenged, the way every industry has had to be challenged by codes (the reason codes exist is industry cannot be trusted to "do the right thing", they need to be forced).
But despite this, codes change all the time. The electrical code changes as solar progresses. Building codes change as we learn new things or new materials are introduced. The codes do change slowly, precisely so the work is well thought-out, coordinated, and safe, which nobody can say about modern software. The time for move fast and break things needs to end.
I don't think it's a flaw and throwing this away isn't worth a quarter of the hassle that comes with any enforcment implementation I can conceive of. Please think about what testing, safety, security is "enough", how you test it, and if it's worth the tradeoffs.
Who is at fault for code violations? The scope of software is generally too big that prearchitected designs don't work and you must assign life safety faults to a PE. Software doesn't work like that, it's not singularly done. You shouldn't need to file a permit for expansion to add a feature or plug a security hole.
You point to solar, but solar is less complicated than the things most of this website would deride as simple in software. The electrical codes. It has hardly changed at all since it's inception, and only inspired a handful (<12) of changes since the 2008 NEC. Most jurisdictions only update every 2 cycles or so, so we're talking 3 updates.
Move fast and break things is fine when it's okay to break things; software is fundamentally different than physical infrastructure and you paint with really broad strokes here when you just assert "need" and "right".
I work with building code every day and I fundamentally disagree that writing a "critical software code" would be net beneficial.
This is definitely a business practice problem, and not some intrinsic quality of software.
And even if your business decides that software is never done, nothing stops you from getting a particular build inspected and certified. It's physically possible. The problems are mostly cultural and in other areas: Governments are generally hesitant to regulate business. Software companies lobby extensively to keep it that way. Vendors and customers are generally not willing to pay the increased cost of software inspections. Developers don't like the idea of being held to a quality standard.
https://en.wikipedia.org/wiki/MISRA_C
https://en.wikipedia.org/wiki/Ada_(programming_language)
ADA is particularly strong in aviation.
https://www.adacore.com/industries/avionics
Rust would also be a contender, but it's "the new kid on the block."
Uncle Bob had a bit to say about this a while ago[1], and is largely what his Clean Code philosophy is trying to achieve, despite the detractors.
To the detractors and down-voters...
If you're complaining about over-abstraction, arguing about the 'better language' to use, or that 'Clean Code' doesn't work - you're missing the point by a few hundred miles.
The whole point of 'Clean Code' is to establish a body of ethics software 'engineers' collectively agree to, and rigorously follow to avoid "killing 10,000 people with a little software failure".
If you think you can make a better 'Clean Code', do so! That's the whole point about ethics debates. But! You need to proffer an alternative and prosecute why your version is better than Clean Code.
[1] (19:47-24:33) https://www.youtube.com/watch?v=7EmboKQH8lM&t=1187s
these are slowly but surely pushing manufacturers/sellers/distributors to try to do the right things
it requires transparency about support period commitment, a bug tracker program, issuing updates (I guess in case there's a CVE), doing risk assessment during development, etc., and requirements kick in based on turnover (or headcount).
and it seems like the correct approach, these are already things good products come with