Test-Driven Development With Refactoring

Published September 24th, 2009 Under Uncategorized | 1 Comment

Success on an Agile project relies heavily on the people in the trenches. Developers, testers, and product managers focused together, can deliver astonishing accomplishments in a short amount of time. Extraordinary results require discipline, motivation and alignment. Test Driven Development (TDD) and Refactoring creates the momentum to help developers organically adapt to an endlessly changing world. In this hands-on tutorial, you will see and try simple TDD and Refactoring exercises. The session is split in two videos.

Related articles

* Improving Application Quality Using Test-Driven Development (TDD)

* Responsibility Driven Design with Mock Objects

* Demystifying Extreme Programming: Test-driven programming

* Test-Driven Development in Python

* Refactoring

Eliminating Static Dependencies

Published August 21st, 2009 Under Uncategorized | Leave a Comment

Nature abhors a vacuum.  It turns out she also abhors static dependencies (I have my sources).  Static dependencies are the modern-day globals, often exposed through classes named “Helper”.  I’ve certainly been guilty of overusing static dependencies in the past, with classes like “LoggingHelper”, “SessionHelper”, “DBHelper” and so on. The problem with static dependencies is that they are opaque to the extreme, enforcing a strong coupling that is impossible to see from users of the class.  To demonstrate techniques for eliminating static dependencies, Ray Houston and Jimmy Bogard created a short screencast. The screencast demonstrates using TDD along with ideas and techniques laid out in Michael Feathers’ Working Effectively with Legacy Code and Joshua Kerievsky’s Refactoring to Patterns.  It details how to make safe, responsible changes to an existing legacy codebase, while improving the design by breaking out dependencies to a static class.

Watch this screencast on Pablo TV

The Joys and Pains of a Long Lived Codebase

Published June 12th, 2009 Under Uncategorized | Leave a Comment

Agile development practices and good Object Oriented Design principles are supposed to enable unending, gentle modification of an existing codebase. Is this really true, though? In the course of 5+ years developing and evolving an open source framework, I’ve learned a lot of painful lessons about the issues that retard code extensions and modifications. I’ve also learned a little bit about the design decisions that dramatically increased my ability to extend the code. In this talk I’ll show several instances of how failing to heed design fundamentals introduced code viscosity, and how some strategic refactorings opened up the flood gates for new functionality.

Undoubtedly, the practice of Test Driven Development directly supports your ability to modify a system, but I found out the hard way that there are also plenty of ways to do it wrong. I’ll share examples of high friction TDD and the changes in strategy I employed to reduce that friction to wring more value out of TDD. The programming languages we use for .Net development have changed dramatically in 5 years. We can apply the new language features in C# 3.0 to improve the readability and structure of both our code and the way that we express unit test specifications. Lastly, I’ll discuss our changing expectations on framework usability and the resulting impact on design.

http://www.infoq.com/presentations/Lessons-Learned-Jeremy-Miller

Refactoring Unit Tests Part 2 Using Object Builder Pattern

Published June 4th, 2009 Under Unit Testing | Leave a Comment

In this screencast we will demonstrate how to use the Object Builder pattern to create and setup objects for tests. In the first part we discussed how to introduce the base class for the unit tests to improve readability and cleanness of code.

http://highoncoding.com/Articles/443_Refactoring_Unit_Tests_Part_2_Using_Object_Builder_Pattern.aspx

Refactoring Unit Tests Part 1

Published June 4th, 2009 Under Unit Testing | Leave a Comment

In this screencast we will refactor unit tests to make it more readable. It is very important that you refactor your unit tests. Unit test code is not part of the production but refactoring them can help you in the long run and will provide benefits when maintaining the application.

http://highoncoding.com/Articles/442_Refactoring_Unit_Tests_Part_1.aspx

« go back