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)

-2
votes
0answers
35 views

Solid KPIs for applying code review? [duplicate]

I am now trying to convince my teammates to do code review. But before that, I have to convince my team lead first. My team lead needs to know some solid KPIs to measure the benefits after doing code ...
-2
votes
0answers
31 views

github: service for post-commit code reviews?

I'm looking for a tool/service that allows to initiate code review on the existing codebase. Real-world scenario: we're developing a helpers library, the code is hosted on GitHub. The member of the ...
26
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 ...
25
votes
11answers
6k 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 ...
4
votes
3answers
341 views

How do I effectively address code-review feedback about class and method names without a suggestion for a better or alternate name?

Part of code review feedback is suggesting better names for methods and classes. How can I address feedback about class and method names which does not suggest an alternative? For example, I might ...
2
votes
2answers
192 views

Code Review and Checkin Guideline: Should reviewers have veto power over checkin? [closed]

Should the author of a changeset be required to obtain sign off from all reviewers who have reviewed the code or should code be allowed to check in as long as there is one sign off? I think giving ...
3
votes
1answer
515 views

In my situation, how could I learn to program without a mentor? [closed]

So my problem may be relatively rare, at least the majority of the "how to learn to code" questions I've come across deal with a lack of fundamental understanding of computers or languages. I'm fluent ...
21
votes
4answers
6k views

code review with git-flow and github

With regular git and github I can do a code review by simply creating a pull request of the feature branch I'm working on to the master branch. How would I do code reviews with git-flow? With workflow ...
0
votes
1answer
395 views

Recommendations to organize code changes in GIT

I'm looking for an advice reflecting my point of view. First, I will explain my point of view. My point of view I'm working in a big company as a C++ developer, we are using GIT. I'm going to make a ...
8
votes
9answers
1k views

How can I promote clean coding at my workplace?

I work with a lot of legacy Java and RPG code on an internal company application. As you might expect, a lot of the code is written in many different styles, and often is difficult to read because of ...
2
votes
1answer
164 views

How to respond to bizarre requests in code reviews? [closed]

I think that code reviews are great and very helpful for everyone. With that being said, from time to time I've received feedback on a pull request (leading to the PR being delayed for at least as ...
23
votes
12answers
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 ...
102
votes
11answers
10k views

Is it effective to review code in language I don't know?

I'm an experienced developer, but have not done many code reviews. I'm being asked to review code written in Python but I do not know Python. Does it make any sense at all to review code in a ...
4
votes
5answers
799 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 ...
1
vote
0answers
32 views

How can I test for performance issues in a specific piece of code? [duplicate]

I've inherited a problem from a programmer that isn't with our group anymore - a piece of our application suffers from performance issues under a particular set of circumstances. I can replicate ...
3
votes
0answers
118 views

Documentation of code review

In a project we have a rather formal code review, which is currently done manually and documented in Excel sheets and Word docs. We would like to improve the current code review process by ...
81
votes
20answers
14k 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 ...
9
votes
5answers
1k views

Annotate source code with diagrams as comments

I write a lot of (primarily c++ and javascript) code that touches upon computational geometry and graphics and those kinds of topics, so I have found that visual diagrams have been an indispensable ...
91
votes
16answers
7k views

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

While reviewing a co-worker's code,I came across some spelling mistakes in function names and also grammatical errors like 'doesUserHasPermission()' instead of 'doesUserHavePermission()' in function ...
96
votes
16answers
8k views

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

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

Relational table design for data ownership

Setup (schema simplified for clarity) Suppose I have a table called resource: +---------------+--------------+------+-----+ | Field | Type | Null | Key | ...
1
vote
1answer
128 views

Sorting Array before looping : best practice

I was going through JBAKE code at https://github.com/jbake-org/jbake/blob/master/src/main/java/org/jbake/app/Asset.java : 58 PFB the code. Why are we sorting the array here? if (assets != ...
2
votes
2answers
248 views

Checking program robustness using static code analysis

(Building on this question) If you have a static code analyser such as Checkstyle, is it possible to to relate any of the stuff that it checks for to actual robustness? Some of the things that ...
-1
votes
1answer
173 views

eradicating the array = loop mindset [closed]

I have noticed a common issue in code reviews, that takes this form: // "arr" is an array for (i = 0; i < arr.length; ++i) { if (i == 3) { // do something with arr[i] } if (i ...
1
vote
1answer
156 views

