3 ms·
> Software is crap because humans on the whole have an extremely difficult time reasoning through all the possible logic flows. But we have tools and technique
by naasking 9y ago
> Software is crap because humans on the whole have an extremely difficult time reasoning through all the possible logic flows.
But we have tools and techniques that make this easier. Why don't we use them?
Also, I don't think 100% correctness is the ultimate goal of this article. Software is probably nowhere even near that correctness level firstly, and secondly, software is also partly crap because it doesn't run any faster than it did 30 years ago despite tremendous performance advances in our hardware.
> What does that make us? It makes us jerk-offs, that’s what it makes us.
Let's be honest, software as it currently is written is considerably more complex than most other engineered systems that we take for granted.
That said, we've had tools and techniques to mitigate a lot of this complexity, and to have computers double-check our work (eg. type systems and model checking), but we don't really use them as much as we should. What's worse, we even use tools that are intentionally intractable to any kind of work checking/validation (like dynamically typed languages).
There's really no excuse for this.
- Annatar 9y agoFor 20 years I’ve been writing entire applications in AWK, a dynamically typed language, and not once were any of the bugs due to typing. And yet, we’re such a hopeless industry when most of us believe that a strongly typed system is essential for high quality software. It makes me despair even further about this profession.
- naasking 9y ago> For 20 years I’ve been writing entire applications in AWK, a dynamically typed language, and not once were any of the bugs due to typing. If you spent 20 years writing serious programs in Awk, I'm not convinced you know what real static typing is.
- Annatar 9y agoI had Ada as part of the core curriculum, just so we're clear. And being part of the cracking / demo scene, I grew up writing in MOS 6502 and MC68000 moving on to UltraSPARC assembler, so I just might know a thing or two about typing and what it actually translates to at the machine level. But, hey, barring suddenly landing a job working on SmartOS / illumos, that's also why I want to exit the computer industry: someone always isn't convinced and they think they know it better than I do. If I get out, anybody can not be convinced and know better for all I care at that point.
- naasking 9y agoMachine level translation of language abstractions isn't relevant. Ada is an ok typed language, but still limited in many ways, but that's neither here nor there. The reason I can confidently state that you don't know what typing is, is because a type system is simply a means to prove propositions about your program. A type is a proposition. Any proposition, really. Most type systems employ propositions about simple equalities, inequalities and subsets, but there exist type systems that prove the absence of data races, deadlocks, the conformance to protocols, and even the time and space complexity of programs. So when you claim that none of your program bugs were a result of poor typing, you're literally claiming that none of these bugs resulted from treating a false proposition as if it were true. That's just nonsense. Literally every bug results from treating a false proposition as true. Even if we just stick with type systems dealing with simple equalities, like ML, claiming that none of your bugs would have been caught by types means that you never mistakenly considered two values as equal when they were not. Which is by itself exceedingly unbelievable. And even if you are that perfect, you clearly don't have a perfect understanding of your fellow, imperfect human beings who need tools to actually help them avoid mistakes.
- Annatar 9y ago"Even if we just stick with type systems dealing with simple equalities, like ML, claiming that none of your bugs would have been caught by types means that you never mistakenly considered two values as equal when they were not." How could I mistake two values as equal when they were not? If I'm doing a cmp.b d0, #$31, either d0 will contain #$31 and it will be a byte or it won't. It can't be any other way (unless your central processing unit is designed by intel corporation)! In the line of work I do I don't normally design systems with locking, but I have designed them in the past and they worked fine by the way of empirical testing (purposely trying to cause a deadlock). I didn't need a formal system to prove it, nor would I ever trust such a system to ensure that my code or logic were correct. The rest is pure philosophy about provable code, and I've little appreciation for that: even Donald Knuth famously wrote beware of bugs in the above code; I have only proved it correct, not tried it. That's very instructive for one seeking insight, and I urge you to rethink your position on strong typing, because it's not the panacea you appear to believe it is. It doesn't make a difference if one is not a good programmer: in that case, nothing will save one. Not even being able to formally prove one's program logic is correct. Finally, I leave you with a theme from my childhood when I was learning to program: natural born coders I recommend meditating on it if you intend to continue working in the computer industry, because it's a real thing. They are few, but they do exist, and their work is unbelievable to behold. Even without them having used a strongly typed system to formally prove their code correct. https://www.youtube.com/watch?v=hvX6Y2bW4Z0 https://www.youtube.com/watch?v=hvX6Y2bW4Z0