From: Kevin Smith Date: 2001-11-03T01:16:53+09:00 Subject: [ruby-talk:24172] Re: Modularity question (and XP) --- "Hal E. Fulton" wrote: > The "Big Design" syndrome is real, but the opposite > extreme is excessive sloppiness and failure to plan > ahead. > > I think of it as "prefactoring" -- as far as I know, I > made up that word. No charge for that. > > I'm not talking about a gigantic productivity > improvement, of course... > I'm talking in the realm of "an hour of prefactoring is > worth two hours of refactoring." My own experience with XP leads me to believe that "one hour of refactoring is worth at least two hours of prefactoring". One of the XP practices that "enforces" modularity is TFD (test first design). It's a powerful way to work, but does require quite a bit of commitment, and it feels very strange at first. Many people who try it, however, never go back to the "old way". In the specific case you mentioned, I would be inclined to look for "reasonable" boundaries between your app and the specific db and gui packages you choose for your initial implementations. Later, when you go to add a different db or gui, refactor as needed. It's really hard to predict how a generic interface should be designed. It's much easier to mold an existing specific interface into a generic one. [Assuming your code is simple, well-factored, and ideally has unit tests]. Kevin __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com