Test-Driven Development (TDD): To free, or to constrain?

Praying Mantis, looking to put the bite onto your lovely butterfly

Praying Mantis, looking to put the bite onto your lovely butterfly

How many times have you reached for a nice shiny new tool and put it to good use, enjoyed its benefits .. and then after a spell realized that your shiny plaything has walked over to take its place along with all the other myriad factors that weigh you down with complexity and detail?

A: You factor out a bit of common functionality from your project code, and compose a cute little function that does just that. The API into your function is simple, your inputs are well-defined, and the output is deterministically decided by your inputs. You know exactly when it is correct; so you compose a suite of unit-tests to prove its’ correctness and add that to your continuous build/test process. Very nice. Have some coffee.

B: Your management has mandated that you shall be always as one with the Test-Driven-Development (TDD) buzzword. Everything you write, is unfinished until you also write the unit-tests, lots of them, and everything passes. No sweat – TDD has proven benefits, you say. Predictability. Reliance upon correct software. Every sprint (a term from the SCRUM process) has milestones, and tests to prove them. But those tests are no small amount of added work. And with each incremental bit of functionality, many existing tests now fail. So you have to go back and fix those. More late nights of coding. The frig empties of creamer. Oh, by the way — now some of your teammate’s code is failing. Oops. Well – they gotta get on board with the new functionality you just added – so they’re working late too. The show-and-tell is tomorrow. Maybe it will work – who knows? Everyone has been so buried in trying to meet the milestone, that no-one has had a spare moment to sit back and really see whether this project is going in a good direction.

What happened? How did you ever get from A to B? And is your job (and your company) still going to be around tomorrow — will you survive?

Let’s talk about this. and I’ll continue this story next week (check in Monday morning, 4/22).

Advertisements

About James W Hurst

a professional software designer since the beginning days of the desktop cptr and uC-controlled avionics, I today am focusing on Java, Swift, C# and F# for building mobile and desktop and online applications under Android, Xamarin.Forms, iOS, WPF, and ASP.NET-MVC along with the requisite HTML/CSS/JavaScript/Ajax for web applications. My database expertise has covered a panoply of different database-engines and modeling approaches, and my main area of academic interest is Artificial Intelligence and vision.
This entry was posted in Software Design, The Development Process and tagged . Bookmark the permalink.

2 Responses to Test-Driven Development (TDD): To free, or to constrain?

  1. sledders says:

    It’s going to be end of mine day, but before end I am reading this enormous paragraph to improve my know-how.

  2. eасh says:

    This website really has all the information and facts I
    needed about this subject and didn’t know who to
    ask.

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