Most Popular
1500 questions
73
votes
13 answers
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 has been the most effective way for you to perform…
Paddyslacker
- 11,080
73
votes
16 answers
Is the agile approach too much of a convenient excuse for cowboys
I believe that an agile approach is best for projects where the requirements are fuzzy and a lot of interaction is required to help shape the end user's ideas.
However... In my professional work, I keep ending up at companies where an "agile"…
sipsorcery
- 593
73
votes
9 answers
What causes floating point rounding errors?
I am aware that floating point arithmetic has precision problems. I usually overcome them by switching to a fixed decimal representation of the number, or simply by neglecting the error.
However, I do not know what are the causes of this inaccuracy.…
nmat
- 863
- 1
- 7
- 6
72
votes
7 answers
When to use abstract classes instead of interfaces with extension methods in C#?
"Abstract class" and "interface" are similar concepts, with interface being the more abstract of the two. One differentiating factor is that abstract classes provide method implementations for derived classes when needed. In C#, however, this…
Gulshan
- 9,442
72
votes
3 answers
What is Google's repository like?
I heard Google has a giant private (internal) repository of all of their code and their employees have access to it so that when they are developing things they don't have to reinvent the wheel. I'd like to know more about it!
Is there anyone here…
Ricket
- 1,680
72
votes
37 answers
How to handle people who lie on their resume
I'm conducting technical interviews to fill a few .NET positions. Many of the people I interview really do know .NET pretty well, but I find at least 90% embellish their skillset anywhere between "a little" to "quite drastically". Sometimes they…
Juliet
- 2,787
72
votes
9 answers
Dealing with non-reproducible bugs
Suppose your team writes a software system that is (quite surprisingly) running fine.
One day one of the engineers mistakenly runs some SQL queries that change some of the DB data, then forgets about it.
After some time you discover the…
nicholaswmin
- 1,870
72
votes
9 answers
Can we assume while testing software that a user wouldn't perform such silly actions on software?
For example: While performing functional testing of a form in a web application, we will test the fields by entering different kind of random input values.
In general, we as users of the web application do not actually enter random values into…
Nagarani Dubbaka
- 835
- 1
- 6
- 4
72
votes
10 answers
Why are "if elif else" statements virtually never in table format?
if i>0 : return sqrt(i)
elif i==0: return 0
else : return 1j * sqrt(-i)
VS
if i>0:
return sqrt(i)
elif i==0:
return 0
else:
return 1j * sqrt(-i)
Given the above examples, I don't understand why I virtually never see…
horta
- 840
72
votes
17 answers
How can I ask my boss (in a polite way) to comment his code?
I am being taught by my boss (I just finished school and he wanted someone with a little programming experience, so he chose me to train me on what that company specializes in) and started working with ASP.NET MVC applications, some HTML and CSS.…
Aidan Quinn
- 823
72
votes
4 answers
Why PATCH method is not idempotent?
I was wondering about this.
Suppose I have a user resource with id and name fields.
If I want to update a field I could just do a PATCH request to the resource like this
PATCH /users/42
{"name": "john doe"}
And then the application will update…
seldon
- 972
72
votes
5 answers
When is Singleton appropriate?
There is a widely accepted opinion that Singleton is an anti-pattern. As usual, there are always exceptions to the rule. Can you explain why Singleton is a bad choice in general and give an example of some valid use cases for it?
Fishtoaster
- 25,919
72
votes
2 answers
Summarize changes (insertions and deletions) in Git
I want to look at how my code base has grown over time. GitHub has a nice +/- display along the list of checkins which gives a sense of this. Is there something similar I can use with my Google Code hosted repo or offline?
Potatoswatter
- 1,087
72
votes
7 answers
How do I take responsibility for my code when colleague makes unnecessary improvements without notice?
One of my teammates is a jack of all trades in our IT shop and I respect his insight.
However, sometimes he reviews my code (he's second in command to our team leader, so that's expected) without a heads up. So sometimes he reviews my changes before…
Jesslyn
- 839
- 7
- 9
72
votes
14 answers
Name for this antipattern? Fields as local variables
In some code I'm reviewing, I'm seeing stuff that's the moral equivalent of the following:
public class Foo
{
private Bar bar;
public MethodA()
{
bar = new Bar();
bar.A();
bar = null;
}
public MethodB()
…
JSBձոգչ
- 1,450