Live data from Hacker News

Ask HN: How to convince big tech team that tests and code quality matter?

news.ycombinator.com

1–10 of 76 posts

Ask HN: How to convince big tech team that tests and code quality matter?

#1
I recently joined a big tech company. I'm slowly realizing our codebase is too lax regarding automated tests, and frankly code quality in general (e.g. no teamwide style guide).

This must lead to a lot of problems which I'll only face after ramping up, but even onboarding is painful if you don't have e.g. clear automated testing set up.

I've been in the industry for about 10 years and testing has always been an important part of the job. I guess I saw it as a given; to me part of the job _is_ writing tests. I assumed this was fairly obvious in 2021.

How should I approach this with the team and my manager? Keep in mind I'm new and a IC, not very senior. Others in the team might already have struck this chord in the past as well. Or perhaps I should drink the cool-aid and shut up.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#2
You want to become one with the tribe, wear the same clothing, and dance the same dance. Right now you are the outsider and outsiders are always a threat. If you come in there with your outsider ways you will immediately face resistance and risk not being accepted into the tribe. Once you have shown the other primates you are a trusted member of the group, then you can suggest that they cook the meat before eating it.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#3
post #2

You want to become one with the tribe, wear the same clothing, and dance the same dance. Right now you are the outsider and outsiders are always a threat. If you come in there with your outsider ways you will immediately face resistance and risk not being accepted into the tribe. Once you have shown the other primates you are a trusted member of the group, then you can suggest that they cook the meat before eating it…

One more thing: once you become an outsider, it’s nearly impossible to become part of the tribe.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#4
post #3
post #2

You want to become one with the tribe, wear the same clothing, and dance the same dance. Right now you are the outsider and outsiders are always a threat. If you come in there with your outsider ways you will immediately face resistance and risk not being accepted into the tribe. Once you have shown the other primates you are a trusted member of the group, then you can suggest that they cook the meat before eating it…

One more thing: once you become an outsider, it’s nearly impossible to become part of the tribe.

That cannot possibly be true since everyone starts out as an outsider and we know tribes form.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#5
You should first establish yourself as a productive member of the team. No one is going to want to hear about how they could do things better from someone who just started. Once you have credibility and maybe some allies you'll want to have some evidence to support any new processes or workflows. Anecdotes about how you did things at other jobs won't carry a lot of weight.

The problem with software development techniques and tools like automated testing and style guides is that while they look like good ideas, and work at some places, there's not a lot of empirical evidence to support claims that automated tests will improve developer productivity or code quality.

Programmers usually perceive any new code base as crap in desperate need of new ideas and tools. It takes a while to get into a code base and really understand it, and by that time some things that seemed terrible or confusing at first will make sense.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#6
Aside from what Flankk suggested about being one with the tribe: while you're waiting for your tribal acceptance card, measure the problem in silence.

The change defect rate (how many percent of your commits are made to fix a problem introduced in an earlier commit) is very easy to sample manually, and gives you an idea of the scale of the problem.

Then you can go to the team and say, "Look, 40 % of the things we do are fixing up problems we created in the first place. With better processes in place, we could free up a lot of bandwidth for things that matter."

Or maybe you find out that you have a change defect rate of only 12 %, and the things you think are important, for some reason, don't matter in this team.

----

Measurements that complement the change defect rate for a fuller picture, according to Forsgren et al.

- Deployment frequency (literally, what's the average time between deployments to production)

- Time to fix (when a problem is first reported, how long does it take on average until the working fix is deployed to production?)

- Lead time (once a developer considers themselves "done" with the code, how long passes until that code is in deployed to production?)

The time to fix and change defect rate measure quality, so these are the ones you probably would focus on. The other two measure speed.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#8
post #4
post #3

Earlier quoted context omitted.

One more thing: once you become an outsider, it’s nearly impossible to become part of the tribe.

That cannot possibly be true since everyone starts out as an outsider and we know tribes form.

You two are using different definitions of outsider. Parent is saying “one who has been labeled as other” and you are saying “a brand new entrant”.

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#9
One general strategy is to make a suggestion, allow it to be shot down, then start gathering data about why fixing the thing would help.

I operate at a very high level in an organization but in general I accept disagreement, keep track of what the outcome was, and if I was right decide if I want to revisit the issue with the new data. The best outcome is I was wrong and nothing needs to change, or second that I was right but the impact was small so the effort was unjustified. If it turns out I was seriously right, then we can start putting motions in place to fix the issue, and I get credit for voicing concern early. I hope to be wrong!

Re: Ask HN: How to convince big tech team that tests and code quality matter?

#10
When the team has a demo day, brown bag lunch, or something where people share new ideas, that’s a great time to show off testing.

Are tests part of your CI/CD pipeline now? You can always add them to your own code. And slowly increase the number of tests that way.

You might have a harder time adding a style guide if no one cares. You could try to add the style guide as part of your build pipeline. You might need to start by fixing all the low hanging fruit errors yourself.

Whatever you do, don’t do what I did and start complaining about stuff at every step while in a new job. It’s a big ship. Turn it slowly, or be prepared to live in the worst cabin and/or be thrown overboard.

Bring it up in your 1 on 1 with your manager, too. Just ask their thoughts. Maybe they also feel the same way, and have wanted to improve things.

Is there anything extraordinary about this job? You could always just find another job where testing & code quality are taken more seriously if it’s really important to you. If something is special, be prepared to live with the things you don’t like for a while.

Post reply on HN