Stepwise refinement

TorgoX on 2002-03-25T12:37:04

Dear Log,

I don't know why it took me until this past few weeks to realize this, but stepwise refinement makes for code that's really easy to walk thru and explain. Esp. if you do it right and keep most of your subs/methods to under a dozen lines of code each. First off, it keeps things from being monolithic. And second off, if you say "wait, let's do that one bit some other way! Like this...", then you just have the whole newly revised sub there, instead of requiring the reader to "mentally patch" the old program in some more complex way, right in the middle of some great big block of uninterrupted code.