Most Popular
1500 questions
55
votes
7 answers
Are there known valid uses of SLOC to measure productivity?
I had an unusual, brief conversation with a very senior architect about dynamic and static languages. He said that company data shows that there is evidence for higher productivity when static languages are used. Note, it's a large company with long…

sevo
- 621
- 5
- 7
55
votes
4 answers
Are the development benefits of using Docker negated when using Java compared to other languages closer to Unix binaries?
I had a friend who said:
Docker is amazing. You can use it to replicate production and all its quirks on your local machine. Then you can deploy that instance straight through all the staging workflows super-quick.
Now this would be true if the…

hawkeye
- 4,819
- 3
- 24
- 35
55
votes
6 answers
Is using Lambda expressions whenever possible in java good practice?
I have recently mastered the Lambda expression that was introduced in java 8. I find that whenever I am using a functional interface, I tend to always use a Lambda expression instead of creating a class that implements the functional interface.
Is…

SteelToe
- 1,539
- 3
- 13
- 22
55
votes
10 answers
Why would the 'final' keyword ever be useful?
It seems Java has had the power to declare classes not-derivable for ages, and now C++ has it too. However, in the light of the Open/Close principle in SOLID, why would that be useful? To me, the final keyword sounds just like friend - it is legal,…

Vorac
- 7,073
- 7
- 38
- 58
55
votes
5 answers
Is it still valid to speak about anemic model in the context of functional programming?
Most of DDD tactical design patterns belong to object-oriented paradigm, and anemic model describes the situation when all business logic is put into services rather than objects thus making them a kind of DTO. In other words anemic model is a…

Pavel Voronin
- 1,640
- 1
- 18
- 25
55
votes
4 answers
How much stack usage is too much?
Lately when I've been writing C or C++, I'll declare all my variables on the stack just because it's an option, unlike with Java.
However, I've heard that it's a bad idea to declare large things on the stack.
Why exactly is this the case? I…

Elliot Way
- 661
- 1
- 5
- 5
55
votes
7 answers
Why is chaining setters unconventional?
Having chaining implemented on beans is very handy: no need for overloading constructors, mega constructors, factories, and gives you increased readability. I can't think of any downsides, unless you want your object to be immutable, in which case…

Ben
- 1,002
- 2
- 10
- 11
55
votes
4 answers
Why do we need frameworks for dependency injection?
I've been reading up more on the Inversion of Control principle and Dependency Injection as an implementation of it and am pretty sure I understand it.
It seems to be basically saying 'don't declare your class members' instantiations within the…

timsworth
- 661
- 1
- 5
- 6
55
votes
12 answers
Why would a program require a specific minimum number of CPU cores?
Is it possible to write code (or complete software, rather than a piece of code) that won't work properly when run on a CPU that has less than N number of cores? Without checking it explicitly and failing on purpose:
IF (noOfCores < 4) THEN don't…

uylmz
- 1,129
- 1
- 8
- 17
55
votes
8 answers
Why design a modern language without an exception-handling mechanism?
Many modern languages provide rich exception handling features, but Apple's Swift programming language does not provide an exception handling mechanism.
Steeped in exceptions as I am, I'm having trouble wrapping my mind around what this means. Swift…

orome
- 703
- 1
- 5
- 10
55
votes
3 answers
What is a lambda, and why would it be useful?
So far I heard about :
Lambda calculus
Lambda programming
Lambda expressions
Lambda functions
Which all seems to be related to functional programming...
Apparently it will be integrated into C++1x, so I might better understand it…

jokoon
- 2,262
- 3
- 19
- 27
55
votes
3 answers
What are the advantages of Scala's companion objects vs static methods?
Scala has no static-keyword, but instead has similar functionality through companion objects. Behind the scenes the companion objects are compiled to classes that have static methods, so all this is syntactic sugar. What are the advantages of this…

Zavior
- 1,334
- 2
- 11
- 18
55
votes
10 answers
Doesn't "if (0 == value) ..." do more harm than good?
This is one of the things that I hate most when I see it in someone else's code. I know what it means and why some people do it this way ("what if I accidentally put '=' instead?"). For me it's very much like when a child goes down the stairs…

mojuba
- 5,583
- 2
- 24
- 32
55
votes
8 answers
Why would one bother marking up properly and semantically?
Note that I (try) to mark up as semantically as possible because I like they way it looks and feels, but not because I'm aware of any other stunning advantages. The point of my question is to be able to educate others
Well, I've seen a lot of…

Madara's Ghost
- 8,787
- 9
- 25
- 33
55
votes
18 answers
How to manage a developer who has poor communication skills
I manage a small team of developers on an application which is in the mid-point of its lifecycle, within a big firm. This unfortunately means there is commonly a 30/70 split of Programming tasks to "other technical work". This work…

djcredo
- 534
- 1
- 6
- 10