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)

0
votes
3answers
261 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 ...
22
votes
4answers
7k 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 ...
52
votes
10answers
5k 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. ...
5
votes
1answer
584 views

What would Business Intelligence (BI) developers look for in code reviews?

Let me preface this with saying I am not a Business Intelligence (BI) developer. I'm a .NET developer, and I have only a vague notion of what BI is, and encompasses. I've been an evangelist for a ...
6
votes
4answers
490 views

How do you deal with discovering bad and false code in your team? [duplicate]

Every year in january we process a big task with our system. While the performance during the task was above average the maintaince follow up is currently having a lot of trouble with jobs running too ...
82
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 ...
6
votes
3answers
293 views

Branches/decision count in an example

Having read SO, just found this question: if (x > y) print (x) else if (x < y) print (y) else print (x,y) How many branches and decisions are there? It mentiones there should ...
2
votes
3answers
426 views

Hacking Python “Requests” library.. How to start as an intermediate pythonista?

My question is conceptual, yet extremely vital for me. I'm an intermediate Python developer. I know fair enough about it, and actually use it on a daily basis. Now, I would like to transform my ...
26
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 ...
7
votes
6answers
636 views

what is the best way to ensure accountability in code checkins?

Note: after writing this I realize that this question is perhaps philosophical, but I'm interested in how the industry handles this scenario regardless. I have recently been working with a code base ...
9
votes
2answers
309 views

What tools or techniques are useful for describing an unfamiliar codebase? [closed]

When manually inspecting unfamiliar code (to review or modify), I seem to have three options. A top-down read of the code, choosing each next source file by how fundamental the filename seems. I ...
4
votes
5answers
230 views

Review tests first

I am going to adopt TDD in our team and one of the ideas I have is to review tests first. So one would write interfaces, mocks, and tests first, submit them for a code review and once interfaces and ...
2
votes
2answers
1k views

So we've got a code review tool, now what can we use for software documents? [closed]

We're using Subversion as a full CM for code and also for related project documents. We have JIRA and Fisheye. When we wanted to add a peer review tool, we looked at and tested several candidates. Our ...
8
votes
6answers
2k views

How to evaluate code quality when you're not familiar with the language? [closed]

As a hypothetical, if I were to interview someone for a new PHP developer position when my experience is in .NET, how can I determine if the code sample they've provided me is efficient and of good ...
5
votes
2answers
13k views

Code review process when using GIT as a repository?

What is the best process for code review when using GIT? We have an external GIT provider (Unfuddle) and have caps on resource usage - so we can't have dedicated remote repositories for every dev. ...
10
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 ...
79
votes
21answers
9k 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 ...
3
votes
4answers
519 views

Can notes/to-dos in code comments sent to code-reviews result in an effective refactoring process?

I want to start/improve a culture of collective code ownership at my company but at a geographically distributed level... I'd say there is some current collective code-ownership mentality, but only at ...
3
votes
2answers
352 views

As a solo programmer, of what use can Gerrit be?

Disclaimer: I'm aware of the questions How do I review my own code? and What advantages do continuous integration tools offer on a solo project?. I do feel that this question aims at a different set ...
7
votes
3answers
543 views

Does studying other people's programs help in self growth? [closed]

Should I be studying big softwares written by other people in our company? My work may be a small sub module on the top of that software, and I may not be required to know what goes beneath the hood, ...
8
votes
9answers
2k views

What is the way to understand someone else's giant uncommented spaghetti code? [duplicate]

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? I have been recently handled a giant multithreaded program with no comments and have been asked to understand what ...
8
votes
4answers
597 views

How can you get constructive criticism for your code?

My team rarely does code review, mainly because we don't have enough time and people lack the energy and will to do so. But I would really like to know what people think about my code when they read ...
5
votes
1answer
493 views

How is the Linux repository administrated?

I am amazed by the Linux project and I would like to learn how they administrate the code, given the huge number of developers. I found the Linux repository on GitHub, but I do not understand how it ...
45
votes
14answers
4k 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
925 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
888 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
185 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% ...
63
votes
19answers
13k 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 ...
2
votes
2answers
416 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 = ...
2
votes
2answers
1k views

How to document and peer review design in scrum? [closed]

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
2k 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 ...
7
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
1k 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
3k 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 ...
9
votes
3answers
281 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
429 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 ...
7
votes
2answers
2k 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
976 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 ...
65
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 ...
5
votes
1answer
228 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
6k 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
243 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
184 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 ...
10
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
650 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
8k 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
956 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/ ...