How To Review A Code In Better Way

Submitted by: 
Visitors have accessed this post 552 times.

In programming world, when one code is written by a programmer, it is then reviewed by another programmer to find any bugs. This practice ensures that the ethical coding standards are used while writing a program and there is nothing wrong with the end product. However, many programmers find it difficult to review codes and that is because, they don’t have any set standards.

We will give you a brief overview about how to review a code properly and what things should be considered.

Functionality

Review programmer should analyze if the software is acting as expected. Can it perform all the task it claims to perform? Can a better algorithm be used to design the same code?

Coding standards

Has the programmer followed the standards set by the organization and the industry? If anything is wrong with code standards, it should be rectified.

Bugs

When a code is written, it can contain a lot of bugs. It may perform certain functions that it was not designed to perform in the first place. Such bugs should be found and killed during review process.

Documentation

Everything in the coding should be self-explanatory. If there is something that cannot be understood, it should be explained by the programmer and if he cannot come with satisfactory explanation, the code should be discarded.

Process

When you are performing a code review for another programmer, make sure that you follow the standards as well.

If you think a code could have been written in a better way, quote an example in front of programmer so he can also learn from your experience. A reviewer should also be able to demonstrate different examples as well.

Make sure you understand the thinking of a programmer. A code is not just a piece of strings and syntaxes but it is actually what the programmer is thinking. Having better understanding about the thinking of programmer will help you review it in a better way too.


Comments

I don't know if there's really coding standards. Maybe, Programmer's standard. If his work becomes popular then it becomes a standard. If there's really a standard, even a company doesn't follow it. They make their own.

Problems that I see here why programmers find it difficult to review codes...

* Most programmers learned by themselves - A different approach/method can be developed in a code.

* There are different programming languages - If a programmer has an expertise and shifts to another language due to requirements, a similar approach/method may be applied to a code.

* Closed source - It is hard to review a source code which is closed or a programmer hides something :)

* Coding style - another problem that I see here, when you review the code it can be/have the following:
- a copy/paste code
- IDE dependent
- spaghetti code
- coding conventions

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.