Know where you are going and what you are going to do.
Draw out a plan for your code before you start developing software for your next commit. This way, you’ll have a much stronger idea of what tests you need to write, what objects and methods to incorporate, and what services you need to integrate.
Having a plan is called software architecture. Always know where you are going. Coding aimlessly and randomly will lead to trouble, rework, and delays.
It is good to enlist help in designing your plan. If you can easily explain your strategy to another person, you know it is a good plan. On the other hand, if they squint and furrow their brows and can’t follow your line of thought, you need to improve or simplify your plan.