Do we need to remember language syntax by-heart?

This is regarding my experience with one of the interviews I had a long time back, with a company which was recruiting for a California based Giant. I'm planning to make it a series, write about my other failed interviews if I get enough motivation.

I got the idea to write this when I saw this talk yesterday. Likewise, I'll write about my opinions regarding that talk, in a separate blog post.

The position was for a Python developer with some experience on front-end technologies. I actually fit in that considering I wrote and contributed to several python based projects and I do have fairly good front-end experience.

When I was at Hashcube, I was working on web games. When we moved to mobile, I completely moved to Javascript and Node. Till then all I knew in Javascript was just tinkering here and there with jQuery. Then I started learning JS in vanilla-pure-without any libraries form, and started loving the language. In the process, over 3-4 years, I improved my programming skills as well as my understanding of Javascript. Meantime contributed to several open source projects including the very own game engine we used to create mobile games - Game Closure.

Even though I mostly use Javascript, I used Python here and there for scripting. Also, when Amazon Alexa launched, Hashcube decided to pursuit the possibility of a new gaming platform there. I was in charge of developing a basic game. I put together one using Flask-ASK, which is an Alexa wrapper for the popular python based Flask server framework. But overall use of python use was negligible. Over the years, I forgot how to write python, as in, forgot the syntax for basic things, like how to write a loop. I even started to add ; to each and every line - the Javascript effect.

I'm in a stage right now where I can work on any high level language because of the programming skills I acquired over the years. I am guessing that is true for everyone after passing a certain point of their developer life.

Coming back to the interview, the first round was over phone - to evaluate basic logical skills. Then the second one to solve a problem in python - offline, so I have all the freedom to check internet and refresh python. I cleared both.

The Third stage was a one to one video interview with one of the team members. I tanked. The problem given to me was an easy one, which can be solved with a loop. The syntax which anyone with a couple of days of python experience could write. What happened is, I forgot the syntax for a loop. I went blank on how to write a for loop in python. Even though I wrote pseudocode, that wasn't enough.

I believe the interviewer would have thought, how did this guy even reached 3rd stage.