Skip to content

Instantly share code, notes, and snippets.

@vishalbasra
Last active August 7, 2018 21:28
Show Gist options
  • Save vishalbasra/63de24dfb1013457c6ab60ef1c6c9a99 to your computer and use it in GitHub Desktop.
Save vishalbasra/63de24dfb1013457c6ab60ef1c6c9a99 to your computer and use it in GitHub Desktop.
My guideline of how to write and review code better

Good coding practices or review Guidelines


The goal for this is to make me write better readable code and to also make me a better reviewer


  • Does the brnach name, PR name makes sense?

  • Is the PR / branch linked to a ticket, is there a ticket?

  • Do the commit mesages make sense, will I be able to read my commit message a year later and understand why that commit was made?

  • Is this a feature / bugfix ? Is that documented well enough?

  • Does the code follow semantics guidelines - linting, best practices etc?

  • What does the code do - is it simple enought to read and understand?

  • Are we trying to follow naming convention throughout eg: a-b-c vs a.b.c etc, is that followed?

  • Are we being alphabetic / ascending where we can be? eg: Add 4 disks of 40,30,85 and 10 GB, it's better to add them in the ascending order. Same for the alphabetic order. Are we doing this where possible?

  • Do variable , function names etc make senes, are they readable, follow the same naming convention, order?

  • Is there a TODO or a NOTES thing?

  • Is the code testable, if not, can we make it testable? If yes, do the tests pass?

  • Are there any third-part dependencies?

  • Have any of the dependencies changes?

  • Is something cached that makes it look like the code is working but taking that away actually breaks things?

  • Can this break things?

  • Has this been tested in a throw-away / lower environment

  • What will this code affect, is it an entire environment? If so, can we limit it?

  • Does this warrant a business head's approval?

  • What's the worse that could happen?

  • What's teh best that could happen?

  • What's most likely to happen?

  • Analyze risk v/s the need to push this code

  • What's a good time to push this code?'

  • Who all need's to be informed about this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment