Assume bugs
Of course it’s not going to work the first time.
You’ll need to fix errors in the code. Adjust errors in measurement. Deal with changing conditions. Perhaps there are systems effects no one could have predicted.
If we begin a project with the high school mindset of getting a good grade (and avoiding the red check), then not only won’t we be eager to find bugs, we’re less likely to invest in projects that might not lead to flawless results.
On the other hand, if we accept that bugs are a useful part of the process, we’re much more likely to end up with a useful result.
“I’m done,” is not nearly as useful as, “this milestone has been reached, let’s go find some bugs.”
The work isn’t to pretend there are no bugs. The work is to eagerly seek out the most important ones.