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)

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 ...
4
votes
4answers
749 views

Reusable VS clean code - where's the balance?

Let's say I have a data model for a blog posts and have two use-cases of that model - getting all blogposts and getting only blogposts which were written by specific author. There are basically two ...
16
votes
3answers
810 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 ...
0
votes
2answers
179 views

Revamp application [closed]

I am a software developer having an experience of 3 yrs. I want to play with latest technologies always. But this is not practical. Because say, I developed a web application in .Net 3.5, now its 30% ...
53
votes
16answers
9k 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 ...
12
votes
4answers
1k views

Why don't interviewers ask the applicant to read some code? [closed]

I had a dozen interviews in my life (I'm about to graduate) and I wonder why I was only once asked to read and explain some code. Roughly, 90% jobs are mostly about maintaining existing systems. IMO ...
1
vote
2answers
403 views

Is it good/safe OOP practice to have a method whose only purpose is to send/retrieve data from another class?

I have a class that performs basic MySQL operations. This is all in PHP. class dbTables { public $name; protected $fields = array(); // array of dbTableField objects public $result_sets = ...
3
votes
2answers
966 views

How to document and peer review design in scrum?

I am a relatively new developer in a small business (a team of 3 developers and an equally small QA branch) working on a medium-sized system. The current iteration is still under 100k lines of code ...
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 ...
6
votes
7answers
1k 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 ...
2
votes
2answers
934 views

Can testers peer review the developers' design and code?

I am a junior developer for a small business using scrum / agile development. A long-term goal of ours is to be appraised at CMMI lvl 2. We have a team of 3 senior developers who implement user ...
9
votes
10answers
2k 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 ...
31
votes
12answers
3k 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 ...
8
votes
3answers
271 views

How to get feedback from the community on large chunks of code?

Code Review.SE is great when you need feedback on a precise, short piece of code. But where to get similar feedback about the code itself when: you have thousands of LOC, don't have colleagues in ...
7
votes
3answers
400 views

amount of code in code review

In my experience, most teams in the company review the code of team member with a small amount of code, always less than hundreds of lines. Is it appropriate to review large amount of code, for ...
6
votes
2answers
1k views

Gerrit, git and reviewing whole branch

I'm now learning Gerrit (which is the first code review tool I use). Gerrit requires a reviewed change to consist of a single commit. My feature branch has about 10 commits. The gerrit-prefered way ...
6
votes
9answers
916 views

Review quality of code [duplicate]

I have been asked to quality review two code bases. I've never done anything like that, and need advice on how to perform it and report it. Background There are two providers of code, one in VB and ...
63
votes
16answers
4k views

Recommendations for teaching junior programmers good coding style [duplicate]

I am a big fan of good coding style, producing clean, clear code that runs well and is easy to use and integrate into larger systems. I believe that we programmers are essentially craftspeople who ...
4
votes
1answer
223 views

How to perform code review of visual code?

Lately, I've been writing code in SAS Enterprise Guide, which produces "code" that looks like this (screenshot from the linked page): My question is twofold: Do you think it's necessary to ...
11
votes
5answers
5k views

What's the best way to review a code before it's committed to the trunk? (SVN)

What's the best way to review a code before it's committed to the SVN trunk? One idea that I am thinking of is to having the developer to commit his code to a branch and then reviewing his code while ...
5
votes
2answers
211 views

CI tests to enforce specific development rules - good practice?

The following is all purely hypothetical and any particular portion of it may or may not accurately describe real persons or situations, whether living, dead or just pretending. Let's say I'm a ...
7
votes
1answer
168 views

Tool to identify potential reviewers for a proposed change

Is there a tool that takes as input a proposed patch and a git repository, and identifies the developers are the best candidates for reviewing the patch? It would use the git history to identify the ...
9
votes
3answers
1k 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 ...
8
votes
5answers
583 views

What's the best way to comment in a code review?

My team just started using crucible/fisheye for initiating code reviews whenever one of us checks something in. There are only 3 of us, and we're each encouraged to review the code and leave comments ...
9
votes
7answers
6k 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 ...
15
votes
7answers
825 views

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

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 ...
2
votes
2answers
2k views

Any Code Review tool with direct connection to CVS? [closed]

I've found many Code Review tools: Phabricator (by Facebook) - http://phabricator.org/ Rietveld (by Google) - http://code.google.com/appengine/articles/rietveld.html GitHub - https://github.com/ ...
8
votes
4answers
515 views

What are benefit/drawbacks of classifying defects during a peer code review

About 3 months ago, our engineering group rolled out Review Board to be used for all peer code reviews. Today, I had a discussion with one of the people involved in that process and found out that we ...
160
votes
19answers
12k views

How do I review my own code? [closed]

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 ...
5
votes
3answers
276 views

What quality level in the commit history can/should I expect/enforce?

I worked as a lone developer for a long time. During this time, I developed a way of formulating and ordering commit messages: Refactor first, describe exactly the reason for the commit in the ...
3
votes
7answers
426 views

What's the deal with code reviews? [closed]

I've been wondering about code reviews recently, based on how many questions I've seen on here talking about them. Between my internships, contracts, and full time jobs, I've worked for six different ...
59
votes
16answers
3k 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, ...
12
votes
2answers
3k views

Github-like “pull requests” without Github

I work as an analyst for a financial institution, which, due to data sensitivity, will not store any data in the cloud. However, I'm having some success getting my team to use Git for code management. ...
10
votes
4answers
725 views

What's wrong in returning hashtable from public method and when does it make sense to do so?

What are the design problems in returning a hashtable from a public method when you want to return multiple items instead of creating a class and returning object of that? If it does have problems ...
1
vote
2answers
1k views

What are the things that you consider in reviewing an iOS source code? [closed]

We're going to do some peer reviews for our iOS projects. We're kind of inexperienced at reviewing each other's codes. The iOS developers attending the reviews will be from other projects, since ...
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 ...
0
votes
2answers
305 views

How do you evaluate a small piece of code? [closed]

I'm creating a website based on users' code, a place where they can share code in a social way and one of the features I'm currently developing is Code Review. This feature will allow users to ...
7
votes
2answers
530 views

Are there any opensource APIs that help analyze code?

As an example, let's say that I need to check for a certain usage of C# code and warn the user that that is a bad pratice. There are multiple usages that I want to detect, such as: Resource not ...
5
votes
1answer
340 views

Word for red flags / warning signs?

When reading about best practices and code reviews, I have come across a word/phrase that people on forums have used to describe code that should be a warning sign that the programmer may have missed ...
8
votes
2answers
5k views

How to determine the effectiveness of a code review process?

We've introduced a code review process within our organisation and it seems to be working well. However, I would like to be able to measure the effectiveness of the process over time, i.e. are we not ...
4
votes
4answers
2k 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 ...
6
votes
2answers
707 views

Should a code review be different for front-end web developers?

Web developers code in a minimum of four languages (HTML, CSS, JavaScript, and a server-side language), must produce a working result in several different browser implementations, and may work on the ...
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 ...
5
votes
1answer
870 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 ...
35
votes
11answers
5k 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 ...
4
votes
2answers
3k views

How to organize code review process

I'm looking for a light-weight code review process. A couple of requirements, the reviewer must be able to do the review alone at the time of his/her choosing (not tied to check-ins), the reviewer ...
2
votes
2answers
383 views

Code Review process

I'm looking for a light-weight code review process. A couple of requirements, the reviewer must be able to do the review alone at the time of his/her choosing (not tied to check-ins), the reviewer ...
4
votes
1answer
180 views

Rapid code analysis

I have recently moved to a new company where I am tasked (in part) with evaluating the existing code base and coming up with patterns and best practices. Our development team consists of around 20 ...
11
votes
4answers
630 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 ...
9
votes
5answers
1k views

Should code review be performed before or after unit tests

I am debating with my colleague on when to perform code review - before or after unit tests. What is the best practice? Some factors we might need to take into account (there may be more): Size ...