Reputation
781
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 12
Newest
 Custodian
Impact
~59k people reached

  • 0 posts edited
  • 1 helpful flag
  • 57 votes cast
Nov
18
comment Can you explain me why multiple threading need lock?
I've updated my answer to address some of these concerns: yes, you can make the operation atomic, but no, even on architectures that support it, it won't be atomic by default, and there are situations where atomicity isn't enough and full serialization is needed. Locking is the only mechanism I'm aware of for achieving full serialization.
Nov
18
revised Can you explain me why multiple threading need lock?
Added information on atomic operations
Nov
18
awarded  Nice Answer
Nov
17
answered Can you explain me why multiple threading need lock?
Sep
4
answered Should interfaces extend (and in doing so inherit methods of) other interfaces
Sep
4
awarded  Commentator
Sep
4
comment Should interfaces extend (and in doing so inherit methods of) other interfaces
The usual language is that an interface "extends" its parent, and (in doing so) "inherits" the methods of the parent interface, so I'd recommend using "extend" here.
Jul
27
revised When is it not appropriate to use the dependency injection pattern?
clarified meaning
May
13
comment What is meaning of a HINT when used in software engineering?
@AaronAnodide I'd say the answers you've gotten are good enough to justify keeping the question: it makes the internet better for anyone else that wonders whether "hint" has a special meaning in software engineering, and looks for a definition.
Apr
16
comment Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
-1 for "There's no correct way to do this". There are several correct ways. Doubling the number of methods when you add a feature as the OP was doing is an unscalable approach, and the alternative suggested here is equally unscalable, just with regard to database size rather than number of query features. Scalable approaches do exist, see the other answers.
Apr
7
revised Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
fixed formatting
Apr
6
answered Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
Mar
8
answered Should I use the Date type in JAX-RS @PathParam?
Feb
22
awarded  Critic
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
SRP = single responsibility principle, for anyone else wondering.
Feb
22
revised When is it not appropriate to use the dependency injection pattern?
clarified wording
Feb
22
revised When is it not appropriate to use the dependency injection pattern?
It's possible to do DI testing without creating a ridiculous amount of coupling, edited to reflect that.
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
There wouldn't be so much cost to having an extra constructor used for testing only that allows the dependencies to be injected. I'll try to revise what I said.
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
You misunderstand, I'm not talking about when you inject a mock, I'm talking about the real code. Consider class A with dependency B, which in turn has dependency C, which in turn has dependency D. Without DI, A constructs B, B constructs C, C constructs D. With construction injection, to construct A, you must first construct B, to construct B you must first construct C, and to construct C you must first construct D. So class A now has to know about D, the dependency of a dependency of a dependency, in order to construct B. This leads to excessive coupling.
Feb
21
answered When is it not appropriate to use the dependency injection pattern?