Should you memorize code?
Should you memorize code?
Obviously not.
Memorizing shit is a side effect, not a goal. Coding is about being able to think and find the information you need quickly, not about remembering whether the first parameter of array_map is callback or input.
If you don’t remember something, it’s because it doesn’t deserve a place in your head. If you look it up often enough, you’ll memorize it eventually.
Couldn’t agree more.
My favorite resource is PHP.net — not just the website in general, but more specifically, knowing that I can look up basically any function just by typing in php.net/function_name and it just works.
Ask yourself this: if other people don’t have to look stuff up, why does Stack Overflow exist?
It’s literally impossible to know everything.
PHP can be linked with so many libraries that knowing them all is not only a waste of time, there’s a new repository every day, new updates, upgrades and forks.
You learn by doing your job, slowly understanding common practices, learning to read a documentation and how to debug stuff.
30+ years in – I still look stuff up every single day. There is no way you will be able to remember everything, so get used to using Google, SO, ChatGPT or whatever.
Also once/if you expand to other programming languages you will probably end up trying to do PHP when you do Java or C#, because the syntax is similar, but not quite the same = google it!
So get your basics down instead and strengthen your Google-Fu – you WILL need it to build on your basic programming skills.