There is a simple principle: to understand code easily, you must be able to read it like a text.
The basics of writing such code is to write code lines that could be read like English natural language sentences, and then actually mean what your code means. This is much about naming variables and methods [...]