Closet Coder

I work in my closet. I code. Yep.

TDD and Pairing Will Save You

| Comments

12 Lessons I learned from Unit Tests/TDD is a great article for practically adding TDD to your teams rhythm. I can’t stress enough how much point 8 makes a difference:

Pair programming helps the team to adopt TDD. When we are trying TDD for the first time or when our deadline is tight, we will have the will to forget the tests and write only production code. Pair programming will prevent the team to cut corners and will keep it writing tests.

This is absolutely true. When you’re on your own, we’re all tempted to cut corners, and when a deadline is looming, that’s when you need the accountability more than anything. Pairing isn’t just for accountability either. It helps you figure out how to test something that you’re intimidated by, it keeps you from taking nasty shortcuts in design, and it helps you look at code from other angles. All three of those are great for deadlines and TDD.

Comments