5 ms·
Writing code is a significant source of bugs in just about all software of any complexity.
by nicky0 4y ago
Writing code is a significant source of bugs in just about all software of any complexity.
- teakettle42 4y agoGood news, then; languages with an Optional<T> type don’t require you to write more potentially buggy code to check for (or forget to check for) nil.
- nicky0 4y agoMeh, different languages give you different tools, different degrees of nannying vs freedom. Some may give you a foot gun, but at least you have a gun and you aren’t required to point it at your foot.
- teakettle42 4y agoI prefer languages that make it easy for me to focus on solving novel problems, rather than wasting my mental energy just trying to not blow my foot off with a rusty musket.
- pilif 4y agoBugs exist. No question. What does bother me is where you detect the bug. Is it at compile-time? Is it at run-time through a crash? or is it months later after you notice that many of your users seem to have January 1st 1970 as their birthday with no way of recovering the lost data. But hey - at least stuff kept running. Right?
- nicky0 4y agoIf you write bad code then your code will be bad.
- pdpi 4y agoThat’s a pretty unhelpful attitude. This year has already seen CVE-2022-25636 (heap out-of-bounds write), CVE-2022-27666 (buffer overflow), and CVE-2922-0847 (uninitialised memory). Three vulnerabilities in the Linux kernel, in pretty important (and therefore, presumably, closely scrutinised) bits of the code base. And this is the Linux kernel, arguably the most important open source project in the world, worked on by some of the most skilled developers out there. Everybody writes bad code, and everybody misses bad code on review, even in the really important bits, even when they’re well-known bug classes. Criticising a language for leaving these foot guns lying about is perfectly reasonable, and it’s important we talk about avoiding those languages wherever possible.
- yakshaving_jgt 4y agoThis might help you. http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html