This tag is for questions about the practice of code review and code walkthroughs.

learn more… | top users | synonyms (1)

140
votes
18answers
11k 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 ...
119
votes
34answers
3k 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 ...
83
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 ...
82
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 ...
76
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 ...
64
votes
19answers
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 ...
64
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 ...
54
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, ...
50
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 ...
47
votes
16answers
5k 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

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 ...
44
votes
14answers
2k 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 ...
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
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
16answers
3k 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 ...
35
votes
11answers
3k 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
964 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 ...
25
votes
17answers
1k 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 ...
24
votes
5answers
688 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?
23
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
17answers
967 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 ...
21
votes
4answers
502 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
2k 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
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
17answers
909 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
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 ...
18
votes
16answers
488 views

Best way to relate code smells to a non technical audience?

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 ...
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
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
867 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 ...
17
votes
11answers
2k 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 ...
17
votes
4answers
735 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
8answers
698 views

Tips on persuading boss that code review is a good thing

How would you persuade your Boss that code reviews are worth the time (and hence cost)? Especially if, say, you worked in a hypothetical company that had several developers but they rarely worked ...
17
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 ...
17
votes
2answers
1k 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. ...
17
votes
3answers
651 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 ...
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
7answers
464 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 ...
16
votes
3answers
762 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 ...
15
votes
8answers
984 views

What are common code review processes and what is considered bad?

My company recently started doing formalized code reviews. The process goes like this: you submit into a github, request a pull request, code gets reviewed by approximately three people, then if all ...
15
votes
6answers
687 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 ...
15
votes
4answers
708 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 ...
15
votes
8answers
959 views

How should I validate code when there is no one to do code review? [duplicate]

I'm used to working in a large development environment where code is peer reviewed and tested by the client, who is usually an IT person themselves. I am now working at a very small company where I'm ...
14
votes
10answers
2k views

Interview: Review another developer's code

One of my colleagues recently left and I've been asked to review the code of an interviewee coming in to replace him. I have no idea what code he'll bring along with him and moreover have never been ...
14
votes
7answers
686 views

How should I describe the process of learning someone else's code? (In an invoicing situation.)

Edit: Justin Cave made a good point that this sort of communication should be up front in my quoting / estimations. Is this case, I'm still interested to know what sort of language people use to ...