Most Popular

1500 questions
238
votes
10 answers

Is there a name for the (anti- ) pattern of passing parameters that will only be used several levels deep in the call chain?

I was trying to find alternatives to the use of global variable in some legacy code. But this question is not about the technical alternatives, I'm mainly concerned about the terminology. The obvious solution is to pass a parameter into the…
RubenLaguna
  • 1,882
  • 2
  • 12
  • 11
237
votes
9 answers

Is it normal to spend as much, if not more, time writing tests than actual code?

I find tests a lot trickier and harder to write than the actual code they are testing. It's not unusual for me to spend more time writing the test than the code it is testing. Is that normal or am I doing something wrong? The questions “Is unit…
springloaded
  • 2,123
237
votes
33 answers

Will high reputation in Stack Overflow help to get a good job?

In a post, Joel Spolsky mentioned that 5 digit Stack Overflow reputation can help you to earn a job paying $100k+. How much of that is real? Would anyone like to share their success in getting a high paid job by virtue of their reputations on Stack…
237
votes
17 answers

Torvalds' quote about good programmer

Accidentally I've stumbled upon the following quote by Linus Torvalds: "Bad programmers worry about the code. Good programmers worry about data structures and their relationships." I've thought about it for the last few days and I'm still…
beyeran
  • 1,052
235
votes
25 answers

How do I prevent Scrum from turning great developers into average developers?

I found this also happened in my team although he may have exaggerated the situation a little bit. Scrum is a way to take a below average or poor developer and turn them into an average developer. It's also great at taking great developers and…
233
votes
31 answers

Why do ads for s/w engineers always say they "offer a fast-paced environment"?

Who wants to work in a fast-paced environment? Not me! I want a civilized environment where people have a sense of balance. Higher quality work gets done that way and work life isn't full of stress and anguish.
233
votes
15 answers

New developer can't keep up with branch merges

I am the new developer - this is my first programming position. My issue is this: We use git - I cut a branch from our develop branch, then I start working on the minor task I've been assigned. It's very slow, because I'm inexperienced. By the time…
K--
  • 2,529
231
votes
9 answers

Why do people hesitate to use Python 3?

Python 3 was released in December 2008. A lot of time has passed since then but still today many developers hesitate to use Python 3. Even popular frameworks like Django are not compatible with Python 3 yet but still rely on Python 2. Sure, Python 3…
Ham Vocke
  • 2,477
231
votes
19 answers

Why is naming a table's Primary Key column "Id" considered bad practice?

My t-sql teacher told us that naming our PK column "Id" is considered bad practice without any further explanations. Why is naming a table PK column "Id" is considered bad practice?
230
votes
7 answers

What is wrong with magic strings?

As an experienced software developer, I have learned to avoid magic strings. My problem is that it is such a long time since I have used them, I've forgotten most of the reasons why. As a result, I'm having trouble explaining why they're a problem…
Kramii
  • 14,069
  • 5
  • 45
  • 64
229
votes
8 answers

When do you use float and when do you use double

Frequently, in my programming experience, I need to make a decision whether I should use float or double for my real numbers. Sometimes I go for float, sometimes I go for double, but really this feels more subjective. If I would be confronted to…
Jakub Zaverka
  • 2,439
  • 2
  • 15
  • 8
227
votes
6 answers

How much should I be using 'let' vs 'const' in ES6?

I've been writing a lot of ES6 code for io.js recently. There isn't much code in the wild to learn from, so I feel like I'm defining my own conventions as I go. My question is about when to use const vs let. I've been applying this rule: If…
callum
  • 10,417
227
votes
12 answers

Strategy for keeping secret info such as API keys out of source control?

I'm working on a website that will allow users to log in using OAuth credentials from the likes of Twitter, Google, etc. To do this, I have to register with these various providers and get a super-secret API key that I have to protect with pledges…
Ripped Off
  • 3,757
225
votes
3 answers

Why doesn't HTTP have POST redirect?

HTTP redirects are done via HTTP codes 301, and 302 (maybe other codes also) and a header field known as "Location" which has the address of the new place to go. However, browsers always send a "GET" request to that URL. However, many times you…
Saeed Neamati
  • 18,210
225
votes
11 answers

Why do we need so many classes in design patterns?

I am junior developer among seniors and am struggling a lot with understanding their thinking, reasoning. I am reading Domain-Driven Design (DDD) and can't understand why we need to create so many classes. If we follow that method of designing…
user1318496
  • 1,797