I have a mantra at this current point in my life:
If you need documentation to explain your code, your code is too complicated, but if you can’t create the documentation with ease, your logic is too complicated.
I have been reading “Introduction to systems analysis and design, an agile iterative approach”. And it has reinforced that mantra in the way I approach my development.
Planning is a very important part of development. I encourage all developers to pause and take some time to plan your code before you actually put any code to screen.
Also take the time to learn how other developers plan their work. Many use UML as a solution for planning their projects.
When you plan you allow for a big picture approach. Think about the code as a piece to a whole.
The logic should feel simple by the time you start adding code.
Documentation is good to have, especially if you need another developer to take over a project. It lessens the bus factor. I find documentation has become less as a means to explain code, and more of a means to understand the logic of the whole project.