by chadaustin · 11y ago · 0 comments
I'm not strictly opposed to pre-commit reviews, but I think it's incorrect to be dismissive of their cost.
My last job was perforce (no unsubmitted commit stacking) with everyone developing directly against a single branch. In theory, code reviews were supposed to happen before hand.
In practice, I submitted small changes from the hip, and complained when my coworkers gave me a week long spitball of unrelated features in a single mega-commit. Not that I wasn't guilty of that myself. Bleh.
- def f(x: X): Option[X]
+ def f(x: X): MyErrorType \/ X
This is not a small change, most users of f now need to be changed as well.Some changes simply cannot be broken into tiny atomic pieces. Often these are important changes for long term maintainability.
If the pull request is small, fixes a bug or is a blocking you, then you can spend you quick-code-review-chip for the week and ask the team to look at it at their first available opportunity. (Sometimes reviewed within 15 minutes, usually an hour tops)
It allows team members to ask the rest of the team to unblock them quickly. Limiting it to one a week prevents abuse of their team mates' time and encourages all team members to plan their work out ahead as to reduce blocking.
We also wrote a quick HipChat bot that keeps track of who's spent their quick-review-chip too.
Ordinarily this final merge is fairly painless, since you ideally won't have many code reviews that call for sweeping changes in your design. If you do, that's a sign of failure earlier in the process.