As you can see, each language or technology has its own version of finding the length of a string. This is an indicator that it’s really difficult to memorize the same function in 12 alternatives.
It’s very unlikely that a developer who’s used multiple programming languages can memorize all the syntax that they have used in the past. They may even not bother trying to learn it in the first place.
Is Syntax So Important That I Have to Memorize It?
To answer this, let’s check what some senior developers say.
I wrote 255 lines of code that included a working server and a client. I queried google 23 times mostly landing on StackOverflow, Netty 4 website, GitHub, and JavaDocs. If you do the math, that averages out to 1 query every 10 lines of code! I had no idea. — Umer Mansoor
These admissions should give you courage — you don’t have to be ashamed that you can’t remember every detail of the syntax.
This is something that many junior developers may be concerned about. The truth is, you really do not have to memorize everything as you go.
Not even tech recruiters care about that. Here’s the response that an engineering director at Google gave regarding this:
Here’s another quote from a comment on Hacker News:
I not only use Google frequently, I use it to search for things I myself have written in the past.
I can’t count the number of times I’ve Googled for a programming question where the answer is found on a Stack Overflow page I’ve written. If it’s a particularly old answer that I’ve completely forgotten, I’ve even thought to myself, “Wow this genius sounds just like me!” as well as “This idiot has no clue what he’s talking about!” .