This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Code Review Guidelines

 
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to write up some guidelines for a code review. (Most of the engineers at my company have only a general idea of what it is, but haven't done it.) Does anyone have any, or know of any online resources? (I'm googling now, but figured I'd ask for other versions as well.)
--Mark
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve McConnell's Code Complete has a nice dozen pages or so on reviews. He talks about the various roles, goals, etc.
Inspections are reviews that specifically look for bugs. The author distributes code to reviewers ahead of time, a moderator runs a review session where the author explains code (should not be necessary!) and answers questions, reviewers discuss findings and probably find more bugs together, management stays away. A scribe records findings and recommendations, the moderator assigns rework follows up to see that it is done. The book claims about a 20% productivity increase because people write better code when they know others will read it and because some bugs are actually found, but they might eat up 15% of a project's cost.
There are also "walk through" reviews for the purpose of knowledge transfer, where the author shows the rest of the team how some feature works.
And there is a practice of code reading. This tries to find bugs in individual reading and uses the meeting just to discuss findings. An inspection does more code review during the meeting. Distribute code to sevearl readers, meet to gather their findings.
Any of that help?
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any tool that can do automatic code review?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Is there any tool that can do automatic code review?


Sort of: PMD and Checkstyle
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to check jlint
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think code review can never be completely automated for all that it seeks to achieve, namely,
1. That there are no obvious bugs in logic
2. That there could perhaps be a better way of doing it
3. That it is simple and self-documentary enough for someone else to be able to change it
and lastly, that it makes all the reasonable assumptions and premises about the nature of the problem and all its "unknowns".
Frankly, any code review would be conducted (and structured) keeping in view how many of the above mentioned goals do you seek the review to achieve.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic