|
Re: Is Test-First Development an Impediment to Creative Flow?
|
Posted: Feb 2, 2005 1:48 AM
|
|
> I like to think of refactoring and testing as editing. > When writing an article, most > writers first create an outline, then write the content, > typically in a few sittings, > and without regard to mistakes, typos, sentence structure, > etc. Only then does an > author spend most of his time on editing, fine-tuning, and > polishing the article.
I take your point, but I think this is a misleading analogy. One can publish an article with a severely flawed structure - if the content is strong enough, readers may not mind. And typically, the author of the article retains ownership and may chose to correct the structural flaws in a later revision.
I prefer to take an incremental approach to code development. It's possible to grow a system: interfaces, interfaces + stub implementations, full implementations. At each stage, code gets checked in; and at no stage is anything truly broken. The structure is in place early on. Unlike most articles, software is often developed by a team - this incremental approach is more team friendly.
Of course, prototyping is a great way to shape a design, but I still adopt the approach described above when prototyping.
One of the benefits of "test first" is that it helps you get the interfaces right early on.
I do revise and polish code, but again in an iterative fashion: I want my code checked in early, and I want any code I check in to have undergone at least some polishing.
|
|