A question that comes up every once in a while is: can we use Test Driven Development (TDD) on existing code? And if not, is TDD useful on existing code? And since most developers work with already existing code, is TDD useful at all?
Alex answers this question. tl;dr: you can’t use TDD “by the book” on existing code that doesn’t have testable design, but that just means you need to use a different set of methods to get it testable first. Learn more about 3 methods in this video.