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)

4
votes
2answers
342 views

Can a Code Review help in learning the code-flow and/or technology of a large code-base? [closed]

I'm new to VC++, and so am not very familiar with COM, ActiveX, IDL etc. When I mentioned this to my tech-lead, he assigned me the task of doing the code review of files he felt were important, in ...
87
votes
16answers
6k 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 ...
1
vote
1answer
67 views

Java private method signature clarity and better practice [closed]

I received the code review comment for below code snippet - public void doWork(String a, Integer b) { .. .. SomeService service = getService(); for (Integer i : numbers) { ...
3
votes
2answers
108 views

Should static analysis be integrated with code review? [closed]

I want to integrate various static analysis tools, and then add the results as comments on a file within code review tools, such as Stash or Review board. I am exploring the feasibility of writing ...
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 ...
19
votes
4answers
807 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 ...
10
votes
1answer
674 views

When making a fix to an earlier commit, should I rebase or add a separate fix up commit?

A common scenario in software development is code reviewing somebody else's code. A common tool for doing this is opening a Pull Request. My question is, when issues are found in the review, should ...
25
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 ...
1
vote
0answers
92 views

How to approach code review with limited resources

I've been given the following task: A company is giving source code for its product (comprising over 1 million lines of C++, Java, with some assembly) for my review. The code will be loaded ...
1
vote
4answers
127 views

What practical steps do you take to ensure you are thorough? [duplicate]

Bit of Context I'm not sure if this is fitting to the programmers.stackexchange area, but I'm not going to post it in SO. Any problem with ambiguity and I'll happily remove it. If I had to talk ...
34
votes
9answers
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 ...
6
votes
5answers
815 views

What is the effectiveness of code reviewing by just reading? [duplicate]

I have been given the task of reviewing a change request comprising of more than 20 changes, the problem is that we do not / cannot install a version of the software to be evaluated as the development ...
27
votes
7answers
3k views

How to monitor code review efficiently?

I suspect major code review cover up in my team. Too many code reviews are merged without any comment. Seems to like there's no such thing as a code review without a single comment. How can I as ...
1
vote
2answers
229 views

Why is there only code review?

In my team I have applied a culture of code review and feature review. The code might look great, written spectacularly, however the feature might not work. It seems to me as 2 different scopes ...
53
votes
9answers
10k views

Bad sign if nobody can comprehend one's code? [duplicate]

If a coder writes code that nobody other than he can understand, and code reviews always end with the reviewer scratching his head or holding their head in their hands, is this a clear sign that the ...
2
votes
0answers
69 views

how to find typos and misspellings in code comments [closed]

I am getting familiar with some portion of code of a very large internal project (over 1 million lines of code) which is C-based and hosted on Mercurial repository. While looking at code, I found ...
50
votes
14answers
4k 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 ...
4
votes
1answer
89 views

In 'branch by abstraction', how would one do code review?

My manager recommended I consider the technique of 'branching by abstraction', in which, rather than creating feature branches, multiple developers work in the same version control branch, and ...
5
votes
2answers
114 views

peer review code documentation [closed]

We all know that code reviews are generally a good practice, but what about reviewing documentation? Many devs that I work with will put up wiki pages, javadocs, etc, but most of the time, unless ...
3
votes
1answer
221 views

Been working on a project for the last 6+ months. Consultants have been brought in and want to change everything. What should I do? [closed]

Long story short, I have been the sole front end developer on this project since last summer. Consultants have been brought in to help accelerate our velocity. After one day and some knowledge ...
1
vote
1answer
61 views

How to avoid old commits/PRs that are painful to merge?

We have a pretty good code review process, but there are couple of issues. The most annoying problem is merging. From time to time the number of stuff to merge grows rapidly and some of the commits ...
1
vote
0answers
66 views

Reject pull request or accept incorrect code? [duplicate]

Very often I have to review pull requests of fellow programmers and I face the problem - what should I do when the code is not as good as I would expect? Should I reject the pull request or ...
-1
votes
1answer
94 views

How to get people to actually do code reviews promptly? [duplicate]

First things first, our company has decided to do code reviews. All of the engineers agree with (or accept) this. Code reviews are required as part of our development process for all commits. The ...
158
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 ...
11
votes
1answer
395 views

Does pair programming remove the need of code reviews in an Extreme Programming (XP) project?

In an extreme programming project, programmers do pair programming most of the time. As these pairs also rotate, that is, you pair program with different people, and there is a sense of collective ...
2
votes
6answers
1k views

Should I use automatic properties?

I'm new to C# coming from a Java background. I'm working on a take home assignment for a coding interview. I normally write my code as following(Java): public class Test { //fields private ...
3
votes
2answers
841 views

Do we still need manual code review if we use sonarqube code review tools

We were using git gerrit for manual code review . but recently we are planning to integrate sonarqube in our Jenkins integration server. Do we still need manual code review? Or we can stop manual ...
0
votes
1answer
101 views

How do I review code changes that are the result of syncing?

At my current job we develop code on a release branch and then do a code review. After all rework is done the final changes are also synced/merged to the 'main branch'. We want to be sure that all ...
31
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 ...
1
vote
1answer
342 views

How to find duplicate strings

I allow my user to create profiles, meaning they potentially could create some with duplicate names. This can be problematic so I want to prevent them from doing so. I coded up this first pass ...
4
votes
1answer
103 views

Pair programming via mailing list

I've started work on a large, open-source project recently. This project uses a mailing list for development, thus all patches must be mailed to this mailing list. This marks a change from my previous ...
3
votes
6answers
475 views

Explicitly define enum values, even if the default value is the same?

There are times when an enum's values are important: it is not necessary for them to be unique, they also need to have specific values. In such cases, should the values be explicitly defined, even if ...
72
votes
20answers
13k 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 ...
1
vote
1answer
98 views

How to keep class parameters visible while using generic argument passing

After writing some classes where class initialization requires multiple options, instead of writing several parameters into constructors or setters, I started passing an associative array of ...
0
votes
1answer
141 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 ...
10
votes
4answers
722 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 ...
7
votes
8answers
368 views

If your team does code review, to what extent do you verify that review fixes are carried out? [closed]

On my team, we carry out code reviews (without the use of external tools). The reviewer produces a list of items which the developer should address or consider and then essentially leave them to it ...
0
votes
1answer
122 views

Where to audit a codebase for dangerous code use [closed]

Not sure Programmers Stack Exchange is the place to ask this question, but thought I'd give it a go. Our team had a near miss recently with a nasty error where a method call had been added to the ...
56
votes
4answers
5k 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 ...
5
votes
5answers
642 views

What is your code review and approval process, and what are its advantages/disadvantages? [closed]

Does your team rely on code reviews for approval of work? Is it simply QA that signs off your features and fixes? Do you have a lead programmer (or architect) that reviews code design and ...
2
votes
4answers
461 views

In Agile, should I create a code-review task?

My team uses Agile as a development approach. Currently, each task has four states which are todo, in progress, testing, and done. We've just started doing code reviews, and I wonder if I need to ...
11
votes
4answers
629 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 ...
-4
votes
1answer
186 views

Code review revenge [closed]

In the company where I work we are doing code reviews. I gave some negative comments about the code (code duplication) of programmer A. My commit was OK and ready to merge and then programmer A added ...
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 ...
1
vote
3answers
644 views

Should we enforce code style in our large codebase? [duplicate]

By "code style" I mean 2 things: Style, eg. // bad if(foo){ ... } // good if (foo) { ... } Conventions and idiomaticity, where two ways of writing the same thing are functionally equivalent, but ...
3
votes
3answers
246 views

What is the appropriate amount of guidance and mentorship a junior programmer should receive? [closed]

I'm a junior software developer, and just got this job working with a very small group of engineers. I've been coding for a few months in this group in a professional settings - before I just coded at ...
13
votes
6answers
453 views

What is the best way for a programmer to handle being code reviewed?

I am fairly new to code review, but I have been coding for years during my PhD - which doesn't always make you a good programmer! If the reviewer changes your code and goes through it with you ...
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 ...
4
votes
3answers
320 views

When to stop reviewing code?

I am working in a team of 4 members. we have started reviewing code 2 months ago. we are using Gerrit as code review tool. while reviewing code initially we have found lot's of problem in the code ...
44
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 ...