Just a thought
Written by Piers Cawley on , updated
There’s a refactoring principle that states that, when you start doing the same thing for the third time, you should refactor to remove the duplication. I’m starting to wonder if there’s a Smalltalk principle which states that, when you start doing the same thing the second time, you should search the image for the obviously named method (or use the method finder to find some candidate by feeding it some inputs and an expected answer), because the odds are good that it’s only the second time for you - it might be the millionth time for the image you’re working in.
There’s a refactoring principle that states that, when you start doing the same thing for the third time, you should refactor to remove the duplication.
I’m starting to wonder if there’s a Smalltalk principle which states that, when you start doing the same thing the second time, you should search the image for the obviously named method (or use the method finder to find some candidate by feeding it some inputs and an expected answer), because the odds are good that it’s only the second time for you - it might be the millionth time for the image you’re working in.