Though sometimes I'll check out their branch, open up a repl and run a few functions or something on my own.
Ask HN: Do you pull and run code as part of code review?
11–20 of 146 posts
Re: Ask HN: Do you pull and run code as part of code review?
#12Yes. 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 you can't trust the person who created the PR to have tried to compile the code... What are they even doing.
Re: Ask HN: Do you pull and run code as part of code review?
#13Code compilation (and checks) & tests must be requirement as part of each PR
Re: Ask HN: Do you pull and run code as part of code review?
#14Re: Ask HN: Do you pull and run code as part of code review?
#15Bugs introduced will be caught and fixed in general testing usually.
Re: Ask HN: Do you pull and run code as part of code review?
#16Re: Ask HN: Do you pull and run code as part of code review?
#17Re: Ask HN: Do you pull and run code as part of code review?
#18I should probably learn from him.
Re: Ask HN: Do you pull and run code as part of code review?
#19Yes. 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?
As a reviewer (in the places I've worked so far) for me it depends what type of change it is. E.g., for a frontend change I might need to run it to be able to actually try it out and check what it looks like, whereas for a backend change I might rely more on reviewing the tests and if the tests look good then I probably wouldn't bother running locally to poke at the thing myself. Of course there are also just general issues of how big and how complicated the change is.
Anyway, wherever possible mechanical stuff like "does it build and run" should be covered by a CI system or other automation, not by spending reviewer time on it.
Re: Ask HN: Do you pull and run code as part of code review?
#20If it's something simple I can grok by reading the code and tests I usually don't.
If it's a complex piece of code, I find it valuable to run it locally, to setup some breakpoints, debug it and step it to understand it better.