How common is it to code review like this?
How common is it to code review like this?
For non-trivial reviews, when there are files with several changes, I tend to do the following in Git:
- Create local branch for the pr to review
- Squash if necessary to get everything in the one commit
- Soft reset, so all the changes are modifications in the working tree
- Go thru the modificiations "in situ" so to speak, so I get the entire context, with changes marked in the IDE, instead of just a few lines on either side.
Just curious if this is "a bit weird", or something others do as well?
(ed: as others mentioned, a squash-merge and reset, or reset back without squashing, is the same, so step 2 isn't necessary:))
As a senior dev, I've found "can the junior devs grok wtf I did/made" to be an excellent "did I overengineer?" Litmus test.
A good implementation should be not too hard to explain to the juniors, and they should be able to "get it" in a single short 20-30 minute meeting at most.
If they are curious/interested and ask questions, that's a good sign I made something useful and worthwhile.
If I get a lot of "I'm not sure I get it" and blank stares, I probably have overcomplicated the solution.
If that "ooooh, okay!" Comes quickly, then we are good!
If you need a whole meeting to explain what's going on in your PR then it's already too complicated, IMO. That explanation should be done as a combination of PR description, commit messages, documentation, comments, and the code itself.
Everyone will forget a meeting. The stuff I described will pay dividends for future maintainers.
The meetings should happen at design and planning phase.
Do you not do demo meetings after introducing entirely new features?
Sometimes a PR can be quite large as it involves an entirely brand new feature that simply didn't exist before.
And if it's an internal tool/service for fellow devs to use to make their lives easier, yes, it likely deserves a meeting so the devs can have a chance to QnA about it. Usually 5-10 minutes going over the who/what/why/where/how, then 20 mins or whatever of any needed QnA if devs are curious for more info about specifics, like performance or extensibility or etc.
If you create a new tool like that abd then just hand it off with all the devs have to go on being "here's the manual, figure it out" you know what happens?
Almost no one reads it, and pretty much no one uses it, because parsing a giant manual of info is difficult co.pared to seeing a live demo