3 ms·
Agreed. Make a guess, then verify that guess with running code, repeat. I'm surprised this is controversial; engineering ostensibly follows the scientific meth
by perrygeo 2y ago
Agreed. Make a guess, then verify that guess with running code, repeat.
I'm surprised this is controversial; engineering ostensibly follows the scientific method. Without forming hypotheses and testing them, there is no scientific method. Unless we want to nitpick the difference between guessing and hypothesizing, making guesses is a critical part of programming.
I always come back to Peter Naur’s essay "Programming as Theory Building". It's 40 years old now but still nails the essence of programming. The value produced by programming is a shared working theory of the system, not the source code itself. I can't see how you would develop a sufficient theory without first forming hypotheses.
- d0mine 2y agoFormulating your assumptions before you run code and check saves you from rationalizing after the fact whatever behavior you happen to observe. Invalid predictions help improve understanding, learn.