SPOILER ALERT: you can't!
And the best part is that to be a good developer you don't even have to!
π I'm sharing this because at some point in my developer journey I thought I needed to remember everything I learned by heart.
π‘ But we don't know every single word in English and we can still speak it right? That's because to speak a language, whether it be a natural language or a programming language, if you focus on the most important and commonly used words you will be considered fluent. Everything else is secondary and can be looked up in the dictionary. For ex, if you are traveling to Spain and can't speak Spanish won't you rather learn how to say "Where is the bus?" than "Xylophones are amazing?"
π Syntax + Grammar rules + Core Vocabulary > Random Vocabulary
π The same applies to programming! Some things are like core vocabulary that will help you get around, and some things can be kept in your notes for reference only when you need them. Not everything you learn should be memorized. If you won't use it on a consistent basis turn it into a code snippet with a thorough explanation and you'll be fine.
π‘ For example, instead of trying to memorize all the methods of Arrays, you can learn the most essential (adding, deleting, slicing) by heart and read/make notes about the rest and know what they do. Only memorize on a need-to-know basis.
π Do you take a lot of notes when you code? What apps do you use? Share in the comments!