Interface Implementation: A parameter I don't need

Pseudo-Code interface IPagingInfo { int CurrentPageNo { get; } int RowsPerPage { get; } ... } interface ResultsRetriver { ResultRows GetResults(IPagingInfo pagingInfo); } class ...
11
votes
1answer
502 views

How to do peer reviews on GitHub pull requests?

We're moving from Bitbucket to GitHub and one thing we are struggling with are peer code reviews that worked very smoothly on Bitbucket like this: Author opened a Pull Request (GitHub: the same) ...
-2
votes
1answer
203 views

Searching for 2 numbers that equal 10 [closed]

During an interview today I was asked to write a function that accepted an array of integers and return the positions of two values in the array that the sum was 10. My code was C# public string ...
2
votes
3answers
217 views

What is the most readable way of passing arguments to the function? [closed]

I'm using JavaScript but the question can be generalized to all the languages. In a nutshell - I'm checking if a browser connecting to my site is a microwave and cater for that accordingly. What ...
1
vote
1answer
139 views

Interface Design: Specific vs General parameter (A Minimal design vs anticipated use variation)

Code public interface IVehicle { string VehicleMake { get; } int MonthsSincePurchase { get; } bool IsApprovedUsed { get; } ... } public class WarrantyPopUpHandler { virtual bool ...
4
votes
2answers
105 views

How to help programmers use existing shared classes, instead of reinventing them? [duplicate]

My company has a fairly large software project (a couple million lines of code spread across many assemblies.) One sticking point we've consistently run into during code reviews has been with the use ...
3
votes
4answers
301 views

Minimal design vs anticipated use

Recently when performing a code review I came across something like this: Old Code: WriteLabour(useNewVersion); WritePart(); WriteNonLabour(useNewVersion); New Code: WriteLabour(); ...
0
votes
1answer
190 views

How long should a code review be? [closed]

Where I work, we are eight software developers and every task done must be reviewed by another developer. Often, I feel like the code reviews are done too quickly (example: a task completed in five ...
2
votes
1answer
139 views

How to encourage code review with team members working on different projects and platforms

With the previous team I used to work with, we used to work on the same project at the time. Or at least we used to use the same platform/programming languages. Code review was almost daily routine ...
3
votes
1answer
115 views

Merging from unfinished feature branches and code review

We are using the git flow workflow, and it sometimes happens that we have long-lived feature branches. Of course we can merge from the develop branch into our feature branch, when another feature ...
14
votes
5answers
347 views

Code review lags behind the Deliver/Test Cycle

In our Agile process we have 2-week Sprints. Tasks are delivered on a daily basis (daily builds), and the Test Team completes their testing immediately the next day or even the same day. We also have ...
27
votes
7answers
4k 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 me like there's no such thing as a code review without a single comment. How can I ...
6
votes
5answers
427 views

How to promote code review as an employee? [closed]

I have just graduated not long ago and started to work in a startup company for almost a year. I have introduced git to my current company and they are now happy to use it for version control. I feel ...
30
votes
9answers
4k 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 ...
47
votes
7answers
6k views

What is the actual value of a consistent code style

I am part of a consultant team implementing a new solution for a customer. I am responsible for the majority of code reviews on the client-side codebase (React and javascript). I have noticed that ...
2
votes
1answer
87 views

Code review and testing in the process

I am thinking about the software development process of my team, more specifically, I am thinking about tests and code review into our development process. I came to the conclusion that, in order to ...
2
votes
4answers
682 views

outsourcing code review/refactoring [closed]

I have a small project (3000 lines in Python) that I wrote myself; it has no known bugs and has some decent parts, but is largely a mess because of my lack of time. Unfortunately, I have to be the one ...
58
votes
18answers
6k views

How to tell your boss that his programming style is really bad? [duplicate]

I'm a student and in my spare time I'm working for a big enterprise as Java developer. The job is good, but the problem is, my boss writes very strange code. I don't want to complain, but some issues ...
11
votes
9answers
528 views

Is it out of line to give unsolicited constructive criticism to a programmer? [duplicate]

I recently started work at new office that uses a proprietary program written by a solo developer. He's occasionally around as part-time tech support, but the company has signed off on this software ...
34
votes
9answers
2k 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 ...
54
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 ...
4
votes
2answers
367 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 ...
5
votes
2answers
155 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 ...
64
votes
16answers
5k 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
827 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
698 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 ...