Most Popular

1500 questions
97
votes
6 answers

Difference between a service class and a Helper class

I would like to know what differentiates a Service class from a utility class or a helper class? A class only with underlying methods calls the dao's is a service? Doesn't the usage of Helper classes violates SRP?
tintin
  • 1,243
96
votes
10 answers

Why do programmers still use mailing lists?

Why do many open source projects collaborate primarily through mailing lists rather than through, say, forums? I may be ignorant in my assessment, but I, along with my communication teacher, think mailing lists are rather inefficient: It's hard to…
Joey Adams
  • 5,585
96
votes
19 answers

Why does TDD work?

Test-driven development (TDD) is big these days. I often see it recommended as a solution for a wide range of problems here in Programmers SE and other venues. I wonder why it works. From an engineering point of view, it puzzles me for two…
CesarGon
  • 2,981
96
votes
19 answers

Why are unit tests failing seen as bad?

In some organisations, apparently, part of the software release process is to use unit testing, but at any point in time all unit tests must pass. Eg there might be some screen which shows all unit tests passing in green - which is supposed to be…
user619818
  • 1,767
  • 2
  • 14
  • 23
96
votes
12 answers

What is meant by the phrase “Software can replace hardware”?

Studying beginners course on hardware/software interface and operating systems, often come up the topic of if it would be better to replace some hardware parts with software and vice-versa. I can't make the connection.
96
votes
13 answers

How to warn other programmers of class implementation

I'm writing classes that "must be used in a specific way" (I guess all classes must...). For example, I create the fooManager class, which requires a call to, say, Initialize(string,string). And, to push the example a little further, the class would…
Gil Sand
  • 2,173
96
votes
8 answers

Why would you store an enum in DB?

I've seen a number of questions, like this, asking for advice on how to store enums in DB. But I wonder why would you do that. So let's say that I have an entity Person with a gender field, and a Gender enum. Then, my person table has a column…
user3748908
  • 1,627
96
votes
6 answers

Shared domain model between different microservices

Imagine a scenario of two different microservices. One to handle Authentication within the service, the other one takes care of User Management. They both have a concept of a User, and will talk about Users through calls to each other. Where would…
Kristof
  • 2,231
96
votes
13 answers

Should the commit history be used to convey critical information to developers?

During a meeting regarding the rollback of a third-party SDK from the latest version it was noted that the our developers already flagged in the commit history that the latest version should not be used. Some developers argued that this was a bad…
rjzii
  • 11,274
96
votes
17 answers

Is imposing the same code format for all developers a good idea?

We are considering to impose a single standard code format in our project (auto format with save actions in Eclipse). The reason is that currently there is a big difference in the code formats used by several (>10) developers which makes it harder…
Stijn Geukens
  • 666
  • 2
  • 7
  • 12
96
votes
5 answers

Why are there no package management systems for C and C++?

There are some programming languages for which exist a package management system: CTAN for TeX CPAN for Perl Pip & Eggs for Python Maven for Java cabal for Haskell Gems for Ruby npm for NodeJS bower for frontend Javascript & CSS nuget for…
m0nhawk
  • 1,490
96
votes
8 answers

Return magic value, throw exception or return false on failure?

I sometimes end up having to write a method or property for a class library for which it is not exceptional to have no real answer, but a failure. Something cannot be determined, is not available, not found, not currently possible or there is no…
96
votes
5 answers

Why do we need to put private members in headers?

Private variables are a way to hide complexity and implementation details to the user of a class. This is a rather nice feature. But I do not understand why in c++ we need to put them in the header of a class. I see two annoying downsides to…
Simon Bergot
  • 7,970
  • 4
  • 35
  • 55
96
votes
15 answers

What makes C so popular in the age of OOP?

I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java. TIOBE Programming Community Index I'm curious as to why, in this age of OOP, C is still so popular? Note that 4 out of the top 5…
mmirzadeh
  • 599
  • 1
  • 5
  • 5
95
votes
8 answers

Adding a new developer just before deadline is horrible. But what is not?

Imagine a project is assigned to a team, deadline is estimated as 8 months. After 6 months it becomes apparent the project will most certainly not be complete on time(e.g a law changes or a hidden monumental hurdle is discovered, the lead dev gets…
Vorac
  • 7,129