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)

-1
votes
0answers
46 views

Rule Engine for Code Analysis within Organisation [on hold]

Are Rules Engines used for Code validation, quality analysis and conformance to common rules within an organisation? Any Tools/libraries or fully made engines(like drools or jess) that do it? I ...
6
votes
3answers
178 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 ...
4
votes
3answers
284 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 ...
1
vote
2answers
105 views

Apply filter only if not null

My function takes an optional parameter, type, which is used to filter through a collection. However, the filter should only apply if the parameter is passed in (in other words, non-null). If the ...
38
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 ...
17
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 ...
2
votes
5answers
255 views

Simplicity-efficiency tradeoff

The CTO called to inform me of a new project and in the process told me that my code is weird. He explained that my colleagues find it difficult to understand due to the overly complex, often new ...
2
votes
0answers
82 views

How can I make a universal construction more efficient?

A "universal construction" is a wrapper class for a sequential object that enables it to be linearized (a strong consistency condition for concurrent objects). For instance, here's an adapted ...
1
vote
3answers
186 views

Is it appropriate to remove redundant code explicitly assigning the default values?

Sometimes while I'm editing something I see some useless code added by other developers, probably due to habit. Editing this code will not make any difference, so is it appropriate? In my specific ...
3
votes
2answers
129 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 ...
3
votes
3answers
169 views

What can I do to let our team have code reviews of branch merges having hundreds of screens worth of Github diffs?

"Code review" (aka "peer review") seems like a really great idea, so my team started practicing it. For a little while it worked well, but then a co-worker merged a branch in, and asked for a review ...
27
votes
10answers
3k 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 ...
2
votes
1answer
76 views

How to do an effective code review of library changes?

One of my projects just changed the version number of a supporting third-party library. Specifically, we changed a J2EE app from JPA 1.x to JPA 2.0. Our CI system has had this change for a week and ...
4
votes
1answer
242 views

If TDD is design, how do you know your TDD is well designed? [duplicate]

Given a large group (50+) of programmers: All given the same problem, All using Test-Driven Development (TDD), All pair programming, All doing group-based code review, I have personally seen the ...
1
vote
2answers
192 views

Is there any issue if ternary operator is used in super() method [closed]

I am using a ternary operator in super () method of my code. While the code went for review, I got a reply that Strictly don’t use ternary operators in the Super() calls. Is there any problem ...
4
votes
3answers
232 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 ...
9
votes
5answers
490 views

Who should do code reviews?

In my company mostly the architect does code reviews. He is a very experienced and smart software guy, so he is very good at it. When developers do the code reviews they don't do it half as well. We ...
3
votes
2answers
185 views

Is it normal to get your software development products critiqued?

I am currently a software developer on coop that was in an interesting situation today. I cannot say too much, as the things I do are under NDA, but I make Grasshopper 3D (which is a Rhino plugin) ...
2
votes
5answers
386 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 ...
0
votes
3answers
892 views

Logic inside class properties setters & getters [duplicate]

Trying to build a case against this as we have a developer that likes to use class properties in place of methods. I think it's a bad idea. In some cases he is accessing the data layer inside the ...
15
votes
8answers
980 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 ...
1
vote
1answer
177 views

Dealing with 'dirty' Ruby on Rails client

I had to leave a startup about a month ago because of lack of funding. Basically, this client wanted an application to allow contractors to create, update, read, and delete yardsigns. Straight forward ...
3
votes
1answer
155 views

How to do structured code reviews [duplicate]

We need to do pre-check-in code reviews. We are using Visual Studio and TFS. The built in code review functionality, is a bit odd to me. If I "reject" a check-in and comments what needs work, the ...
1
vote
2answers
153 views

Solutions for giving feedback to students on their code?

I will be a TA for a course that teaches Haskell this semester and the professor and I are trying to come up with a solution that lets us do entirely electronic submissions. We would like students to ...
15
votes
8answers
1k 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 ...
1
vote
2answers
155 views

How can I automate the process of code review

I have a team that works on multiple technologies. I want to know how can I automate the process of code review for .Net, .Net MVC, Python, PHP, Drupal and HTML5/CSS with JavaScript. I have read ...
9
votes
3answers
313 views

