.. _code_review: ############ Code Reviews ############ Why code review =============== As professional developers, we need to always be learning and improving. Code review is one of the best tools for this. Code review is like having a personal tutor. Getting code ready for review ----------------------------- - First draft is messy - Refactor - Hope for no red marks, but expect they will be there - To get the most out of it, correct all that you can first - Code to review should be between 200 and 400 lines of code what to look for ---------------- - readability - 'pythonic' - tests - short functions/methods - anything not clear Types of code review -------------------- - in person - in-line comments - using tools https://en.wikipedia.org/wiki/List_of_tools_for_code_review When refactoring or doing code reviews in person ------------------------------------------------ If code is unclear: - write a comment explaining what the code is doing - work on making the code clearer - goal to make it clear enough to get rid of the comment(s)