This tag is for questions about the practice of code review and code walkthroughs. For reviews of existing, working code, please see http://codereview.stackexchange.com

learn more… | top users | synonyms (1)

66
votes
14answers
4k views

How can I tactfully suggest improvements to others' badly designed code during review?

I'm a great believer in clean code and code craftsmanship, though I'm currently at a job where this isn't regarded as a top priority. I sometimes find myself in a situation where a peer's code is ...
121
votes
34answers
4k views

How do you make people accept code review? [duplicate]

All programmers have their style of programming. But some of the styles are let’s say... let’s not say. So you have code review to try to impose certain rules for good design and good programming ...
154
votes
19answers
12k views

How do I review my own code? [on hold]

I'm working on a project solo and have to maintain my own code. Usually code review is done not by the code author, so the reviewer can look at the code with the fresh eyes — however, I don't have ...
46
votes
14answers
3k views

What's the most effective way to perform code reviews?

I've never found the ideal way to perform code reviews and yet often my customers require them. Each customer seems to do them in a different way and I've never felt satisfied in any of them. What ...
20
votes
8answers
2k views

How should code reviews be Carried Out? [duplicate]

My previous question has to do with how to advance code reviews among the developers. Here I am interested in how a code review session should be carried out, so that both the reviewer and reviewed ...
7
votes
9answers
1k views

What is the way to understand someone else's giant uncommented spaghetti code? [duplicate]

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? I have been recently handled a giant multithreaded program with no comments and have been asked to understand ...
18
votes
5answers
910 views

What does a standard code review contain?

In my company, it's an email discussion of what feature is implemented and what kind of bug is fixed sent by the one who write the code. And the reviewer, who receives the mail, will review the code ...
6
votes
7answers
978 views

How to get developers to do code reviews in a timely manner

The company I work for requires all code to be reviewed by other developers before it is committed. The members of my team are often frustrated because the other developers are too busy coding to do ...
13
votes
5answers
1k views

How do I choose what code to review?

I am part of a team of seven developers in a small software company and I am trying to introduce regular group code and design reviews. We have carried out some reviews in the past, but it has been ...
7
votes
0answers
681 views

Website for code review [duplicate]

I know that we all are trying to improve our structure and style of our code, striving to be truly agile. Websites like Stack Overflow are great when you want an answer to a specific question but ...
50
votes
17answers
2k views

Is a code review subjective or objective (quantifiable)?

I am putting together some guidelines for code reviews. We do not have one formal process yet and are trying to formalize it. And our team is geographically distributed. We are using TFS for source ...
18
votes
3answers
889 views

Starting Up Code Review Process Where there Previously Was None?

Any tips for a group needing to start code reviews? We have no real software engineering processes currently. I have been working as software engineer for 7 years and have never seen any real ...
71
votes
20answers
12k views

How important is it to reduce the number of lines in code?

I am a Software developer who works on J2SE (core java). Often during our code reviews we are asked to reduce the number of lines in our code. It's not about removing redundant code, it's about ...
75
votes
21answers
8k views

How would you react if someone told you your code is a mess?

I am a good programmer, or so I thought before. I always love to program. And I want to learn many things about programming to make me a better programmer. I studied programming for 1 year and now I ...
50
votes
16answers
7k views

Review before or after code commit, which is better?

Traditionally we performed code review before commit, I had an argument with my colleague today, who preferred code review after commit. First, here's some background, We have some experienced ...
35
votes
11answers
4k views

What does a code review look like? [duplicate]

I'm writing a code review process document for our team; we've never had a formal process in place although we do do some code review. I've found lots of articles talking about how important code ...
83
votes
7answers
10k views

How to reject a code review that you believe is unnecessary?

I am in a position where I have been asked to review some code that fixes a problem that I don't believe exists. The fixer, who is more senior than me, insists his fix is necessary but it appears ...
26
votes
17answers
2k views

What's a good, concise way to explain the dangers of copy-paste programming to non-programmers? [closed]

I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the ...
25
votes
5answers
785 views

Place to have my code reviewed by others [closed]

I am looking for a website where I can post code snippets and have them commented/reviewed by others. Does such a site exit?
31
votes
12answers
2k views

Is code reviewing good practice?

When the company I work in hired new managers, they offered us to overview someone's code on every meeting. We have meetings every two weeks, so each time one of developers was to show his/her code on ...
20
votes
11answers
3k views

Should your best programmers have to check everyone else's code into source control?

One of the differences between svn and git is the ability to control access to the repository. It's hard to compare the two because there is a difference of perspective about who should be allowed to ...
16
votes
12answers
2k views

Should we attempt to review all our code?

We're currently modifying out development process and I'm wandering if we should try to keep a 100% of our commits peer reviewed. What is your experience regarding code reviews? Do you tend to ...
6
votes
3answers
553 views

Why it is not recommended to have set-only property?

Today at work one of my colleague reviewed my code, and suggested me to remove set-only property and use method insted. As we both were busy with other stuffs, he told me to look at Property Design ...
5
votes
5answers
653 views

trust factor in code review

How much should a reviewer trust the coder who submits the code for review? I always have that dilemma of whether I should go test of the changes proposed or should I trust the submitter that he ...
5
votes
7answers
1k views

How to avoid typo errors, etc?

