2 ms·
Ah, I worked in a place like this. We had a lightweight Fagan inspection process (with 4 roles and all that stuff) and some scripts we wrote to ensure each comm
by theamk 4y ago
Ah, I worked in a place like this. We had a lightweight Fagan inspection process (with 4 roles and all that stuff) and some scripts we wrote to ensure each commit was either reviewed or explicitly skipped.
It was OK - definitely better than nothing, but with its own problems. Biggest defects were the worst - lets say someone made a new library function and inspection found out that function should not exist at all. By the time it's time to make a fix, code might already be used. The latency was not so great -- to save time, we often requested a review of entire patch series so the time from the first commit to the first comment was pretty long.
Later on for business reasons we had to stop working on that codebase and start all new code from scratch. Everyone on the team voted to switch to "pull review + code review before commit" and we never looked back.
Thinking back about this, the main reason to use post-inspection was that the tooling sucked. Back then we had SVN and branches were super heavy, the easiest way to share code was to email files around, and combining yours and someone else's unpublished changed was arcane process which could easily lead to data loss. Additionally, all sort of tooling, like advanced tests and staging environment required code on master. So making merge quick and easy was the only solution.
Luckily by the time we started again git was around (but not github, and we self-hosted everything anyway), so we improved the tooling itself. Turns out having lightweight branches is great! And being able to tell a colleague "PTAL at my branch" is also great! And we improved tooling so we could push any branch to staging or run extended tests on any commit! And we can review the code and fix it before having entire company use it! So the fact that a PR might take a day or two to land was not a big deal at all.
If you are still on the post-commit reviews, take a look at your processes. The new features are great, and you might be missing out on them.
(This assumes a medium sized team. If it's just 2 people working on a codebase, the benefits are much less and costs are relatively bigger)