Most Popular
1500 questions
78
votes
67 answers
Do you have to be good at math to be a good programmer?
It seems that conventional wisdom suggests that good programmers are also good at math. Or that the two are somehow intrinsically linked. Many programming books I have read provide many examples that are solutions to math problems, or are somehow…
Charles Roper
- 1,363
- 1
- 13
- 14
78
votes
9 answers
What does XXX mean in a comment?
What do people generally mean whenever you see XXX in a comment. Occasionally, I'll see a comment like this:
# XXX - This widget really should frobulate the whatsit
Of course, I can tell what the comment means, but what does the XXX generally…
Jason Baker
- 9,615
78
votes
6 answers
What should I consider when the DRY and KISS principles are incompatible?
The DRY principle sometimes forces the programmers to write complex, hard-to-maintain functions/classes. Code like this has a tendency to become more complex and harder to maintain over time. Violating the KISS principle.
For example, when multiple…
user158443
- 809
78
votes
10 answers
What is a proper use of downcasting?
Downcasting means casting from a base class (or interface) to a subclass or leaf class.
An example of a downcast might be if you cast from System.Object to some other type.
Downcasting is unpopular, maybe a code smell: Object Oriented doctrine is to…
ChrisW
- 3,417
78
votes
14 answers
Why is Arithmetic Overflow ignored?
Ever tried to sum up all numbers from 1 to 2,000,000 in your favorite programming language? The result is easy to calculate manually: 2,000,001,000,000, which some 900 times larger than the maximum value of an unsigned 32bit integer.
C# prints out…
Bernhard Hiller
- 1,963
78
votes
11 answers
Metric by which to hold developers accountable
I asked a question on lines of code per hour and got torn a new one. So my matured follow-up question is this:
If not lines of code, then what is a good metric by which to measure (by the hour/day/unit-of-time) the effectiveness of remote…
Kyle Cureau
- 913
78
votes
6 answers
Why is it so bad to read data from a database "owned" by a different microservice
I have recently read this excellent article on the microservice architecture: http://www.infoq.com/articles/microservices-intro
It states that when you load a web page on Amazon, then 100+ microservices cooperate to serve that page.
That article…
David
- 4,439
78
votes
11 answers
What exactly is the build number in MAJOR.MINOR.BUILDNUMBER.REVISION
What I think about Build Numbers is that whenever a new nightly build is created, a new BUILDNUMBER is generated and assigned to that build. So for my 7.0 version application the nightly builds will be 7.0.1, 7.0.2 and so on. Is it so? Then what is…
A9S6
- 903
78
votes
7 answers
How to manage accidental complexity in software projects
When Murray Gell-Mann was asked how Richard Feynman managed to solve so many hard problems Gell-Mann responded that Feynman had an algorithm:
Write down the problem.
Think real hard.
Write down the solution.
Gell-Mann was trying to explain that…
user7146
78
votes
16 answers
Should we design programs to randomly kill themselves?
In a nutshell, should we design death into our programs, processes, and threads at a low level, for the good of the overall system?
Failures happen. Processes die. We plan for disaster and occasionally recover from it. But we rarely design and…
jimbo
- 861
78
votes
14 answers
Clarify the Single Responsibility Principle
The Single Responsibility Principle states that a class should do one and only one thing. Some cases are pretty clear cut. Others, though, are difficult because what looks like "one thing" when viewed at a given level of abstraction may be…
dsimcha
- 17,234
78
votes
7 answers
Configuration data: single-row table vs. name-value-pair table
Let's say you write an application that can be configured by the user. For storing this "configuration data" into a database, two patterns are commonly used.
The single-row table
CompanyName | StartFullScreen | RefreshSeconds | …
Heinzi
- 9,748
78
votes
14 answers
How important is it for a programmer to have an online presence?
I've noticed more and more mentions (both in posts here and in actual job descriptions) of programmers' "portfolios" - typically their public profiles on sites such as this, GitHub, etc.
How important is this, and would companies (startups in…
Jer
- 2,576
78
votes
4 answers
Are there any statistics that show the popularity of Git versus SVN?
I'm writing an essay, and would like to have some empiric evidence, perhaps longitudinal data where the popularity of these technologies is compared over a period of some years.
Are there any statistics that show the popularity of Git versus SVN?
Jakob
- 1,015
78
votes
10 answers
Why has C prevailed over Pascal?
My understanding is that in the 1980s, and perhaps in the 1990s too, Pascal and C were pretty much head-to-head as production languages.
Is the ultimate demise of Pascal only due to Borland's neglect of Delphi? Or was there more, such as C being a…
Konrad Morawski
- 9,737