Comment by xedrac

2 hours ago

I have felt this many times. However, the effort involved in writing code does not indicate the amount of issues that code may have. This is why I prefer Rust to C++ these days - it just removes 90% of the development tail, which can be quite long in C++.

That’s true, however I tend to build my testing harnesses alongside the code I write, hence every single function and the whole flow has a testing suite ready almost immediately (via Catch2 99%of the time), and every commit is tested locally and by a couple of runners after the commit.

This coupled with generous amount of Valgrind testing allows me to catch problems early and fix them immediately. Doing this allowed me to write very performant code without any leaks or accuracy problems.

Another thing I do is making some cases mathematically impossible. If this promise is broken, code is guaranteed to crash at that point, so it’s self verifying in a sense.

Of course enforcement of this is possible due to fact that I code solo most of the time, and has the discipline to do boring things as well as the exciting and fun things.