Ask HN: Do you pull and run code as part of code review?
21–30 of 146 posts
Re: Ask HN: Do you pull and run code as part of code review?
#22I wish there was a better workflow for this. We have code across ~10 repos at work, and I'm usually working on something else. So checking out somebody's code for pull requests is pretty disruptive. We generally consider "that the code runs" not to be part of code review, and have a separate testing phase before codes goes into production. Which works, but it definitely could be a smoother process.
Re: Ask HN: Do you pull and run code as part of code review?
#23Re: Ask HN: Do you pull and run code as part of code review?
#24I wish there was a better workflow for this. We have code across ~10 repos at work, and I'm usually working on something else. So checking out somebody's code for pull requests is pretty disruptive. We generally consider "that the code runs" not to be part of code review, and have a separate testing phase before codes goes into production. Which works, but it definitely could be a smoother process.
Re: Ask HN: Do you pull and run code as part of code review?
#25- Require the author to attach screenshots of the feature in a markdown table format showing the before and after comparison. This is enforced using a MR template.
- Require the author to attach screen recording for complex user interactions.
Overall effect is that it saves everyone's time.
- The author has to verify that the feature works anyway, so taking screenshots / recordings doesn't take much addtional efforts.
- The reviewer can focus on code itself instead of checking whether the code works.
- Easy for both parties to spot design and UX issues/regressions visually.
Re: Ask HN: Do you pull and run code as part of code review?
#26Re: Ask HN: Do you pull and run code as part of code review?
#27In my previous team, the reviewer was the main responsible for the code they were approving. They were expected to test locally and should actively hunt for potential issues, such as checking in the logs that the ORM was building correct SQL.
In my current team, the developer is the main responsible for the code they're pushing, and is expected to do all the tests needed. Reviews are more about ensuring code standards, finding possible oversights, requirements mismatches, and so on.
No one strategy is right or wrong, as long as expectations are set and everyone knows their responsibilities and expectations.
Re: Ask HN: Do you pull and run code as part of code review?
#28Re: Ask HN: Do you pull and run code as part of code review?
#29Yes. I didn't used to, but that was a very big mistake. Just wait until something you signed off on doesn't run and folks ask, "But didn't you review this code and say that everything 'looked good'? It doesn't even run!" It's embarrassing to say the least. If you're doing a code review, run the darn code. What would you think of a mechanic who didn't make sure the car was able to turn on after claiming it was fixed?
If someone pushes a change without anyone reviewing it, I sometimes find their fear of making a mistake causes them to scrutinize the change more than if it had been reviewed. Not always of course, depends on the context and people involved.