>
I’ve just moved teams to be the only Senior Engineer [...] I want to restructure things to enable the team to start working in a red-green-refactor loop.What's the team currently doing, and why?
>So our culture is to only refactor incrementally as we go along....which makes about as much sense to me as only washing dishes when you are cooking.
It's more like avoiding the trap of thinking "we have a pile of dirty dishes from the past several days, why even bother wash the dishes we used today".
Something useful to reduce technical debt is at least not incurring more of it starting from today. You still have the debt from the past that you'll pay gradually, but not adding to it is a start.
Engineering is about tradeoffs which is why extreme people tend to have last programmed in 1981, or are great at architecture diagrams and cute acronyms. I'm busting nibbles.
>I want to restructure things to enable the team to start working in a red-green-refactor loop.
In my opinion, you add the tests then you restructure things because you'd have the tests safety net that tell you and your team that you broke something.
So...
I'll assume you're using GitHub or GitLab.
Right now, you can add a test that succeeds all the time, then configure the CI on GitLab (adding a minimal `gitlab-ci.yml` just to have a pipeline, trigger a CI job that's triggered when you push your changes, and display the coverage and status badges on the `README.md`.
Once you have a pipeline that practically does nothing but that works, you can get to work with the following approaches:
- New code should include tests (independent effort to get things under control)
- Look at the code coverage, and start writing tests for the untested code. As you are new to the team, this will speed up your understanding of the codebase. You also are being useful for the team actually putting your money where your mouth is.
- Add issue templates to the repository for features, bugs, and incidents. This reduces the varience in issue quality and the team members aren't faced with a blank page staring at them. The issues will have a nice structure with comments on how to fill them so they be the most useful. After a while, the members will be able to parse these issues really fast. The issues will have tags (bugs, features) and you'll be able to quickly filter and focus on bugs. It'll also surface similarities. If a bunch of bugs are about a certain part of the system, a module, or a functionality, you add a test harness first, and then you can refactor it or improve it so it sucks less.
- You do that systematically, you'll see consistent progress without the whole thing being a big deal or stressful because it doesn't require "major changes at once" either on the code or on the workflow.
This is what we did for our team. Add scaffolding. Gradually, but consistently improve the workflow. It's a good habit and the process must not get in the way, or you'll have non-consumption and people won't do it.
Here's more: https://news.ycombinator.com/item?id=26552842