693
Sounds great in theory
(programming.dev)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Oh good grief. I haven't even heard of half of those, and I've been writing code longer than most interviewers.
After struggling with several DI frameworks, I've come to the conclusion that DI is far too opaque and unpredictable to be useful.
OOP is also intentionally opaque, mind you, but debuggers can see through it if necessary, so that's fine. DI, on the other hand, is opaque even to debuggers!
I much prefer using the same DBMS for tests as the one used in production. That way, I can use its special features (like arrays as query parameters), and avoid bugs resulting from differences between DBMSes (which would only appear in production).
Indeed, and you usually can. Even if your system involves a bunch of services that normally run on different machines, who says you can't spin up instances of them as part of the test? Tests are arbitrary code and can do anything that any other program can do, including starting subprocesses. Just be sure to terminate them once the test is finished, even if it fails.