Late Night Thoughts on Code Reviews

Understanding the “Why”

Continuous Integration and Diffs / Pull Requests

  1. Code is incorrect. Any regressions in the eye of an automated build/testing system should be resolved as part of the pull request event.
  2. Reduce distraction and unnecessary context switching for reviewers. There shouldn’t be a need to do this if your code isn’t correct anyway.

Reviewers play an important role in code gating and should be the last layer of defense.

Authors

Reviewers

  1. Were there added unit tests for the features in the pull request? Do they exercise important code paths and have reasonable code coverage?
  2. Did the necessary tests/builds passed? This can be a combination of unit/functional/smoke tests etc. If there are manual steps involved, is the author’s approach valid?
  3. Are there warning flags or weird edge cases that needs to be addressed at time of checkin?
  1. Is the code implemented correctly as specified in a design doc?
  2. Are there language specific gotchas that the author missed?
  3. If configuration files are updated, are the right files correctly modified in the right places? Some might have schema forms that need to be backwards compatible and unfortunately, might not be caught by automated tests. Do they look right to you?
  4. Did the author follow the agreed upon programming language style guidelines?
  5. Are there sufficient comments in “hard to parse” code segments? Are they verbose enough to understand without tracing through the implementation?

Conclusion

https://xkcd.com/1513/

--

--

--

Hacker. Aspiring tech entrepreneur. Passionate about technological advancements for the betterment of humanity. https://zhenghaotan.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Product Configuration in Odoo 13

Should I learn Python or Java in 2022 ?

AI sales team assistant for B2B Omnichannel (aka Sales Reps just hate to waste time filling in CRM)

Fire fighting, the Volatile playground

SQL BASICS: Aggregate Functions

ADLS 101 — Leverage your laziness into efficiency (2/6)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zheng Hao Tan

Zheng Hao Tan

Hacker. Aspiring tech entrepreneur. Passionate about technological advancements for the betterment of humanity. https://zhenghaotan.com

More from Medium

Tutorials: The Good, The Bad, & The Ugly.

Why I Didn’t Like Testing

Semantic Versioning: What The x.x.x Numbers Mean And Why They Are Important

The key 3 pieces of advice for anyone who wants to be a software developer