> But if the architecture is wrong, it's better to fix before than after.
Although this is true; if the manager is thinking about and getting involved in architecture after the PR is written it does suggest something has gone wrong. If there are architectural considerations then it is good to discuss them with the coder before they start developing.
PR review is a great time to pick up subtle bugs, do last-line sanity checks or get used to someone's style but if they are a bad arena for combating most code issues. If they are picking up design problems there is probably a process flaw to be corrected.
> if the manager is thinking about and getting involved in architecture after the PR is written it does suggest something has gone wrong. If there are architectural considerations then it is good to discuss them with the coder before they start developing.
That's the ideal yes. The problem with poor design/architecture is that it's never actually architected and designed. It just happens as part of a process where someone codes something without actually considering this to be a "design" (something that will affect future code, and solidify over time).
So the job of whoever it is (senior developer, manager, colleague, ...) is to point out the poor design. The hope then is that it can be fixed before it is merged AND that next time there will be no "accidental design".
This is one of the situations where the ideal is in pretty easy reach. 5 minute conversation when handing out tickets. "Hey [insert employee number here] - how are you thinking about doing this ticket?". Or check in with them during standup.
That one question and a few minutes will both save hours of time and get better quality work. Letting the dev put time into work that gets redesigned in the PR is questionable management. Not the end of the world if it happens every so often but it suggests a lack of context in the job. If there is time to redesign during the PR there was time to think through what was acceptable quality before the work started.
Although this is true; if the manager is thinking about and getting involved in architecture after the PR is written it does suggest something has gone wrong. If there are architectural considerations then it is good to discuss them with the coder before they start developing.
PR review is a great time to pick up subtle bugs, do last-line sanity checks or get used to someone's style but if they are a bad arena for combating most code issues. If they are picking up design problems there is probably a process flaw to be corrected.