It‘s called software engineering.
It was very helpful. I would have appreciated “how to create a maintainable codebase” as well though. “Singleton” was not a part of my vocabulary until 3 years into my career :/
If you are a more old-school style programmer, you simply use the older term "global variable". :-)