|
|
Think of "against" as in the context of a ladder leaning against a wall.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
DI is overrated. Programming "to" an interface is fine when you have a real use case to abstract different implementations that you may want to switch between when service A (or controller A) needs to support service implementations S1, S2, and S3. For example, you might have several document store services, one for AWS buckets, one for your own document server, one for storing documents as blobs in a DB and different ones get instantiated on the fly depending on other factors.
That said, one can code an application into interface hell, where everything has an interface and almost nothing needs an interface because there's only ever going to be one concrete implementation of the service.
Happily, in .NET Core for example, the DI engine doesn't require interfaces - you can specify "this service is implemented by its concrete type" rather than always having to say "this service implements this interface."
I have literally chucked out thousands of lines of interface code (I pity the programmer that wrote all that crap -- it wasn't me) because they were glommed onto the "DI must be done with interfaces" not realizing they were making pointless work for themselves because the never ever would have multiple concrete implementations for the interface abstraction.
Know when to use an interface rather than always use an interface. Much like, um...
|
|
|
|
|
Marc Clifton wrote: Know when to use an interface rather than always use an interface. Much like, um...
Having an interface as an abstract class (in C++ - all functions are pure virtual) and deriving the implementation class(es) from it can aid your thinking in that everything that is exposed to the caller must be defined in the base class. I find that it is very useful as an implementation-hiding technique.
My DLLs tend to have the following APIs:
IFoo* CreateFooInterface(<parameters>);
void DestroyFooInterface(IFoo*);
(Calls to the methods of an IFoo object)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Thank you very much for this
|
|
|
|
|
#Worldle #322 2/6 (100%)
π©π©π©π¨β¬βοΈ
π©π©π©π©π©π
https://worldle.teuteuf.fr
Knew it was in Africa
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 539 4/6
β¬β¬β¬β¬β¬
β¬π¨β¬π¨β¬
π¨β¬β¬π¨π¨
π©π©π©π©π©
|
|
|
|
|
Wordle 539 6/6
β¬β¬β¬β¬β¬
β¬π¨β¬β¬π¨
β¬β¬π©π¨β¬
β¬π©π©β¬β¬
π©π©π©β¬β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 539 2/6
β¬β¬π©β¬β¬
π©π©π©π©π©
Well, that was unexpected ...
Perhaps I should buy a lottery ticket?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 539 3/6
π¨β¬β¬π¨β¬
β¬π©β¬π©π©
π©π©π©π©π©
|
|
|
|
|
π¨β¬β¬π¨β¬
β¬π¨π¨β¬π¨
π©π©π©π©π©
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming βWow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 539 5/6
β¬β¬β¬π¨β¬
β¬π¨π¨β¬β¬
π¨β¬β¬β¬β¬
π¨β¬π©π¨β¬
π©π©π©π©π©
Looked it up.
Only one word popped up with my letters, and I simply didn't see it
|
|
|
|
|
Wordle 539 6/6
β¬β¬β¬β¬β¬
π¨π¨β¬β¬β¬
β¬β¬π¨β¬π¨
β¬β¬π©π¨β¬
π¨β¬π©β¬π¨
π©π©π©π©π©
I just barely made it! Phew!
Get me coffee and no one gets hurt!
|
|
|
|
|
Wordle 539 3/6
β¬π©β¬β¬β¬
π©π©β¬π©π©
π©π©π©π©π©
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Doesn't look like much has changed in the month I've been gone.
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
Nope same group of JackSklaWagons.
|
|
|
|
|
Welcome back. If you donβt mind me askingβ¦ where did you go?
|
|
|
|
|
Hawaii, Samoa and Tahiti
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
I hate you a little right now.
|
|
|
|
|
Mike Hankey wrote: Hawaii, Samoa and Tahiti
I know you took some nice pictures...
|
|
|
|
|
Processing them now
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
Wasn't that a silver photo phenomenon?
|
|
|
|
|
Sweet. Been to Hawaii, but not Samoa or Tahiti. Look at them on Google Earth and wish I was there.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Mike Hankey wrote: Tahiti
It's a magical place.
|
|
|
|
|
PIEBALDconsult wrote: It's a magical place.
Agreed
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|