Reputation
791
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
Apr
25
comment When is it not appropriate to use the dependency injection pattern?
@Sprague Dependency injection moves around dependencies in a slightly negative-sum game, if you apply it in cases where it shouldn't be applied. The purpose of this answer is to remind people that dependency injection is not inherently good, it is a design pattern that is incredibly useful in the right circumstances, but an unjustifiable cost in normal circumstances (at least in the programming domains I've worked in, I understand in some domains it's more frequently useful than in others). DI sometimes becomes a buzzword and an end in itself, which misses the point.
Feb
11
reviewed No Action Needed Is providing a user login a functional requirement of a system?
Feb
11
reviewed Reviewed Zero Downtime Deployment - Transitional Db Schema
Jan
27
reviewed No Action Needed How do I minimize the number of database queries in a GeoJson API (of countries, and smaller areas) with custom data?
Jan
27
awarded  Custodian
Jan
27
awarded  Citizen Patrol
Oct
26
comment When is it not appropriate to use the dependency injection pattern?
@RichardTingle The major upside of that approach is that you're very independent of your data source. The major downside is that when you receive the wrong data, you have to figure out where the data came from.
Oct
26
comment When is it not appropriate to use the dependency injection pattern?
@RichardTingle Sure, it's usually desirable to construct your dependencies yourself, which is part of what my answer is saying. I think the benefit usually comes when you wish your code didn't have to know how to retrieve some piece of data, e.g. with Guice, to produce a greeting you can write @Provides @Greeting public static void String helloDI(@Inject @Name toGreet) { return "Hello " + toGreet + "!";}, as long as at least one function (whose dependencies are available) @Provides @Name.
Oct
19
awarded  Nice Answer
Apr
14
awarded  Nice Answer
Feb
11
awarded  Yearling
May
29
awarded  Informed
Feb
10
awarded  Yearling
Mar
23
comment How to create a Web app that “interacts” with email?
Do remember that anyone can spoof the from field, so you shouldn't design a system this way if there's any potential for benefit by third parties, or potential for serious harassment to your clients. If there is, you probably need something more secure than email.
Feb
11
awarded  Yearling
Dec
17
awarded  Quorum
Dec
15
revised Why is multithreading often preferred for improving performance?
grammar
Dec
15
revised Why is multithreading often preferred for improving performance?
Another spot I missed finishing
Dec
15
answered Why is multithreading often preferred for improving performance?
Nov
18
comment Can you explain me why multiple threading need lock?
The quote looks much more applicable for threads to me (with the words/characters being printed out of order due to threading issues). But there's currently an extra "s" in the output, which suggests the code has three problems.