Questions tagged [code-reviews]
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
369 questions
1
vote
3
answers
436
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 ...
1
vote
2
answers
612
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 ...
24
votes
3
answers
9k
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 few ...
38
votes
5
answers
6k
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 ...
75
votes
2
answers
37k
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. ...
31
votes
4
answers
37k
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 ...
40
votes
6
answers
2k
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 ...
3
votes
2
answers
1k
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
3
answers
831
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
4
answers
485
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 ...
20
votes
9
answers
3k
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
1
answer
807
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
3
answers
347
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 ...
30
votes
9
answers
7k
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 ...
4
votes
1
answer
458
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 ...
89
votes
8
answers
14k
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
4
answers
996
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
5
answers
322
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 ...
12
votes
3
answers
889
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 ...
4
votes
3
answers
2k
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 ...
0
votes
3
answers
557
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 need?...
49
votes
4
answers
24k
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 a ...
55
votes
10
answers
9k
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
1
answer
1k
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 ...
7
votes
4
answers
609
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 ...
85
votes
23
answers
36k
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
3
answers
1k
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 be ...
2
votes
3
answers
1k
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 ...
29
votes
11
answers
4k
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
6
answers
1k
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
2
answers
458
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 ...
5
votes
5
answers
271
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
2
answers
2k
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 ...
10
votes
6
answers
4k
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 ...
11
votes
2
answers
52k
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.
...
18
votes
6
answers
8k
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 ...
88
votes
21
answers
16k
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
4
answers
868
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
2
answers
654
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 ...
8
votes
3
answers
1k
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, ...
9
votes
9
answers
3k
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 it ...
8
votes
4
answers
2k
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 ...
7
votes
1
answer
1k
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 ...
49
votes
14
answers
8k
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 ...
5
votes
4
answers
1k
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 ...
17
votes
4
answers
2k
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
2
answers
420
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% ...
70
votes
19
answers
29k
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 ...
13
votes
4
answers
3k
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
2
answers
512
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 = ...