4 ms·
I would like to propose that we all investigate how we can be more scientific about our programming. I imagine we can create artificial scenarios wherein we su
by EdSharkey 10y ago
I would like to propose that we all investigate how we can be more scientific about our programming.
I imagine we can create artificial scenarios wherein we subject our code to rigged experiments. These experiments can serve to isolate parts of our codebases, pushing known values as inputs to the part and then inspecting the output for what we expect are correct values. We can posit theories about how our code should work, and then test those theories with experiments.
I envision a few benefits to these experiments:
1) isolating our modules to make experimenting easy may help to reduce the complexity of our programs.
2) overall 'correctness', whatever we define that to be, can continue to be verified over time as our programs change and grow as long as we update the expected values in our experiments at the same time or create additional experiments as needed.
3) the experiments themselves will serve as a kind of documentation of the codebase because they will show the code in action in fine detail.
What does everyone think of my idea? I know it sounds like an odd proposition, but science seems to work good in other disciplines. Maybe we can try it in ours?
- plandis 10y agoYou heard it here folks! HN just invented formal methods of verification and fizz testing! ;) (But seriously, I do both of these to test/verify the distributed systems on which I work -- both are great ideas)