Good guidelines and practices for mandatory code review [closed]

We are trying out mandatory code review on each commit -- nothing gets into master that hasn't been validated by at least 1 person not the author -- for a couple of sprints. We have buy in from both ...
-1
votes
2answers
103 views

Potential issues with code reviews [closed]

for clarity, code review = a team meeting and reviewing/sharing code What are the potentially negative aspects of the code review process in a development environment? What comes to mind for me ...
1
vote
3answers
239 views

How to make code-review feel less like a way to *shift* the responsibility? [duplicate]

Sometimes it seems to me that people ask for code-reviews just so they would be able to say "Xyz reviewed my code!"(1) when something broke. Question, is that ever the case? (Or is it just my ...
0
votes
2answers
232 views

Code Review tools - to use or not? [closed]

On my dev team, we're doing code reviews, however not in a proper way i believe. The issues our process suffers from: Not enough time is allocated for proper code review. Doing reviews is not ...
14
votes
3answers
799 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 ...
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 ...
17
votes
2answers
2k 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. ...
2
votes
3answers
4k views

Best practice to store DateTime based on TimeZone

Developing a web application which should allow User to schedule appointment based on their TimeZone. And I am storing the User scheduled datetime as server datetime into database field. While ...
30
votes
5answers
997 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 ...
1
vote
2answers
397 views

Should the search engine return a dictionary or strongly typed objects?

I'm building a search engine using Lucene.NET / Solr.NET, and I'm wondering should search hits be returned as a dictionary or strongly typed object. public class SearchResult { public string ...
4
votes
3answers
570 views

Code review if nobody in team has knowledge in some technology?

Sample situation: A team of Java developers starts an iOS project. Only one developer has Objective-C/iOS knowledge, and in the beginning he will work on this project alone. How we can perform code ...
1
vote
4answers
319 views

Can I perform a code review although I am very inexperienced? [closed]

I have been teaching myself Python as a first language for 2 years now. So far I have done some online courses (NLP, Design of a Computer Program etc.) and solved some puzzles but never worked with ...
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 ...
1
vote
1answer
339 views

Checklist for coding MVVM web application [duplicate]

We are a small team working on a web application using MVVM design pattern using technologies like .NET, Knockout and HTML. I am trying to come up with a code review checklist for this, so that my ...
1
vote
3answers
174 views

How to integrate code reviews to a team [duplicate]

I work in a team that keeps growing. However, there are no code reviews and I see this as a problem every day. There are people with really limited skills committing code to our repository that I ...
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 ...
3
votes
1answer
215 views

How can I make being code reviewed by someone who doesn't know the language easier?

I'm in a team where I am the only Java developer. The rest of the team are VERY experienced in their own programming language, but their area of expertise is not object orientated. I found the first ...
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 ...
7
votes
4answers
460 views

How should I implement code review in this situation?

My question is about how to put code review into practice in a workplace where nobody else has asked for it, I've never done it before, and I'm not entirely sure if it's worthwhile for this type of ...
2
votes
5answers
236 views

Who is responsible for fixing failed SQL code reviews? [closed]

As a DBA, most SQL is submitted to my team for review. We do not have a SQL developer, so the code is frequently very, very inefficient. Our current process is: SQL is submitted for review right ...
11
votes
3answers
582 views

What to do when your colleagues don't value code maintainability [duplicate]

I've been working in the same software development department for a few years now. In that time, the average stay of a developer has been 6-9 months. A handful have been around for over 2 years, but ...
3
votes
3answers
502 views

What feedback is or is not appropriate for a code review? [duplicate]

I am interested in hearing some guidelines as to what feedback is or is not appropriate for a code review. My team has a very unstructured review process and I am trying to suggest some ways to ...
3
votes
0answers
103 views

How to associate a new/modified changeset with an existing review in VisualStudio 2012

I'm trying out the new Code Review tool in Visual Studio 2012. Which seems okay for the most part, but I've hit a wall in regards to when changes are required. How should this be handled in a code ...
0
votes
4answers
203 views

How to count condition coverage

I am wondering, What would be the correct condition coverage test cases for the following condition: if(A && E && (B || C || D)) Considering short circuiting, what cases would I ...