Hacker News new | ask | show | jobs
by smsm42 2240 days ago
There's a big difference between randomized model and code giving random results because you have race conditions in the code. If you do an experiment, you can expect some randomness because no experiment gives same value ever. But behind it is the common reality that you can measure. Now, if during an experiment somebody would come and kick the equipment, spit on it, spill water on it, subject it to random electric shocks, shoot at it, etc. and then when results come out all over the place say "well, it's supposed to be random!", completely ignoring what was done to it - you'd say that person is insane, it's supposed to be random but not like that.

If you code has race conditions that make your simulation roll out and produce different results, then you aren't measuring the result of the simulation, you are measuring race conditions.

Of course, you could be lucky and race condition could be harmless or contribute almost nothing to the result. But this is unusual, needs proof and indications are it's not the case. Responding to that "well, it's stochastic so what do you want!" is not the way it works.

Poor code quality is a sad reality in many scientific projects, yes. But it's not just a code that is unreadable. It's the code where race conditions knowingly mess with the model results! You can't just dismiss that.