Am I My Code? - this article explores some strategies for giving feedback when reviewing code.some articles on how to write good commit messages - first, second, third.Pull request templates make code review easier - introduction to pull request templates.A lot of the content was taken from there. Thoughtbot's Guide for Code-Review - straight to the point guidelines on code review.Talk - Implementing a Strong Code-Review culture - the talk that inspired this.Links from places on the Internet that helped write this: Pro tip: Keep your own checklist of things you look for in a code review as in. Things related to your area of expertiese.Does the code work? Does it perform its intended function, the logic is correct etc.don't add too many or hide dependencies, unable to initialize objects, test frameworks can use methods, do tests exist and are they comprehensive?) single responsibility principle, open/closed principle) ? Could the design of the solution be improved (e.g.Is there any redundant or duplicate code? Is the code as modular as possible?.Does it conform to the agreed coding conventions?.Are classes/files/methods becoming too large? Should they be split into smaller pieces?.Is all the code easily understood? Is code unnecessarily complex ?.Some suggestions of things to look for when reviewing code: Sign off on the pull request with a □ or "Ready to merge" comment.Seek to understand the author's perspective.("What do you think about using a custom validator here?") Offer alternative implementations, but assume the author already considered. In the meantime, let theĪuthor make the final decision on alternative implementations. If discussions turn too philosophical or academic, move the discussion offline.Identify ways to simplify the code while still solving the problem.Communicate which ideas you feel strongly about and those you don't.Understand why the code is necessary (bug, user experience, refactoring). If the tools don't provide good feedback, change the config or improve the tools. Don't focus on reviewing things that can be reviewed by tools (e.g. Review the right things, let tools to do the rest.Review at least part of the code, even if you can't do all of it.Set aside time throughout your day to coincide with breaks in order to not disrupt your flow. The effectiveness of code review drops after around an hour.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |