Live data from Hacker News

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

news.ycombinator.com

11–20 of 76 posts

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

#11
Have you considered that for this business or function within the business, maybe it doesn't matter?

> 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.

Maybe you'll learn why this is not the case after several months of working in your new role.

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

#12
post #7

Find a new job. Don't try to fix cultures, you can't.

This is not true. People who fix cultures are called "leaders" and the good ones do it every day, little by little. Chisel at the marble slab and eventually you'll sculpt a masterpiece.

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

#13
Wait until a bug comes up, fix it, write a test for it, then describe the problem, fix, and test on the next stand-up. Do that a few times and eventually others will catch on without correction or conflict. In short, just raise the bar.

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

#14
post #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 techni…

Totally agree with all your points except

>there's not a lot of empirical evidence to support claims that automated tests will improve developer productivity or code quality.

If you'd have said "there aren't any published papers _proving_ this" I would've agreed simply because I do not know if such studies exist or not (they might); but I'd argue that automated tests obviously improve code quality and productivity. And also ramp up time, which is important in fast growing teams (my case).

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

#15
post #7

Find a new job. Don't try to fix cultures, you can't.

This is not true. People who fix cultures are called "leaders" and the good ones do it every day, little by little. Chisel at the marble slab and eventually you'll sculpt a masterpiece.

Depends on the state of the culture. It has to be at least "fixable" with somewhat open-minded people at the top. There are 10x more people who try to fix cultures but end up burning out and being a scapegoat for everything.

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

#16
You join a team/company that values tests and code quality. Should be a part of you interviewing the company. Trying to single handedly change the culture of a large company where you'll have few allies (because by this point, they'll have all self selected away) is a fools errand.

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

#17
post #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 techni…

Totally agree with all your points except >there's not a lot of empirical evidence to support claims that automated tests will improve developer productivity or code quality. If you'd have said "there aren't any published papers _proving_ this" I would've agreed simply because I do not know if such studies exist or not (they might); but I'd argue that automated tests obviously improve code quality and productivity. A…

The question that matters is not whether automated tests improve code quality and productivity.

The question that needs to be answered is "if I took the time I previously spent on automated testing, and instead spent it on something else like code review or design review, would that result in greater code quality and productivity than automated testing did?"

And phrased that way, you see it's not a dichotomy. It depends on what you would spend the time on instead of automated testing. It depends on whether you already had peer review in your process. It depends on what sort of automated tests you spend time on. It's very hard to say something general without those details.

----

Note that I'm not taking a stance against automated testing. I prefer working in a test-first style myself. I'm just saying it's not that simple.

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

#18
Unless you've been brought in as leadership to turn things around, better to run far and fast. Working without sufficient tests is, from my experience, the easiest way to get 1 month of work done in 6. This will also affect your personal skills development and your outlook on how effective teams work. Get out before it infects you too.

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

#19
It takes a little time for people to see why testing is important. Since you're new to the organization, tread lightly and keep an eye out for places where testing can really make everyone's life better.

I've found that there are a few key junctures at which people take to testing. Here are some:

1) When dead-simple unit-tests catch old bugs. If cos(0) doesn't return 1, there's a problem.

2) When unit tests, for the first time, catch an important new bug in code they're writing.

3) When there's enough testing coverage that you can rip the guts out of a function, install new guts, run the tests, and be certain that everything is fine.

4) When good coverage newly applied to old code finds really subtle very old bugs in code everyone trusts.

Use the easiest-to-use unit-testing library you can. If there's no test-coverage today, some testing is worlds better than no testing. Once people can see for themselves how helpful it can be, the organization can get fancier if it needs to do so. I absolutely love GNU Octave's testing framework [1], as the syntax is as simple as

  function r = foo(x)
     r = x+2
  end

  %!assert (foo(3) == 5)
When it's easy, people take to it like water. I perpetually emphasize to students the importance of writing the most-boring/simple test first.

[1] https://wiki.octave.org/Tests

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

#20
post #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 techni…

Totally agree with all your points except >there's not a lot of empirical evidence to support claims that automated tests will improve developer productivity or code quality. If you'd have said "there aren't any published papers _proving_ this" I would've agreed simply because I do not know if such studies exist or not (they might); but I'd argue that automated tests obviously improve code quality and productivity. A…

It's so obviously self evident that automated tests improve productivity, especially for developers new to a codebase.

A developer makes a non trivial change. How do they know nothing broke?

If there are no tests, they must spend an inordinate amount of time learning the entire system / product to gain any confidence they didn't break something, only to likely miss something that a senior team member will point out. The back/forth will take multiple developers time. At worst, it gets punted all the way to a QA team. Could be days.

Or, with tests, that happens far less often and the feedback loop can be more like 10 minutes.

Of course, tests don't solve onboarding, but they provide nice guard rails.

Post reply on HN