Kasi Prasad

Lifestyles of an Urban Coder

TDD - Test Driven Design

Friday, 23 January 2009 03:48 by Kasi Prasad

I was really pleased to hear Scott Belware’s recent interview (TDD – The Final Word) on Scott Hansleman’s podcast – Hansleminutes. Scott B was really adamant about explaining that TDD is an activity that is focused on design as opposed to testing. He mentions the term Behavior Driven Development (BDD) and how it would be better suited since the word Test in TDD is often the source of confusion. I’m happy that he went as far as to have an entire interview dedicated to changing this common misconception about TDD. Test-Driven Development/Design is not about testing, it’s all about driving out the design of our applications.

When we write our code test first we are forced to make decisions about how the application will operate. We have to express the intent of our code using expectations and verifications before we ever begin implementing any actual functionality. By writing code test first we free ourselves to mold our API from the perspective of a consumer, almost ensuring that we end up with a simple API containing only what is absolutely essential.

A powerful side-effect of TDD is testability. When we write code test first we end up with a set of specifications which can be used to verify the behavior of our application. When these specifications are checked (by running the suite of tests) we can verify that our application behaves appropriately. When a change is made to the behavior of our application, these specifications will indicate (by way of failing tests), that such a change has been made. The testability aspect of TDD, while quite helpful is not the main focus of TDD it is only a side-effect.

While TDD forces us to create high quality code (because we must test pieces of the system in isolation) , doing TDD doesn’t guarantee we’re going to produce bug-free code! TDD needs the accompaniment of Integration Testing and Acceptance Testing in order to ensure quality. If TDD were a drawing, integration and acceptance testing would be the frame you’d place your finished masterpiece within.

Stay tuned for more…

Tags:   ,
Categories:   Architecture | General | TDD | Testing
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Blogging!

Wednesday, 21 January 2009 18:02 by Kasi Prasad

Well, after much procrastination, I’ve decided to get my act together and jump on the blog roll. Expect to see new articles added on a weekly basis.

To tell you a little bit about myself:

I'm a Software Analyst / trainer & mentor living and operating out of New York City, New York. I operate a consulting firm which designs and develops applications, primarily on the Microsoft stack using the .NET Framework. I hold an assortment of Microsoft certifications and I'm an active Microsoft Certified Trainer (MCT).

I believe in Agile values and practices and employ methodologies such as eXtreme Programming, Scrum and Lean to manage software projects.

I'm also a big supporter of the ALT.NET community. One of my favorite quotes describing what it means to be an ALT.NET type of developer:

"You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principles"

Tags:  
Categories:   General
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed