Simple Code Reviews Using Eclipse

Performing regular code reviews can be a real benefit to small and large development teams for several reasons. First, you can spot coding defects and logical errors before QA finds them. You'll have a much easier (and quicker) time fixing a defect found via a code review than through testing. Second, it's everyone's opportunity to check that the new code meets whatever coding standards or naming conventions you've set for the team or project. Finally, there's no easier way to rapidly educate the other developers on your code changes especially if you add some simple comments.

Code reviews don't have to be laborious or require meetings. I use Eclipse/CVS to help me with this task. Here is the basic process.

On checking in code

  1. Use Eclipse's Change Sets to define small atomic units of change. Try to keep the units small, but not meticulously small.
  2. Write good check in comments. Ideally, develop a standard on what goes into these comments.
To do the code review

  1. Open eclipse's snchronize view.
  2. Click synchronize to see the files that changed.
  3. Enable Change sets and view the authors/comments of the checked in code.
  4. Clicking on an individual file will open eclipse's diff tool. From there, you can now see all the code segements that were modified.

That's pretty much it. It's not fancy, but it works!

2 comments:

  1. One part of code review is giving the feedback.

    Would be great if you are willing to share how you do that.

    ReplyDelete
  2. I rarely find code reviews useful and the only one I consider beneficial are informal one, but I do prefer paring with teammates. The formal review tends to focus on a stuff, that can could be done automatically with a continuous integration, the same applies to coding standard. Much better, faster and cheaper :D

    ReplyDelete

Comments on this blog are moderated and we do not accept comments that have links to other websites.

Share

About Isaac Sacolick

Isaac Sacolick is President of StarCIO, a technology leadership company that guides organizations on building digital transformation core competencies. He is the author of Digital Trailblazer and the Amazon bestseller Driving Digital and speaks about agile planning, devops, data science, product management, and other digital transformation best practices. Sacolick is a recognized top social CIO, a digital transformation influencer, and has over 900 articles published at InfoWorld, CIO.com, his blog Social, Agile, and Transformation, and other sites. You can find him sharing new insights @NYIke on Twitter, his Driving Digital Standup YouTube channel, or during the Coffee with Digital Trailblazers.