Tag Info

New answers tagged

1

I'd like to add two areas not covered by the other great answers: One great reason for code reviews is the Hawthorne effect which in our case translates to: If you know someone is going to look at your code afterwards then you are far more likely to write it better in the first place. Another great reason is for better secure development practices. One ...


4

The most valuable thing I personally get from a code review is confidence that the code is clear to another person. Are variables clearly named? Is the purpose of each chunk of code reasonably obvious? Is anything ambiguous clarified with a comment? Are edge cases and valid values for parameters outlined in comments and checked-for in code?


36

Code Reviews are a tool for knowledge transfer. When developers review each other's code, they gain familiarity across all areas of the system. This reduces a project's bus factor, and makes developers more efficient when having to do maintenance on a part of the system they didn't write. When a junior programmer reviews a senior's code, the junior ...


55

There are multiple reasons why you would want to conduct a code review: Education of other developers. Ensure that everyone sees the modification associated with a defect fix or enhancement so that they can understand the rest of the software. This is especially useful when people are working on components that need to be integrated or on complex systems ...


3

Code reviews can be immensely helpful in identifying potential bugs and making sure that developers adhere to company coding standards. However, it's important to have clear guidelines about what is and is not up for review. A written coding standard—accessible via a web browser—is a must, in my opinion. And everyone on the team should be given a chance to ...


0

It depends. Personally, I like having tasks for code review work since it allows those things to be estimated properly. It also creates a tracking item that clearly shows if/when it gets done. And it lets you explicitly assign someone to do the code review, and keep that work balanced. But I am also of the opinion that not all work needs code reviews, and ...


0

Before adding new states of any kind, I recommend considering what you'll use that state for. If there is some metric you're trying to track like cycle time in that state, then it might be beneficial. Otherwise, what's wrong with including code reviews in your definition of done? I don't see the need to add additional complexity to your process just for ...


1

We have used both. When you have a seperate review task you can assign time to that task and it is visible for everybody. But you get a lot of tasks on the board. We use a whiteboard with post-its so real estate is limited, being somewhat of a disadvantage. At the moment we use a seperate state for review. This is less of a hassle when updating for a new ...


13

Reviews are part of the work that needs to be done to bring a task to completion, just like implementation and testing. For that reason, the review effort should be included in the estimation for the task. As you already have different states for implementation and testing, it makes sense to add an additional state to indicate that the code for a task is ...


4

I don't have both sides of the story, but if what you are saying is accurate and unbiased and this has been done out of revenge, you should be escalating this to your manager. This kind of passive aggressive behavior has no place in the workplace.


0

The point is that you need to use an automated tool which enforces style on every commit. The applies to both examples from your question. In .NET, the first piece of code will be enforced by StyleCop, while the second one—by Code analysis (for inspiration, see CA1820). The goal of having a style guide is to: Enforce uniform style in order to make the ...


0

I think the code style works the other way -- it helps reviewer understand the code easier, save their time, and helps maintenance in the future. Also, reviewers shouldn't force others to use a code style, but they should point things out if that gonna cause some trouble (especially seniors). Automatic style tool should be ok but also should be optional ...


6

Use a linter or some program or tool that automatically enforces style. That should alleviate the objections about it taking too much time. Most of the objections have to do with "I'm uncomfortable with that style." It doesn't matter. Coding conventions are all about uniformity. Enforcing that uniformity will make code reviews easier by eliminating ...



Top 50 recent answers are included