TDD : Why Red Green Refactor is important in TDD

As a TDD practitioner I feel that the first phase (Red) is very important to know that the problem you are trying to solve has not already been solved. And it worth starting to write production code. Other wise you might not know your code did that job or you code is redundant.

RGF teaches you the law of nature. You need to identify the problem before solving the problem. Red (exit code non zero) indicates that you have identified the problem area and now you need to solve it.

After the problem is solved, then you can refactor/improve the way you solved. May be you find you a better and efficient way to reach the destination.

One thought on “TDD : Why Red Green Refactor is important in TDD

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s