Code review notes

learning the ropes

As always there is a TLDR section highlighted in bold.
These are just my personal notes and some tips and tricks I have picked up from my peers in my current job and naturally very open to any feedback on my topics I post.

Code Reviews


Now, I would normally use the prettier formatter to organize my code, but at my job I was advised not to do that due to some of the code being in a layout that is easier to read and work with. My auto formatter happens to mess it up, so I started to check my code format by eye, which is far from efficient and takes a bit of time ..sometimes. I just felt I had to share why I cannot just use a auto formatter.

Check list

TLDR

  • Use your editor search for console logs and remove ’em
  • Also removed unused code/imports to your project
  • use ESLint and make sure it passes (this is my next post trying to set it up now)
  • Run your unit tests, I’ve had my review approved and be denied by unit tests failing
  • Important make sure your naming conventions make sense so other developers can follow
  • Personally I think it is perfectly fine to leave commented notes on certain methods that are helpful! Such as // This section cleans up the goods and returns so and so
  • Create the PR ( Peer Review/ Merge Request..etc) and go through the comparison. The layout shows exactly where changes have been made and I tend to catch a lot of my syntactical errors at this point.

That’s all I have for now, these tips came from my colleagues and also through my own experiences. Checking is good but checking only once is even better.
Good luck and I hope to hear some comments on this one.