4 ms·
I have done this too, particularly in small projects. One thing I try to do in these situations is imagine what functions would be useful should I extend the pr
by sophacles 17y ago
I have done this too, particularly in small projects. One thing I try to do in these situations is imagine what functions would be useful should I extend the program later. Anther trick is to imagine a different pardigm, i.e. coding it up as a state machine.
What I gathered from the original article however, is a focus on those guys who will decompose long_function(params) into short_func1(params), the last line of which is return short_func2(params, 12 state params); .