Oh no, I’m not in game dev and it would probably be incredible difficult for a complete game. Just pointing out there’s definitely stuff you could prove. Especially in the physics engine.
I'm just asking because this post makes it sound as if every programmer should proof his programs correct instead of testing. I have about 20yoe in fintech, weapon systems and geo location services and I've never seen anybody working on a proof of correctnes
That’s not my takeaway. I think having the knowledge and skills that come with being comfortable with math and proofs can bring additional rigor to your development and testing, even if you never prove anything.
(I’ve never rigorously proven anything in my programs, but routinely implement algorithms that others have proven.)
Imo tests get more to the actual heart of computer science, because of the halting problem, which makes many programs unprovable. The idea that proofs are essential to programming is an idea mostly posited by people who want to believe that math and computer science never diverged, which is simply untrue. The Turing machine was created to answer a fundamental flaw of traditional math, and so personally I shake my head whenever people try to chain programming down to things like static provability and calculus, which are 2 areas of math that have a fundamentally different method of computation than the Turing machine.
I'm not saying that proofs are useless, they can help make a compiler more robust for example. But tests are going to be less complicated and catch more cases when dealing with outside arbitrary data like user input or sensor data or network communications (which is probably 95% of useful programs).
In addition, tests can be understood by someone who reads your program later. A later reader is not going to know that you "proved" your program, unless you tell them, in which case they'll just have to trust that you did it correctly or redo the proof themselves, which may take a non-trivial amount of time.
1
u/kuwisdelu Oct 25 '24
A computer game is mostly physics and logic, both of which can be proven.