This is merely one instance/example of a deeper principle: avoid mixing layers of abstraction
There is also this gem in the post:
You shouldn’t be mocking your methods, you should mock your IO. And, similarly, you shouldn’t test methods, but rather software functionality
I totally agree! With containers you might not even have to mock your IO but can check if the application behaves correctly.
Unit and method tests are still useful to quickly find where the issue occured. If you just test the input and output of the program, no its individual units, then in an error case you still need to figure out where it exactly went wrong. So in short, its not just to check if program behaves correctly, unit tests also helps debugging.
This is saying if you have a module with public functions A and B, they shouldn’t call each other, right? But it’s not saying that module A shouldn’t call module B’s public functions. That’s what I thought it meant at first, but that seems crazy.
Yes, I read it as the first too. They don’t go into cross-boundaries at all.
I think the headline doesn’t convey the substance of the article, but this is spot on. I just ran into a small, fixable problem my developers had created by doing that just this week.
It was easily fixed, but it shouldn’t have been done that way in the first place.
It seems that the more we try to move away from MVC, the more we rediscover the reasons it exists.
Ironically in this case the bug was in the MVC controller and fixed as part of a ports-and-adapters AOP audit implementation. MVC isn’t immune to it. It was a controller endpoint calling another controller endpoint, because someone was doing a bit of business logic there rather than in the service.
Yes, had they implemented MVC properly they wouldn’t have done that. Anyway your point is well taken but as it happens in this case, the deities of irony conspired against you today.
I think the headline doesn’t convey the substance of the article
I see two reasons this could be: a) either it is by design, so people click and read it, or b) he couldn’t figure out a good and short title that conveys the article. So in other words either clickbait or skill issue. :D (I’m just joking here!)