For the first time I have been coding for an open-source software where all my work gets reviewed before being commited. I understand reviewing work isn't an easy task, so I don't like to waste ...
12
votes
6answers
1k views

Why should I write all the Statements within Try-Catch?

My company head says that I must write all , i.e. ALL my code within Try-catch statements. Now, I can understand the 'better be safe than sorry' approach here, but isn't it too chicken-hearted to ...
9
votes
7answers
5k views

What is the difference between Static code analysis and code review?

I just wanted to know what the difference is between static code analysis and code review. How are each of these two done? More specifically, what are the tools available today for code review/static ...
5
votes
1answer
791 views

Code review approaches [closed]

Just going out on a limb here. Is doing a code review by sampling a few classes and units of code by a developer good enough to judge what he has done wrong to provide inputs? This is just in case you ...
3
votes
3answers
185 views

What can I do to let our team have code reviews of branch merges having hundreds of screens worth of Github diffs?

"Code review" (aka "peer review") seems like a really great idea, so my team started practicing it. For a little while it worked well, but then a co-worker merged a branch in, and asked for a review ...
20
votes
9answers
896 views

Tips on persuading boss that code review is a good thing

Let's say one works in a hypothetical company that has several developers that rarely worked together on projects and the Boss didn't believe that code reviews are worth the time and cost. What are ...
19
votes
11answers
3k views

How to review code that you do not understand?

I have been given the role to improve development in our company. The first thing I wanted to start was code reviews since that has never been done here before. There are 3 programmers in our ...
15
votes
4answers
749 views

Advancing Code Review and Unit Testing Practice

As a team lead managing a group of developers with no experience ( and see no need) in code review and unit testing, how can you advance code review and unit testing practice? How are you going to ...
12
votes
7answers
1k views

What will be the best practice for having 'reviewed' source code in a source control repository?

What will be the best way to manage reviewed source code in a source control repository? Should the source code go through a review process before getting checked in, or should the code review happen ...
36
votes
16answers
4k views

Are code reviews necessary for junior developers?

I've worked at two companies, who each had a different methodology when it came to code reviews: In the first company, a code review was conducted by the team leaders and was required after the ...
22
votes
17answers
1k views

Dealing with co-workers who do not have a consistent coding style?

What do you when you're working with someone who tends to write stylistically bad code? The code I'm talking about is usually technically correct, reasonably structured, and may even be ...
15
votes
6answers
726 views

How to deal with someone who dislikes the idea of code reviews?

Obviously, if management buy into spending time with code reviews, then everyone has to do it. But there are always those guys (or gals) who resist with every ounce of their being. How do you ...
11
votes
4answers
619 views

How to document and teach others “optimized beyond recognition” computationally intensive code?

Occasionally there is the 1% of code that is computationally intensive enough that needs the heaviest kind of low-level optimization. Examples are video processing, image processing, and all kinds of ...
20
votes
10answers
4k views

When to do code reviews when doing continuous integration?

We are trying to switch to a continuous integration environment but are not sure when to do code reviews. From what I've read of continuous integration, we should be attempting to check in code as ...
11
votes
3answers
3k views

What tools can be used to facilitate code reviews after commits? [closed]

I've been evaluating a number of code review tools (mostly free ones), but they all seem to be aimed at reviewing patches before they are committed. This wouldn't really fit within our workflow with ...
10
votes
9answers
3k views

Code Reviews, what are the advantages? [closed]

In my team, we don't do formal code reviews. We tend to think that it's enough with pair programming and rotating pairs often. Should we consider doing formal code reviews? What would be the ...
4
votes
1answer
271 views

If TDD is design, how do you know your TDD is well designed? [duplicate]

Given a large group (50+) of programmers: All given the same problem, All using Test-Driven Development (TDD), All pair programming, All doing group-based code review, I have personally seen the ...
11
votes
3answers
603 views

What to do when your colleagues don't value code maintainability [duplicate]

I've been working in the same software development department for a few years now. In that time, the average stay of a developer has been 6-9 months. A handful have been around for over 2 years, but ...
9
votes
10answers
1k views

Every SQL statement has to be reviewed by a DBA — common?

I mean everything, not just schema changes. Even a simple SELECT on a primary key can't go into production, even though it has been code-reviewed by other developers (in context), without a DBA review ...
9
votes
3answers
961 views

Are there code reviews in opensource projects? If so, what tools are used to do this?

I know there is a big push for code reviews in commercial development. However, are code reviews used in open source software or is based on trust? If so, then how are they performed? [Is it a delayed ...
7
votes
3answers
3k views

What are great online code reviews tool for Open Source projects? [duplicate]

I would like to start new Open Source project, and I believe all check-ins should be reviewed before merged into trunk. What are some great online code review tools for Open Source projects that have ...
6
votes
4answers
423 views

How do you deal with discovering bad and false code in your team? [duplicate]

Every year in january we process a big task with our system. While the performance during the task was above average the maintaince follow up is currently having a lot of trouble with jobs running too ...
4
votes
4answers
1k views

Difference between static testing and code review [duplicate]

Possible Duplicate: What is the difference between Static code analysis and code review? What is the difference between static testing and code review? I found some information on ...
0
votes
1answer
87 views

How often to open pull requests [closed]

We are planning to use Git pull requests for code review in our company. Before we start I have a basic question: How often should I open a pull request? Is it best to open one for every little commit ...