←back to thread

371 points ulrischa | 1 comments | | HN request time: 0.219s | source
Show context
layer8 ◴[] No.43235766[source]
> Just because code looks good and runs without errors doesn’t mean it’s actually doing the right thing. No amount of meticulous code review—or even comprehensive automated tests—will demonstrably prove that code actually does the right thing. You have to run it yourself!

I would have stated this a bit differently: No amount of running or testing can prove the code correct. You actually have to reason through it. Running/testing is merely a sanity/spot check of your reasoning.

replies(4): >>43235828 #>>43235856 #>>43236195 #>>43236756 #
dmos62 ◴[] No.43235828[source]
Well, what if you run a complete test suite?
replies(5): >>43236019 #>>43236118 #>>43236949 #>>43237000 #>>43237496 #
1. e12e ◴[] No.43236118[source]
You mean, for example test that your sieve finds all primes, and only primes that fit in 4096 bits?