Coding Tactic: Lazy Initialization
Sometimes you’ll need to initialize a resource before you can use it, such as another object or a network connection.
When you hold off on initializing it until it’s needed, we call that “lazy initialization”.
Here’s two ways to implement it. The one on the right cleans things up by doing it as an early call.