203
Your Engineers Aren't Lazy, Your Codebase Is Punishing Them
(piechowski.io)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I find most bad codebases exist because of a culture that isn't focused on quality, and I'm not talking about bug counts or code coverage. Clean codebases stay clean by being proactive about keeping them clean. This should include meticulous peer reviews, establishing design patterns, enforcing best practices, and taking initiative to leave things better than you found them (we used to call that boy scouting).
If your teams PR comments only contain LGTM, and the average time spent reviewing them is 5 minutes, your team isn't focused on quality. If a PR contains more files than an average person can keep in their mental context window, it won't get the attention it needs to be properly reviewed. If there is no accountability to keep a clean codebase, you'll end up with 2 hours of work taking 5 days to complete.
The signal-to-noise ratio of reviews is nearly zero in my experience. It’s for the least productive people on the team to argue about spaces or gotos or grind other ideological axes.
I find PRs really dumb things down, but not in a way that makes code more understandable. And it certainly doesn’t improve quality.
A good alternative is code presentations.
You present your changes to a group of engineers. Then discuss it.
Yes, it happens too often. That’s a failure of leadership or a social problem.
Techies often try and fix human and social issues with technology, but that doesn’t always work.
Code review helps spread knowledge about the code base through the team. Without it, you easily end up with disjointed fiefdoms ruled by petty code lords that don’t share information.
Spreading knowledge and context sharing are exactly why I like code reviews. It should also be something done by more than one person so that information is better disseminated throughout the team.
Code presentations are great for that.
One or two people present their code before the merge. Others watch, ask questions, etc. Small changes and improvements can be done immediately. Ideally the change is merged after the presentation. It can speed up things immensely and more people feel ownership. If a simple ticket stays in review for a week, it can be very detrimental.