Code Reviews

Code Review Checklist

Code reviews are a very important part of the development process, in any environment. It is another safety net in ensuring a software deliverable of high quality. These are some points to keep in mind about code reviews. Take note of what needs to happen before, during and after a code review:
  1. Make sure that your code is self-explanatory and has adequate amount of code documentation and comments. These comments needs to describe the problem it is addressing in a clear and concise manner.
  2. Automated tests are good to test chunks of functionality. Include automated tests with your changes to make it easier to validate that your code works. In a SQL heavy environment, calling the different SP with specific input parameter values and inspecting the return result, or db stored result is a good midway point in testing the code.
  3. Your code should be sitting in source control.
  4. Before a code review commences:
    1. Set a date and time for the review to commence, and send out a meeting request - keep things professional.
    2. Have the IFS (i.e. other technical specification and business specification documents ready)
    3. Have test data ready to be processed by your code.
    4. Have sample input data ready to be processed by your code.
    5. Provide an overview of the problem statement to the code reviewer so that he/she understand what it is that your code is about
  5.  As the code review commences:
    1. Create a checklist of project-specific and programming language-specific things that you need to check during code reviews and use it for all reviews.
    2. Compare structural differences between what was previously in source control to the latest changes in source control
    3. Make sure that the fix or feature that the branch implements actually works (duh!).
  6. After the code review iteration is complete
    1. After the code review has successfully completed, ensure that the changeset (or tag) that has been approved is pushed to the QA environment for further integration testing.
The important thing to remember about code reviews is: if its your code being reviewed, you need to demonstrate your mastery on understanding the problem, and clearly communicating your knowledge of the problem over to the code reviewer.

Happy code reviewing :)

www.silvafox.co.za

Comments

Popular posts from this blog

Moving Data [Spark Streaming - simple data files]

Notepad++ Regular expressions

RSS feeds to your webpage [part 1]