I mainlined the series over the last couple of days, just on a whim because it was a huge part of my childhood. She-Ra was *way* better than He-Man, IMO. I'd heard all the fuss about the show so I was curious. It's really not bad at all! I'd recommend it, for sure.
I appreciate the concern about people choosing performance over correctness; personally, I'm very much about correctness first (I'm fanatical about unit testing). It's just that I can't say I've ever seen a project where the decision you're describing actually happened. It may just be my experience, but I have *never* seen anyone say: "Well, it costs a bit extra, though not enough to matter... but even though it will make my software much safer against bugs and security threats, I don't want to pay this negligible performance cost." Quite the opposite, I can't imagine a normal-case situation where people wouldn't pay even a reasonable performance cost for that kind of safety.
Instead I've seen *much* more complicated cost/benefit analyses (when done). There are plenty of other good reasons for not putting that kind of instrumentation in the final binary; the performance cost isn't the only thing considered (and, again, in reality it's not exactly a negligible performance cost).
Incidentally, I've heard that life jacket analogy before as a "fuse" analogy: "What's the point of designing your circuit with fuses for safety, then removing them when you ship?"
Either way, it's not a great analogy if your concern is performance. Fuses don't make circuits run slower, and wearing life jackets doesn't halve the speed boats can move at, or introduce the risk of the boat running out of fuel before it reaches its destination.
I program in C++, and I'm not aware of any software-based buffer-overrun detection techniques that *don't* add unacceptable overhead. 2X *is* "slight" overhead for buffer-overrun detection - most schemes are *way* more costly than that (eg., valgrind is 10X at *least*). 2X is "slight" enough that it shouldn't make your program perform ridiculously differently between debugging modes and release modes, but it's hardly an acceptable overhead for production.
There are no practical software solutions, and that's why hardware people have recently stepped up. In fact, *just* a couple months ago, ARM announced new memory tagging extensions (https://community.arm.com/processors/b/blog/posts/arm-a-profile-architecture-2018-developments-armv85a). It's not perfect - it might not detect an off-by-1 error, but it'll probably detect off-by-5 - but its runtime costs are on the order of <1%. *This* is what we need - hardware support; software solutions are generally not practical for production.
Sanity checks used specifically for debugging really do have costs that cannot be tolerated in practice. For example, the kinds of memory guards used to debug buffer overruns in sanitizers routinely add around a 2X cost in memory use and access time - hardly "miniscule".
You can scoff at programmers being silly for worrying about a 2X performance cost when it means the difference between 10 ns and 20 ns - in other words, completely unnoticeable by the user compared to the time they spend reading/inputting stuff. But you'd be pretty pissed off if your phone's battery only lasted half as long because of it.
Every year I make a list of "alternative" holiday songs - songs that just sound *different* from the usual barrage of sound-alike holiday tunes and religious carols. Last year's list had 100 songs, and this year I've already got over 60 new suggestions.
Do you have any suggestions for non-religious, holiday-themed songs that sound different from the standard holiday fare? Check the post for more criteria! And feel free to offer your suggestions by comment or reply.
Late again this week, but not for a bad reason! Was a busy week - did 4 posts - so I started late; and then there were so many great items, it took a long time to go through them all.