I only do it if I suspect that the code will not work. Sometimes I can think of edge cases that I suspect are not covered; so I check out the code, add the edge case as a unit test, and if it fails I mention it in the code review for the other dev to add and fix. Other than that, no. I am reviewing the coding standard, architecture, and algorithms used. It's up to the dev to ensure that the code works and runs. The C…
Ask HN: Do you pull and run code as part of code review?
111–120 of 146 posts
Re: Ask HN: Do you pull and run code as part of code review?
#112Yes. 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?
To be fair, it's more like "what would you think a mechanic who doesn't verify that the mechanic who fixed the car didn't check it ran." If you can't trust the person who created the PR to have tried to compile the code... What are they even doing.
I'd say much of the value of a code review on senior devs is making sure that it's just all properly committed and nothing breaking.
Re: Ask HN: Do you pull and run code as part of code review?
#113If you are missing stuff like this, than yes. I'm surprised at the amount of time developers deliver something that doesn't even boot
Re: Ask HN: Do you pull and run code as part of code review?
#114Then we have preflight.com UI tests that run on those environments. Would love to tell you my experience.
Re: Ask HN: Do you pull and run code as part of code review?
#115I'm a senior frontend engineer doing a lot of code reviews and my team loves my MR (PR) submission standard: - 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…
Re: Ask HN: Do you pull and run code as part of code review?
#116Yes. 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?
Re: Ask HN: Do you pull and run code as part of code review?
#117No. That's the job of unit tests, integration tests and your CI/CD pipeline or alternatively the test environment (dev, staging, quality control, you name it...). Moreover, the person having written the code is supposed to have checked that it runs and meets business requirements - although the latter should be ultimately checked by your Product Owner or client.
Re: Ask HN: Do you pull and run code as part of code review?
#118- We are finding deficiencies in our testing/development methods. The more people have to test/run code the more we are able to find bottlenecks and eliminate them.
- Knowledge sharing. We found that team members had knowledge/tricks in their heads which are being shared more.
- The overall reliability of our systems(measured via SLOs) has greatly increased.
Re: Ask HN: Do you pull and run code as part of code review?
#119I'm a senior frontend engineer doing a lot of code reviews and my team loves my MR (PR) submission standard: - 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…
But you still have to test the actual functionality, don't you? What if the author makes a gif of clicking a button, but doesn't record if the browser back button still works? I'd think that for frontend, you'd have CI/CD pipeline that deploys the code into a staging server, where I can test it myself.
Re: Ask HN: Do you pull and run code as part of code review?
#120Most of the time I would expect the code to be already exercised by automated tests. Sometimes, if it adds a new feature or something 'interesting', I've checked it out locally to see what the user-facing behaviour is, but this is very rare.
Automated tests are very poor at capturing the nuance of user interaction, and I find that they frequently are not exhaustive or watching the video shows only a "happy path" and doesn't expose functional deficiencies in a feature. They show that a feature works, but not that it works correctly or especially not that it works _well_. For straightforward regressions and minor tweaks I am usually satisfied to see a vide…