Dependency Injection and Code Smell cover image

Dependency Injection and Code Smell

In a Wonderland, Developers get more intellectual continuously. The code we wrote today ought to be superior to the code we wrote a year or two ago. Now-a-days we have better tools, more mature and modern programming language. Moreover, We possess better code style and practices than we had before. However, We realize this often in life that we are not in Wonderland. We have probably made our own Dependency Injection or used a tool like Dagger or Koin. Now, If you look at a random class in a codebase, how many fields are you injecting? If you have a class from a complex feature, the code might look like this: ...

March 19, 2021 · 4 min · SlothieSmooth