Using Integration for Code Reviews

FogBugz's source code control integration makes it trivial for you to set up code reviews, which are an incredibly powerful tool for shipping high-quality software. The point of code reviews is to make sure that all source code gets checked for errors by another developer before it's checked into the master build. Some teams implement code reviews with a formal checklist of defects to watch out for. Others take a more informal approach, often having a senior developer read over code from junior developers. In any case, this technique has been proven to lead to higher-quality code and better developers, so it's certainly worth considering in your own organization.

With FogBugz integrated to a source code control system, a code review process might look like this:

1. Karen Benson, one of MegaUtilities' QA staff, is testing out the latest build of Service Monitor. She discovers that installing the software, uninstalling it, and then reinstalling it brings up the login information from the first installation: a potential security issue. She enters a bug, which FogBugz automatically assigns to the project lead, Valerie Shriver.

2. Valerie looks over the bug and decides that it's a setup issue. She assigns it to Paige Nagel, who's handling the installer coding.

3. Paige inspects the code and realizes that some registry keys aren't getting properly deleted on uninstall. She checks the appropriate source files out of the corporate source code control system and fixes the bug.

4. Paige checks the files back into the Development branch in the source code control system. When she does this, she includes a specially formatted comment with the case ID in her check-in comments. The source code control system notifies FogBugz of the check-in.

5. Paige assigns the bug back to Valerie, with a note that the fix is ready for code review.

6. Valerie opens the case. Because of the notification from the source code control system, FogBugz displays hyperlinks to the changed code right in the case itself. She clicks the links for the latest version of each file involved to see color-coded diffs, highlighting just the code that Paige changed. If Valerie needs more detail, she can drill into the entire history of any of the source files without leaving the FogBugz interface.

7. Satisfied with the code review, Valerie assigns the bug back to Paige with a note that the check-in is approved.

8. Paige marks the bug as resolved, and merges the changed code from the Development branch to the Release branch.

9. FogBugz assigns the bug back to Karen, who checks to make sure the fix is good and then marks the bug as closed.

Integration is also useful in the other direction, when you're working with source code control. Suppose you've just refreshed your local copy of a project with the latest shared source, and you can't figure out the point of a particular change in the code. Go to your source code control interface, locate the link back to FogBugz, and you can jump right to the case that was the reason for the change.

0 0

Post a comment