code-review

Tool to aid Code Review

For our small team of 20 developers, we used do code review like: Make a label in svn and publish the label to the reviewers Reviewers checkout the code and add comments in line (with marker like: // REVIEWER_NAME::REVIEW COMMENT:) After all comments are in, reviewer checks in the code, preferably with new label. Developer checks the c...

What is your favorite Coding Guidelines Checklist?

What is your favorite Coding Guidelines Checklist? I don't think one list will satisfy everyone. So the "favorite" part :) I was about to ask for Embedded programming and C at first. But you can post your favorite in other languages / areas as well. ...

Online Peer Code Review?

For people who work on very small teams, or by themselves, or on teams where they are by far the best developer and have a need to learn from someone better than them, are there any online resources/methods for doing some sort of peer code review? I used to be pretty active in the online art community (specifically drawing anime) and th...

RhinoMocks: How do you properly mock an IEnumerable<T>?

I just keep stumbling through mocking... The latest disaster was not grokking that I need to actually push results inside a mock object of IEnumerable... Here's a sample (demonstration only of IEnumerable, not actually good Interaction-based testing!): using System; using System.Collections.Generic; using Rhino.Mocks; using MbUnit.Fra...

Geographically Distributed Development

My company is using me as a sort of guinea pig for having developers on both sides of the US. The main office is located in Denver, and I'm in Louisville, KY. I've been trying to come up with ideas to make the remote development experience line up better with the experience in the main office. It obviously will never line up perfectly, b...

Code Review vs. Check In often?

Following Jeff's article about checking in often, some commenters couldn't resist spewing "Welcome to obvious land!" kind of comments. That's understandable, in most situation it's obvious that checking in as soon as something is finished before proceeding to the next feature is the way to go. But what about places with strongly enforce...

Should you bug the code used in code reviews?

After reading this blog post, I'm thinking that it might be a good idea...occasionally. the neurotic paranoid in me began to wonder how close of an eye they were putting on my code. Especially after a few times where I noticed bugs right before I checked in the supposedly reviewed code. So I came up the concept of Jeste...

How do you make wrong code look wrong? What patterns do you use to avoid semantic errors?

Ever since I first made the mistake of doing an assignment in an if I've always written my ifs like this: if (CONST == variable) { to avoid the common (at least for me) mistake of doing this: if (variable = CONST) { //WRONG, assigning 0 to variable And since I read Joel Spolsky's essay Making Wrong Code Look Wrong I've been trying ...

How to bring a new hire up to speed on an existing project?

My boss hired a new dev right out of CompSci onto a project with a fair amount of technical debt. It will be my task to get this guy up to speed and making a decent contribution ASAP. Any suggestions on how best to do this? Any first hand experience on how precisely not to do it? My instincts are to do some code reviews on code written ...

How can I introduce code reviews to my group/company?

I work for the company's research team, which is pretty selective in hiring. Having said that, we all tend to work on different projects, so it is very easy to cut corners because no one is watching. I know that I have done it when time crunched. Every now and then, I have to work on someone else's project. Whenever this happens, I...

When is the most effective time to do code reviews?

In the process of adding a new feature, when should you review the code? If you leave it until the code is complete, arguably a lot of time could already have been wasted going in the wrong direction. Too early and the ideas are only half formed. So where is the sweet spot and how do you decide? ...

Code Review Collaboration

My teams develop in C# and Java using Perforce for source control. Our two teams are spread out geographically and we are wanting to implement code reviews accross those teams. I have been looking for a tool to assist us with these reviews and I have narrowed my search to SmartBear's Code Collaborator and Cenqua's Crucible. Can anyone p...

Who, what, when, where, and why should you codereview?

Who should be reviewed? Who should do the reviewing? What code should be reviewed? (all code? Big changes? Etc) Where should the review take place? (Does it have to take place in person?) When should reviews take place? (Incrementally? Before check-ins?) Why should code be reviewed? I have some opinions about this bu...

CodeReview: Tiny Encryption Algorithm for arbitrary sized data

The TEA is a very simple encryption algorithm requiring little time and space - perfect for embedded systems. There are extensions to it, and every version has its flaws (WEP was based on it), but for casual protection it's perfect. In the vein of this topic on code review, I'm posting my code for critique. Interestingly, when I decid...

What is static code analysis?

There are many options for static analysis, and it's a hot topic, so: What is static analysis? When should you use it, and when shouldn't it be used? What are potential gotchas regarding proper and improper usage/application of static analysis? Any languages that don't have a good static analysis tool, and what do you do when you don...

Best tools for code reviews

It has been well established that code reviews are good, so this question is purely about the mechanics. For a dev environment centered around Visual Studio and Subversion what are the best tools for handling code reviews? We currently use TortoiseSVN as the Subversion client. so accessing diffs, logs, etc. is fairly straight forward...

What is Dynamic Code Analysis?

What is Dynamic Code Analysis? How is it different from Static Code Analysis (ie, what can it catch that can't be caught in static)? I've heard of bounds checking and memory analysis - what are these? What other things are checked using dynamic analysis? ...

Code Walkthrough vs. Code Review

How many of you use walkthroughs instead of reviews? Or in conjunction with Reviews? Or only use walkthroughs? Are Walkthroughs beneficial and how have you all implemented code walkthroughs? ...

In a Scrum project, should testing and peer reviews be worked into each sprint as individual tasks?

This seems to be a point of contention where I work. Some complain about the lack of verification structure in Scrum projects, while Scrum purists say it's not what Scrum is about. Both sides bring up great points, but I would like to see what people outside my circle say about the subject. What are your thoughts? Why? ...

Is there a code review tool with Word like annotation functionality and TFS integration?

I'm looking for a code review tool that has something like Word's review tools. I would like the ability to add a note in the side bar that references a specific block of code as well as to have portions of the code that are changed tracked so that someone else can open the file later and accept/reject the changes. If it were integrate...