Most Popular

1500 questions
62
votes
11 answers

Earning extra cash as a programmer

I work as fulltime programmer and have a pretty well paid job for the country where I live, but I could do with a bit of extra cash at the moment (wife nagging about new kitchen etc.). I'd be interested in taking on small projects in my spare time.…
Anon
  • 637
  • 1
  • 6
  • 3
62
votes
10 answers

Is it bad practice to use a C++ compiler just for function overloading?

So I am working on a software design using C for a certain processor. The tool-kit includes the ability to compile C as well as C++. For what I am doing, there is no dynamic memory allocation available in this environment and the program is overall…
Snoop
  • 2,718
  • 5
  • 24
  • 52
62
votes
11 answers

Should I define the relations between tables in the database or just in code?

In my experience, many of the projects I have read in the past didn't have relationship definitions in the database, instead they only defined them in the source code. So I'm wondering what are the advantages/disadvantages of defining relations…
Yoshi
  • 747
  • 1
  • 5
  • 7
62
votes
7 answers

Why does the relational model for a database matter?

I am approaching a project where I'll be having to implement a database with my boss; we're a very small start up so the work environment is deeply personal. He had given me one of the company databases before and it completely went against what I…
8protons
  • 1,359
  • 1
  • 10
  • 27
62
votes
5 answers

Why are large amounts of magic numbers acceptable in CSS and SVGs?

Often times I see questions on the Hot Network Questions list like this that basically ask "how do I draw this arbitrary shape in CSS". Invariably the answer is a couple of blocks of CSS or SVG data with a bunch of seemingly random hard-coded values…
62
votes
4 answers

Trying to understand P vs NP vs NP Complete vs NP Hard

I am trying to understand these classifications and why they exist. Is my understanding right? If not, what? P is polynomial complexity, or O(nk) for some non-negative real number k, such as O(1), O(n1/2), O(n2), O(n3), etc. If a problem belongs to…
Nakano
  • 731
  • 1
  • 6
  • 7
62
votes
1 answer

null vs missing key in REST API Response

Say in my application, some users give us their last name, and others do not. In a REST API response, which body is preferred: With a "null" value: {"firstName": "Bob", "lastName": null} Or just a missing key: {"firstName": "Bob"}
jtmarmon
  • 958
  • 1
  • 8
  • 12
62
votes
4 answers

What is language-agnosticism and why is it called that?

When is something language agnostic? Why is it called that?
Louis Rhys
  • 6,042
  • 11
  • 42
  • 59
62
votes
10 answers

Is it premature optimization to add database indices?

A colleague of mine today suggested that we go through all of the queries in our application and to add indices accordingly. I feel this is premature optimisation because our application is not even released yet. I suggested to monitor for slow…
Marco de Jongh
  • 897
  • 6
  • 13
62
votes
4 answers

Appropriate Git workflow for multiple active releases while handling hotfixes

I'm trying to choose a Git workflow that is most appropriate for our product. Here are the parameters: We do a few major releases a year, let's say 10 at the most We have multiple versions of our product active at the same time (some people are on…
Rocket04
  • 1,066
  • 1
  • 9
  • 11
62
votes
8 answers

Securing sensitive data from developers

I have an enterprise application running that uses both MySQL and MongoDB datastores. My development team all have SSH access to the machine in order to perform application releases, maintenance, etc. I recently raised a risk in the business when…
Clinton Bosch
  • 754
  • 6
  • 9
62
votes
12 answers

Is there any logical reason to auto-generate code documentation?

Automatic documentation generation can be done with a variety of tools, GhostDoc being one of the more prominent. However, by definition, everything it generates is redundant. It takes a look at names of methods, classes, etc. and outputs English…
Jez
  • 1,308
  • 2
  • 10
  • 19
62
votes
6 answers

Why was C# made with "new" and "virtual+override" keywords unlike Java?

In Java there are no virtual, new, override keywords for method definition. So the working of a method is easy to understand. Cause if DerivedClass extends BaseClass and has a method with same name and same signature of BaseClass then the overriding…
62
votes
6 answers

Why is CPU cache memory so fast?

What makes CPU cache memory so much faster than main memory? I can see some benefit in a tiered cache system. It makes sense that a smaller cache is faster to search. But there must be more to it.
ConditionRacer
  • 5,682
  • 6
  • 38
  • 56
62
votes
1 answer

Are go-langs goroutine pools just green threads?

The commentator here offers the following criticism of green threads: I was initially sold on the N:M model as a means of having event driven programming without the callback hell. You can write code that looks like pain old procedural code but…
hawkeye
  • 4,819
  • 3
  • 24
  • 35