chunkyfunky
Hey, that highly technical process is valuable Intellectual Property owned by the McDonald's corporation, careful they don't come after you!
AFAIC, anything they can do to suppress the raving lunacy of people like the ones who convinced that poor man to leave hospital, may he rest in peace, is a good thing in my book.
This "Us vs Them" thing is bollox - we're all on the same team as far as I am concerned!
And, even though I have a good 20+ years of development behind me, I can honestly say that the two BEST engineering managers I ever had were people that could not have written a line of code to save their lives...they were just brilliant leaders and motivators who focused on me as an individual and trusted me enough to have the technical chops to get the job done whilst they meat-shielded us against waves of shite from the C-suite.
Well anyway, what would I know, I'm just a dumb-ass manager :)
I'm not sure I fully agree, unless we want to define waterfall as "anything where a bit of time is spent up-front to decide how a part of the system should work" :)
For me, waterfall is where every single aspect of the project is pre-defined, and cannot be changed during development without serious pain and lots of awful bureaucracy
But in the above workflow, there isn't anything stopping us from making a loop for example on a sprint by sprint basis, and using feedback from both the tests and changing requirements to improve the design, update the APIs, change the tests, etc.
I suppose we could argue that this is "mini-waterfall" but it works in my experience :)
So to me - and not wanting to speak for the OP of course - but the way I look at this is that the simple encouragement of "I made it and you can too" is more motivating than "I made it but then again looking back I had a ton of lucky coincidences that you probably won't have so, sure, try it, but don't expect success" :)
I was kind of making the same point as you did, that you don't need to use any kind of DI library to achieve the DIP, but that in something like ASP.Net it is there and simple to use.
If you're not using abstractions, you are not using the DIP. What is being described here with low-level modules depending on high-level modules is categorically not the DIP, and I am starting to wonder if this is perhaps part of the frustration that the poster we're replying to has experienced with DI, since turning your coupling upside down will have the same problems as just high coupling in general, except everything is upside down now and harder to read :)
Simply, this means that no implementation module, high or low, depends on any other implementation module, ever. It only ever depends on abstractions which are shared between modules.
I don't see how using a DI container can change the program execution order, unless one is misusing it terribly - after all, its sole purpose is to provide the correct concrete implementation of a dependency to an object at the time of its construction, the execution order from the perspective of the program is 100% preserved. Sure, maybe the container itself creates my graph in a non-deterministic way, but why would I care? If my program depends on this that's just bad design imo, no amount of libraries is going to save it :)
And the object graph is not obscured, in fact it is clarified, because you look at a class constructor and immediately can see what it's invariants are! And I have yet to come across a DI library that wouldn't immediately halt and catch fire if you introduced a circular dependency chain, so it's literally not possible to have these amorphous blobs (great expression though!) in any proper DI container.
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IMyDependency, MyDependency>();
}
Later on when for e.g. an APIController is instantiated, once you've declare a constructor dependency on IMyDependency, it gets resolved for you automatically and whatever concrete class is mapped to gets created and passed to the constructor.Outside of ASP.Net (console app for example) you can either do this manually, or you can get a ServiceCollection object from the framework, or you ca nuse a 3rd party DI library, etc.
Generally speaking if you don't configure this correctly you get a pretty simple message telling you that the container could not service the request for an IMyDependency or whatever and then it's pretty simple to figure out what you missed in the wire-up.
In C# the idiomatic way to achieve this is via constructor injection, which is made much easier to manage in ASP.Net with a DI library that works with the framework for you (either the built in one or AutoFac / SimpleInjector, etc.). But you don't have to use a library; many times I'm writing a simple-ish console app and just use good old "Poor Man's DI" where I manually construct my object graphs at startup.
You know, that's a pretty good idea. And if there were actual laws backing it, then you already have a "working" system. Now I am starting to wonder, should CoCs even try to transcend the law, is that part of the problem, where we try to legislate for things that are in many cases subjective?
But here's the thing; if one of my devs made a gaffe at a conference, they'd have the full weight of myself and the company defending them, they definitely would not find themselves alone facing some kangaroo court that answers only to itself :)
There really is only ever one thing to say in a situation like this, and it is "Yes, I refuse to participate any further in this farce; good day!" and then hang up. Personally I would not have been so polite :)
CoC committees are breeding grounds for idiots who think you can legislate for common sense and basic decency; and in my book that is a bridge that's worth burning every time.
I really hope the author finds some peace in all this, nobody deserves to be treated they way they have. And I hope that others who have found - and will in future find - themselves in this same situation, will have the courage to stand up to this kind of bullying by refusing to engage.
I think a large part of the problem here is that developers who learn to leverage a database only through an ORM are missing out, and really they should also learn SQL (literally the only part of the article that is still objectively correct is the author's advice to learn SQL) to gain a better understanding of when (and when not) to use an ORM. Every other complaint in the article is either classic misuse of the ORM, or else a shortcoming of the ORM in question.
I guess my point is that if you have to agonise over mock vs fake then really it's a sign that your design is not quite as testable as you might like :)
Surely though the current situation is as bad as it is because of other people's inability to manage themselves during an epidemic, as opposed to the government being to blame? I'm not having a poke, but I notice here in Ireland for example, when the government comes out with clear guidelines e.g. "Don't go around licking people's eyeballs. If you do you might get sick" then the general populace is all like "oh but it's so confusing! What if I only lick one of their eyeballs? What is the definition of 'might'? We need more guidance!". So then the guidance comes back "Do not lick people's eyeballs, ever" and BOOM - someone takes a constitutional challenge High Court because "Civil Liberties".
And I do think it's kind of the same in most countries, the government is not to blame, the general population is.
Just a thought :)