Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
xero
Poll: When you decompose simliar but not identical problems, do you start with the most complex or the least? #programming
Simple Example: You must validate the contents of a list of Widgets. The most complex case involves 3 seperate lookups from other lists, each lookup depending on the other. The least complex is a simple lookup in another list. I'd generally tackle this from the most complex case as it starts me with the most generic solution that can get scaled back in each similar, but less complicated (and separate), implementation. It may vary by the situation specifics, but I generally go after the most complicated so that I have no surprises on the less complicated one. If the most complicated one seems too complicated then I will try for something in the middle if it exists. - xero
I usually go for the simple one first while also thinking about how to generalize it or where I may have to make changes. - Rudolf Olah