Plug Your Own Leak

Note: Cross posted from The Typemock Insider Blog.

Permalink

This week I met a very clever developer. I know that when I say “clever’”, it usually leads to a horror story. Not this time. This guy is smart, built a very smart application. He put a very strong emphasis on good OO principals. Worked against interfaces. And he wrote his own hand-rolled mocks.

I wrote before on the cost of using hand-rolled mocks and why you need an isolation framework. It’s a terrible waste of time, code, and a maintenance debt you carry for the application’s lifetime. Without proper attention it can get out of control, when you start putting if-then implementation in the mocks, to fit the logic in the code. That’s when you have a horror story.

And then I read Oren’s post, reminding me that we shouldn’t steal from our customers. It’s also true when our customers are our employers or ourselves. There’s no excuse for writing boiler plate code, including hand rolled mocks. There are already tools to help you.

There’s a leak in the process. Plug it.

Use the right tool for the job.

Leave A Reply

Your email address will not be published. Required fields are marked *