Development: Code Review

From LinuxTVWiki
Revision as of 02:22, 19 September 2009 by CityK (talk | contribs) (some reworking, removed a link)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

We define a "code reviewer" as somebody who carefully looks over submitted source code, checking it for correctness and considers areas in which it could potentially be optimized, and then reports or provides such feedback to the original authour.

Why have a Code Review?

Nobody is perfect; we are all human and, hence, despite even the most rigorous attempts not to, we can potentially err somewhere along the way. In development, it is often the case that an unrecognized bug makes its way into the code, and then remains latent until it manifests itself in some more obvious way and, only after which, its presence is finally realized (i.e an end user encounters and reports an error that is ultimately traced as to being derived from a bug that has been present in the code all along). The only way to make the Linux v4l-dvb code as stable and robust as possible is, in by itself, by having as many developers as possible analyze the source code, watching out for potential bugs and weaknesses.

When should you have a Code Review?

Consequently, having a code review is an integral part of the process for new driver and patch submissions to the V4L-DVB code base.

Similar Concepts to a Code Review

When you get a good idea on how to improve the existing code base, such as by introducing performance optimisations, or wish to introduce something entirely new to its feature set, please start a RFC (review for consideration) thread on the Linux-Media Mailing List (like this, for example) and let's discuss this/these idea(s).

Also note that when you encounter a point where you see that it would make much more sense to completely rewrite portions of the V4L-DVB source code, you are now dealing with the much deeper process of refactoring; please have a look at the "Hints for Refactoring Existing drivers" article for more information.