Reading path for Core Developer Skills
Testing and testability are related, but not the same thing. When attempting to test a part of the system, if it is deemed to be difficult to test this can be an indicator of poor design.
Attempting to test code offers numerous kinds of design-feedback:
Thus, testability is a diagnostic of code quality. Bad code is hard to test. It is also an indicator of poor design, as bad designs are similarly hard to test. Because of this, considering the testability of a proposed design or code element as early as possible helps to avoid rework.
The best way to ensure that code is testable and, therefore, high in quality is to use Test-Driven Development. The reason that counts as an “obstacle” is because Test-Driven Development is an hard discipline. You can’t just start doing it and have it be helpful. You have to put in the time to learn how to do it right.
The upside of an hard discipline is that the investment is made early in your career and pays dividends until you retire. Once you’ve taken the time to get good at Test-Driven Development, learning it will cease to be an obstacle.