A professor told me “The key to good design is experience. The key to experience is bad design.”
1) Don’t use global variables 2) Use interfaces liberally 3) Assume implementations will need to change
This gets you a lot of the way there.
A good plan is to keep the code as tidy as you can.