4 ms·
> Code with so much dependency injection and general SOLID that you have to bounce all over the place to understand a very simple action. I find that happens w
by gwbas1c 2y ago
> Code with so much dependency injection and general SOLID that you have to bounce all over the place to understand a very simple action.
I find that happens when people get religious about patterns and methodology; without understanding the "why", the language, and how a computer works.
Case in point: I once worked on a C# project that used a port of Spring for dependency injection: Ultimately, it was near impossible to know when something was constructed, and what was calling what. There were classes that couldn't call themselves through "this" because of certain weird dependency injection features used.
Later, I decided to use dependency injection as a design pattern: Instead of a complicated DI framework, there was just a few files of code. It was very easy for newcomers to understand. It was also easy to swap in mock objects, and easy to swap dependencies based on the target platform. It was also easy to see when a dependency was constructed; because it wasn't hidden behind a giant framework.
- deleted 2y ago[deleted]