Most Popular

1500 questions
60
votes
24 answers

Why do programmers use or recommend Mac OS X?

I've worked on both Mac and Windows for awhile. However, I'm still having a hard time understanding why programmers enthusiastically choose Mac OS X over Windows and Linux? I know that there are programmers who prefer Windows and Linux, but I'm…
60
votes
5 answers

How to explain to a non-technical person why the task will take much longer than they think?

Almost every developer has to answer questions from business side like: Why is going to take 2 days to add this simple contact form? When a developer estimates this task, they may divide it into steps: make some changes to the Database optimize DB…
Mag20
  • 3,301
60
votes
8 answers

Should generated documentation be stored in a Git repository?

When you use tools like jsdocs, it generates static HTML files and its styles in your codebase based on the comments in your code. Should these files be checked into the Git repository or should they be ignored with .gitignore?
garbage collection
  • 1,281
  • 1
  • 13
  • 15
60
votes
7 answers

Code coverage highlights unused methods - what should I do?

I have been tasked to increase code coverage of an existing Java project. I noticed that the code coverage tool (EclEmma) has highlighted some methods that are never called from anywhere. My initial reaction is not to write unit tests for these…
Lucas T
  • 753
60
votes
6 answers

Why do many functions that return structures in C, actually return pointers to structures?

What is the advantage of returning a pointer to a structure as opposed to returning the whole structure in the return statement of the function? I am talking about functions like fopen and other low level functions but probably there are higher…
yoyo_fun
  • 2,297
60
votes
16 answers

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

The way I see it, SQL injection attacks can be prevented by: Carefully screening, filtering, encoding input (before insertion into SQL) Using prepared statements / parameterized queries I suppose that there are pros and cons for each, but why did…
Dennis
  • 8,217
60
votes
3 answers

Name of a program's startup/initial loading window?

I am writing user documentation (an SOP) that involves third party programs that I am trying to describe well. One such program is a server that offers little indication of it's startup besides a graphic that shows during its initialization/startup…
rtmh
  • 643
60
votes
6 answers

Illusory code duplication

The usual instinct is to remove any code duplication that you see in the code. However, I found myself in a situation where the duplication is illusory. To describe the situation in more details: I am developing a web application, and most views are…
Mael
  • 2,345
60
votes
4 answers

Is it better to call a function that doesn't have an effect at that point, IF it improves code clarity?

I have three views in my program (iOS app). Only one of them is ever active at the same time so I set the visibility off for two of them and switch visibility as the user presses buttons. The views are initialized as visible so I set the visibility…
Kevin
  • 844
60
votes
12 answers

Why was the Itanium processor difficult to write a compiler for?

It's commonly stated that Intel's Itanium 64-bit processor architecture failed because the revolutionary EPIC instruction set was very difficult to write a good compiler for, which meant a lack of good developer tools for IA64, which meant a lack of…
Mason Wheeler
  • 82,789
60
votes
8 answers

Version control for independent developers?

Do you think it's worth it to use version control if you are an independent developer, and if so, why? Do you keep the repository on your own computer, or elsewhere, where it can serve as a backup?
vedosity
  • 825
60
votes
6 answers

Why aren't there code overviews for open-source projects?

There are very complex open source projects out there, and to some of them I think I could make some contributions, and I wish I could, but the barrier to entry is too high for a single reason: for changing one line of code at a big project you have…
fiatjaf
  • 737
  • 5
  • 11
60
votes
5 answers

What does "context-free" mean in the term "context-free grammar"?

Given the amount of material that tries to explain what a context-free grammar (CFG) is, I found it surprising that very few (in my sample, less than 1 in 20) give an explanation on why such grammars are called "context-free". And, to my mind, none…
rick
  • 1,965
60
votes
2 answers

Communication between nested directives

There seem to be quite a few ways of communicating between directives. Say you have nested directives, where the inner directives must communicate something to the outer (e.g. it's been chosen by the user).
Michal Charemza
  • 1,320
  • 1
  • 10
  • 16
60
votes
14 answers

What's with the aversion to documentation in the industry?

There seems to be an aversion to writing even the most basic documentation. Our project READMEs are relatively bare. There aren't even updated lists of dependencies in the docs. Is there something I'm unaware of in the industry that makes…
user7433