News for hackers. Stuff that matters.
Re:Criminal Overengineering by stcredzero on Wednesday June 23, 2010 @09:26AM (#1454838)
As I say in a cousin comment: an easy way to get the best of both worlds is to wait until you have an apparent problem. The 4th time you start writing that same switch statement, maybe you can tell you're going to be doing this a lot more and it's time to bring out Strategy. Doing it sooner is too likely to be premature.

The advantage of this approach: you never have to prognosticate. Hindsight is 20/20, so use it!

EDIT: I used to use n=2 as my threshold, but I found it much better to have a slightly higher n in Smalltalk. I am spoiled, though because I have such lightweight but powerful (syntax-aware) tools for searching such patterns.

There are no comments on this comment yet.