Understanding and Eliminating Technical Debt (Mark Heath)

Just completed the “Understanding and Eliminating Technical Debt” course by Mark Heath on Pluralsight. What is technical debt? I would imagine most of the I.T. community has heard of “technical debt” by now. The term originated about 20 years ago with Ward Cunningham. He was trying to explain to his boss about the benefits of refactoring a piece of software he was developing… financial software. (Get it? Financial Debt… Technical Debt…) As it turns out, the comparison really is a good one. Probably because we’ve all experienced financial debt to some extent. We go into financial debt when »

Mocking Dependencies (silly dependency! um... not that kind of mocking)

The code in this post is also available on Github. In a mood at work the other day (after hunting down some obscure bug that would’ve been more apparent, had I had some relevant failing tests to point me in the right direction), I started back-filling old code with unit tests. That meant removing some dependencies on things I didn’t actually need to test, so I’ll post a few (contrived) examples. Don’t Rely on External Dependencies One of the most critical pieces of unit testing (although not overly complicated, as I’ll show) is mocking out »