Most Popular

1500 questions
61
votes
4 answers

Is there a good reason to run 32-bit software instead of 64-bit on 64-bit machines?

Is there any good reason to supply a 32-bit version along with a 64-bit version of any software targeted at modern desktop machines, running modern 64-bit operating systems on 64-bit hardware? It seems that 64-bit software would be more efficient,…
61
votes
5 answers

Will a computer attempt to divide by zero?

We all know 0/0 is Undefined and returns an error if I were to put it into a calculator, and if I were to create a program (in C at least) the OS would terminate it when I try to divide by zero. But what I've been wondering is if the computer even…
Ankush
  • 841
61
votes
8 answers

Is it good practice to rely on headers being included transitively?

I'm cleaning up the includes in a C++ project I'm working on, and I keep wondering whether or not I should explicitly include all headers used directly in a particular file, or whether I should only include the bare minimum. Here's an example,…
futlib
  • 2,157
  • 3
  • 21
  • 26
61
votes
8 answers

Why do people disable JavaScript?

I asked a question yesterday Should I Bother to Develop For JavaScript Disabled?. I think the consencus is: Yes, I should develop for JavaScript Disabled. Now I just want to understand why users disable JS. It seems many developers (I guess people…
Jiew Meng
  • 2,271
61
votes
9 answers

How do you track what you and your team are working on day-to-day?

I'm struggling with how to keep track of what myself and people on my team actually do each day. I get a good broad picture by going over completed cards each week and stand-ups help a bit, but I feel like I don't have a good handle on the…
61
votes
8 answers

Client-side coding: How to prevent malicious use?

Over the last few years, the trend for client-side (browser) applications has really taken off. For my latest project, I have decided to try and move with the times and write a client-side application. Part of this application involves sending…
GWed
  • 3,125
61
votes
3 answers

Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?

I wonder why frameworks/libraries have their own helpers although they exist natively already. Let's take jQuery and AngularJS. They have their own each iterator functions: jQuery.each() angular.forEach() But we have…
61
votes
7 answers

At what point is version control needed?

I work in embedded systems. Right now, my organization has two full-time programmers and two occasional programmers. It's rare that the same project is worked on by two programmers. All code is stored on a network drive. There are folders for the…
61
votes
9 answers

What's the right balance between code consistency and code improvement?

Recently I had a discussion with a colleague regarding code style. He was arguing that your usage of APIs and the general patterns you are using should be as similar as possible with the surrounding code, if not with the the codebase as a whole,…
61
votes
14 answers

Forbidding or controlling "Hidden IT..." Who should write and maintain ad-hoc software applications?

Bigger companies usually have the problem, that it is not possible to write all programs employees want (to save time and to optimize processes) due to a lack of staff and money. Then hidden programs will be created by some people having (at least…
matcauthon
  • 1,241
61
votes
3 answers

What's the difference between recursion and corecursion?

What's the difference between these? Recursion Corecursion On Wikipedia, there is little information and no clear code explaining these terms. What are some very simple examples explaining these terms? How is corecursion the dual of recursion?…
61
votes
16 answers

Why not write all tests at once when doing TDD?

The Red - Green - Refactor cycle for TDD is well established and accepted. We write one failing unit test and make it pass as simply as possible. What are the benefits to this approach over writing many failing unit tests for a class and make them…
RichK
  • 1,457
61
votes
11 answers

Are utility classes with nothing but static members an anti-pattern in C++?

The question Where should I put functions that are not related to a class has sparked some debate over whether it makes sense in C++ to combine utility functions in a class or just have them exist as free functions in a namespace. I come from a C#…
60
votes
10 answers

Is there such a thing as staying in a job too long?

After reading through a few "job hopping" related threads recently, I've been thinking how the opposite of job hopping can also be a problem. I've known many people (especially in large, relatively sluggish companies) who got comfortable in a cushy…
Bobby Tables
  • 20,576
60
votes
14 answers

What is the history of the use of "foo" and "bar" in source code examples?

Why do many code examples, especially tutorials, use the names "Foo" and "Bar" so often? It is almost a standard. For example: void foo(char* bar) { printf("%s", bar); }
user15453