12

I've been working in the same software development department for a few years now. In that time, the average stay of a developer has been 6-9 months. A handful have been around for over 2 years, but the majority of our 20 or-so developers come and go at a relatively high rate.

As a result, the majority of our projects have become maintenance nightmares. Contractors will come in, code a few patch releases, and leave.

Our department has development guidelines (we do TDD) but they aren't enforced.

Recently, I've been pushing for our department to produce more maintainable code. I've been asking for mandatory code reviews and mandatory TDD. Management fully agrees with me... in theory.

In practice TDD always goes out the window. The justification is always that, in our domain, we need to deliver NOW.

I keep going on and on to colleagues that we're just digging a hole for ourselves, and that our current approach to software development is costing our department a lot of money... but it seems to fall on deaf ears.

What can I do to get my colleagues to see the value of code maintainability? How can I explain that short-term wins without a long-term vision is not sustainable?

MetaFight
  • 11,619

3 Answers3

16

It's not your colleagues that you need to convince.

If management truly agreed with you, they'd be enforcing the code reviews and TDD. As it is, they're just nodding their head to make you stop bothering them.

I see two options here:

  1. Make a pitch to senior management about how high employee turnover and lots of client facing bug reports are costing them money. Include in your pitch a viable solution that involves enforced code reviews, TDD, etc. Wrap a time frame around it and promise to deliver. They might make you a manager in charge of fixing it.

  2. Leave. If you know it's going to collapse, why stick around?

p.s.w.g
  • 4,215
Dan Pichelman
  • 13,853
4

I see this happen a lot when one developer works on a project exclusively for a long period of time. They know where the pitfalls are and how to work around them, and so they generally don't care that they exist. The number one way to convince developers to employ common coding standards and best practices is to get them to work on other developer's code from time to time. They will see pretty quickly the value of self-documenting code, proper exception handling, cleaning up dead code, etc. Do this once or twice and your fellow developers will be happy to adopt these practices.

With managers, it's usually a different story. Good managers will respond to complaints from developers and proactively look for ways to improve your company's coding practices. Bad managers won't care, as long as the product gets out the door on time. For these types of managers, you will have show them what's wrong with how you're doing things. Explain that it takes twice to three times as long as it should to train a new developer, or that it takes a days to find bugs which could be fixed in a matter of minute, all because the code base is a mess. If possible show real, concrete cases of the costs associated with poorly maintained code.

p.s.w.g
  • 4,215
-1

Screw explaining things to people.

It might be easier to get management/other devs onboard with some type of Continuous Integration. Then, if the tests don't pass, the code doesn't ship. End of story.

CamelBlues
  • 1,145