▲ | JackSlateur 4 days ago | |||||||||||||||||||||||||||||||
What algorithm ? The whole idea is that algorithms are useless, and you should just write a bunch of tests and go with it Yes, if I write stuff with locks, I shall ensure that my code acquires and releases locks correctly This is completely off-topic with the original post; Also, you cannot prove something by tests; Just because you found 100000 cases where your code works does not mean there is not a case where is does not (just as you cannot prove that unicorn does not exist) :) | ||||||||||||||||||||||||||||||||
▲ | sarchertech 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
> Also, you cannot prove something by tests; Just because you found 100000 cases where your code works does not mean there is not a case where is does not (just as you cannot prove that unicorn does not exist) :) That’s exactly it. For any non trivial program, there exists an infinite number of ways your program can be wrong and still pass all your tests. Unless you can literally test every possible input and every bit of state this holds true. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | wubrr 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
It's not about making sure your system is 100% perfect. You cannot do that on any real sufficiently complex system. It's about testing the core functionality in a relatively straightforward and reliable way (including concurrency testing), to catch many common bugs. | ||||||||||||||||||||||||||||||||
|