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)

146
votes
18answers
12k views

How do I review my own code?

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 ...
120
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 ...
84
votes
16answers
5k views

Should I point out spelling/grammar related mistakes in someone's code?

While reviewing a coworker's code, I came across some spelling mistakes in function names and also grammatical errors like 'doesUserHasPermission()' instead of 'doesUserHavePermission()' in function ...
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 ...
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 ...
70
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 ...
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 ...
55
votes
16answers
2k views

Do We Have a Responsiblity to Improve Old Code?

I was looking over some old code that I wrote. It works, but it's not great code. I know more now than I did at the time, so I could improve it. It's not a current project, but it's current, ...
54
votes
4answers
4k views

What is the purpose of a Code Review

I am in the process of trying to sell my organisation on the value of code reviews. I have worked at several places where they were employed. I have seen them used to nitpick styling choices, and ...
51
votes
12answers
2k views

Releasing an open source project without getting embarrassed

I've been working by myself on a fairly large open source project for quite a while and it's nearing the point where I'd like to release it. However, I'm self-taught and I don't really know anyone who ...
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 ...
49
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 ...
45
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 ...
44
votes
14answers
3k views

How important is positive feedback in code reviews?

Is it important to point out the good parts of the code during a code review and the reasons why it is good? Positive feedback might be just as useful for the developer being reviewed and for the ...
41
votes
12answers
3k views

Reconciling the Boy Scout Rule and Opportunistic Refactoring with code reviews

I am a great believer in the Boy Scout Rule: Always check a module in cleaner than when you checked it out." No matter who the original author was, what if we always made some effort, no ...
39
votes
10answers
3k views

Should Junior Programmers be involved as code reviewers in the projects of Senior Programmers?

One of my team members, a junior programmer, has impressive programming skills for his level of experience. And during code reviews, I believe in emphasizing learning, not pointing out mistakes. ...
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 ...
36
votes
5answers
1k views

How to code review without offending other developers [duplicate]

I work on a team that does frequent code reviews. But it seems like more of a formality than anything. No one really points out problems in the code for fear of offending other developers. The few ...
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 ...
34
votes
7answers
1k views

Working as a sole developer: getting code looked over

I have no choice but to work on my own, and can't find an adequate solution for getting my work looked over, sanity checked, having someone to brainstorm ideas with, discussing best practices and so ...
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 ...
30
votes
7answers
1k views

At what point does “constructive” criticism of your code become unhelpful?

I recently started as a junior developer. As well as being one of the least experienced people on the team, I'm also a woman, which comes with all sorts of its own challenges working in a ...
30
votes
5answers
1k views

Is it appropriate to have positive comments in code reviews, or is it exclusively for constructive criticism?

I have been doing a lot of code review lately, and I am unsure of the positive and negative effects and professionalism of putting positive and/or funny comments in code reviews. We use Github as our ...
28
votes
9answers
3k views

What should I do when waiting for a review?

Before asking my question, I must explain the situation. I'm working for a company as a junior software engineer. One of the seniors always stops me when I have finished my development and want to ...
28
votes
10answers
3k views

How to deal with no code reviews in my new place when I come from that practice?

The team in my new company does not have a code review process. I come from companies with code review as a must culture and thus I don't feel comfortable committing my code without having it ...
27
votes
10answers
4k views

Getting coders to do code review [duplicate]

I am running a project where I pay developers to contribute to my semi open source project. My problem is that it is easy to hire developers, but it is very difficult to get anyone to do code ...
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
766 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?
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 ...
22
votes
10answers
2k views

How to prove an application is built on a bad codebase?

I'm currently reviewing a system built by some developers that previously worked at my job. The system works pretty well from a user's point of view, but when delving into code review it's a utter ...
22
votes
4answers
512 views

Application / Code reviews for lone programmers?

Are there any services that 'for a reasonable price' will give and provide good and technical advice on applications. On a lot of projects, I'm usually the only developer, and sometimes, I think some ...
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 ...
20
votes
9answers
1k views

What exactly makes code “clean”? [duplicate]

I am an intern at a small software company, doing typical grunt work. Many tasks that the actual developers are doing are above my head however I finally got to see some real "action" and write some ...
20
votes
9answers
893 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 ...
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 ...
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 ...
19
votes
17answers
934 views

How to persuade programmers to follow the basic rules

There are several rules I must keep asking programmers to follow very often. They write code and, if it works, job is just done, for them. Most basic rules might be: Commiting changes Not writing ...
19
votes
10answers
3k 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 ...
18
votes
9answers
2k views

What should come first: testing or code review?

I'm quite new to programming design patterns and life cycles and I was wondering, what should come first, code review or testing, regarding that those are done by separate people? From the one side, ...
18
votes
3answers
2k views

Is it good to review programs with seniors and boss even if it is working fine?

In my company, before delivery of any project, my boss asks my seniors to review programs written by me or other team members or sometimes boss also sits with us for review. I think it is a good way ...
18
votes
2answers
3k views

What is a“ feature envy” code and why is it considered a code smell?

This question on SO talks about correcting what the OP thought is feature envy code. Another example where I saw this nifty phrase being quoted is in a recently given answer here in programmers.SE. ...
18
votes
2answers
4k views

Recommended process for code reviews with mercurial

We typically used Perforce and SmartBear's Code Collaborator at Big Corp and now we're also going to be using Mercurial for certain projects. Code Collaborator support Mercurial (we are using ...
18
votes
5answers
906 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 ...
18
votes
3answers
878 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 ...
17
votes
4answers
742 views

How should I go about fixing code from a less-experienced programmer?

A little background: I am one of two programmers for our department of 10 people (the rest are artists and management). The two of us do all of the coding required to make things flow well, and ...
17
votes
7answers
470 views

Could an internal rep, voting and badges encourage good programming practices?

Just thinking out aloud - we programmers love all this voting/badges/rep stuff so could a scheme like this be introduced into a companies code review process to encourage better coding. Something ...
17
votes
2answers
552 views

Best way to relate code smells to a non technical audience? [closed]

I have been asked to present examples of code issues that were found during a code review. My audience is mostly non-technical and I want to try to express the issues in such a way that I convey the ...
16
votes
12answers
1k 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 ...
16
votes
3answers
795 views

Is a code review which uses only code comments a good idea?

Preconditions Team uses DVCS IDE supports comments parsing (like TODO and etc.) Tools like CodeCollaborator are expensive for budget Tools like gerrit are too complex for install or not usable ...
16
votes
3answers
1k views

Strategy for code review before merge to master from feature branches

Me and my team use feature branches (with git). I'm wondering which is the best strategy for code review before merge to master. I checkout a new branch from master, lets call it fb_#1 I commit a ...