by bbcbasic · 11y ago · 0 comments
This takes a lot of discipline and I have never done it a t work but it is fun to try at home to see what the extreme case is like. I don't do this at work because I have no control over 99.99% of the production code and how loosely coupled it is for testing. (In C#, but in Ruby you can get away with it due to duck typing).
TDD forces you to write code that is testable. So you never should end up thinking 'oh shit I need to expose that private member variable to make this class testable'.
Anyway just try it and then as you get stuck read up on how to do TDD. I am always an advocate of try before you learn (makes the learning easier).
No comments yet.