Today I was helping a student learning how to code, and I told him to describe what he wanted to do.
once he finished, I replied to him: “Good. If you can describe it to someone, you can code it”, and in fact that’s true.
Often we code without thinking about what the code does. We go in autopilot.
But if we stop, the code “talks”. It’s a logic that can be easily described in words unless we’re talking about algorithmic stuff.
Therefore when you’re in trouble or want to learn, try to describe what you want to do, and split it into smaller parts until the parts are so small that are easy to code.