When you refactor your code to be testable, it automatically improves your design

I’ve read this assertion many, many times, not once seen or read anything to substantiate it. It’s one of those dumb ideas like “code smells” that people say to create an impression that they know what they’re talking about.

It sounds like your goal in software development isn’t software development, it’s software testing. You could get a hundred times more benefit from working under conditions that allowed you to concentrate well enough to write solid code instead of writing shit code because you aren’t allowed to concentrate and then writing stupid tests retroactively.

Oh, that’s right. You do the tests before the code now. Yeah that makes a ton of sense.

As for “refactor,” yes, it’s a very common term. So is “unicorn,” which I read at least once a day. Unicorns don’t exist. And if ten people use the word “refactoring” they will mean at least six different things, if not all ten. It’s bullshit.

Like TDD.

Written by

American Software Developer living in Vietnam. Classical musician (guitar, woodwinds), weightlifter, multilingual, misanthrope • XY

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store