Checklists and team agreements for better productivity by barbajoe
posted on: Nov 26, 2024
TLDR: invest in your team (and yourself), and you all get faster
Productivity is something that I hear people talk about a lot, but few people seem to spend time investing in it, which is odd to me because I naturally want to find ways to automate boring tasks so that I can maximize the things I find fun! For example, I cannot tell you how much I do not want to ever be on a deployment call again. And there are so many tools to automate all of these tedious tasks! So, let's talk for a little while about how I've automated away the boring things.
Code reviews
I’ve read a lot of articles and listened to a lot of podcasts on how to do code reviews properly, and although paired programming solves a lot of its speed bumps, few companies will allow proper paired programming, so here’s what works for me.
First and foremost, you need to build a team agreement, probably several. I have a link below to my old team’s agreements. We agreed on general coding standards, testing, code reviews, and several other points. Without an agreement, every discussion risks becoming an argument and damaging team morale. But with an agreement that everyone has signed (or approved if you plop it into your repos), you all start at the same place and can quickly point back to.
After a team agreement, build a checklist. I have a link below to my old team’s checklist. We modified it roughly every quarter as we made discoveries. I was the original builder after reading The Checklist Manifesto, but we (including the UX designers) all made edits and improved it as time passed. I cannot tell you how much time this saved, but it was probably in the hundreds of hours.
Finally, a few tools that made our reviews easier.
Gitstream is a product by LinearB (of which I am a big fan). It can do quite a few things, but what we found most helpful is that it automatically assigned people to PRs based on who had most recently made edits and who had made the most edits to the updated code.
CodeRabbit is the only AI tool I recommend to everyone. It reviews PRs—that’s it. It is hyper-targeted and works shockingly well. Even GitHub Copolit, of which I’m a huge fan, I only recommend for senior engineers. It is too easy for juniors or mid-level engineers to use without question and accidentally introduce bugs.
Linters and formatters
I’m confident that all teams use linters and formatters already, so I’ll just say that I have found BiomeJS to be a better experience than Prettier (and ESLint). My team agreed with that, and we moved all of our products to BiomeJS and reduced the configuration code we needed to write by roughly 90%. And found more accessibility issues because BiomeJS “just works” without adding special rules for checking accessibility.
A quick aside: I don’t like git hooks (such as Husky) that block pushing to remote branches. I always have a check in the CI pipeline to ensure the rules are followed before merging to the main branch, but don’t keep people from pushing to remote; it’s counterproductive.
Testing
Every team I’ve worked on over the past ten years has had automated testing, but not many tested at every level. I’ve found that Vitest is roughly 10% faster than Jest (and Vite is 10x faster than Webpack in all my scenarios), so I use Vitest for my unit tests, Cypress for component testing, and Playwright for end-to-end testing. You can run all these in GitHub Actions; they’re relatively easy to set up.
Relating back to the idea of a team agreement and checklists, my previous team had an agreement to keep code coverage over 90%, and our PR checklist stated that all tests must pass. This kept us fast as no one ever worried about regressions due to all of our tests, and no one was tagged on PRs until the poster had ensured that they’d written and passed their tests.
Automated testing makes everything so much easier!
Publishing
Continuous deployments have been the industry standard for quite a while now, so I’ll skim over this one. I’ve found that using Netlify or Vercel covers over 90% of my use cases and saves me dozens of hours for every hour I put into them.
And don't forget that you can fully automate your packages! I have links below to my old team’s GitHub Action, which auto publishes its React Library, and another GitHub Action example, which publishes my personal design system’s Svelte library.
Yeah okay, but why again?
Productivity. Humans are naturally bad at things they find boring. The book Toyota Kata discusses this in depth. One chapter describes how they automate where they can while purposefully allowing for creativity in all production line jobs, which led to significantly fewer issues. Automating the boring things removes a speed bump in the development process, allowing the entire team to focus on the work they enjoy and ultimately produce more.
If you want a more productive team, ensure the smoothest development process possible. One component is removing speed bumps, which automation does. I’ve also alluded to allowing creativity as another component, but that’s a whole blog post I’ll leave for another time.
All this to say, remove those speed bumps! Automate!
Quick Links:
- My old team's checklists
- My old team's Team Agreements
- Netlify and Vercel
- Neo-react library publish script
- Svelte library publish script
- Automated code coverage badges
- BiomeJS
- CodeRabbit
- Gitstream (from LinearB)
- Husky (git hooks for JS)
- Toyota Kata
- Checklist Manifesto