Developers say "We don't have time to write unit tests because management rushes us." Regardless of whether they're rushed or not, no developer who understands how unit testing makes us go faster is going to say that. 1/n #softwaredevelopment
But if the developers don't understand how unit tests make developing working software faster, not slower, are they going to tell their managers that they need to adopt a practice of writing tests? Of course not. 2/n
Will developers who don't understand a practice tell their managers that the reason they go slower and create more defects is that they don't follow a practice they don't understand? Of course not. 3/n
If the developers don't know that they need to write tests, how is their less technical manager supposed to know that? What are the odds that their manager is going to ask them whether they write tests or recommend it? 4/?
btw although I think writing tests is critical, I'm also using it as a stand-in for all sorts of development practices that make us more productive. 5/?
I've seen this impasse remain for years, and I've been part of it. Development is slow and buggy, devs want to rewrite, once in a while a mgr gets fired, people move on, they go through the motions of Agile while ignoring the "technical excellence" part, but nothing changes. 6/?
What is the way out? For devs, don't dismiss unit tests. If you don't already know how they make us more productive, try a leap of faith. Don't google and read all the reasons to justify not doing it. Just try it. 7?
Yes, you'll get it wrong and do some unproductive stuff. I'm certain I'm nowhere near getting it all right. But that's the same thing that happened when we learned how to code in the first place. We can't go around it. We can only work through it. 8/?
If you're a manager and have no idea what this is or why devs should do it, read about it. You can't manage developers without understanding what developers do or what makes them more productive. 9/?
Talk to your developers. Find out if they're writing tests. If some are, encourage them to help others. If no one is, try to get them some help. Don't try to force it on them. 10/?
Again, I don't emphasize writing tests because it's the only practice that matters. Rather, because it's a likely sign of where we're at with trying to grow our technical practices. 11/?
Writing tests is also a gateway drug that leads to all sorts of ways to improve how we write code. It requires us to make other changes, and at the same time we start to see the benefits. 12/12
You can follow @scotthannen.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: