Coding Blocks cover image

Clean Code – How to Build Maintainable Systems

Coding Blocks

00:00

You Can't Just Inject It, Right?

Lazy init instantiation is a way of creating an object that only needs to be used when it's needed. This method locks yourself into one type, so if you ever need to change the class or anything like that your application can't just inject it. I've goten away from using constructors cause i'm kind of leaning towards more this idea that the object shouldt know what it needs,. cause it doesn't necessaryty know what it's how it's going to be used. Don't spread out a lot of different configurations, some in x el files, some in jason files,Some in the data base, some somewhere else.

Play episode from 27:44
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app