If you cannot write "basic syntax" for any language then you are not a programmer, and certainly not a software engineer? This is not a value judgement, it's ok (probably good tbh) to not be a programmer. But you are wasting everyone's time by interviewing for a programming position in this case.
Like sure, I can probably write some python, but will it be pythonic? I might still be Java-minded for a while, trying to OOP my way into solutions.
Earlier today I needed to write some PHP and couldn't remember if it used length, count, or size. I had to look it up. I've been doing this for 20 years.
I once got the method invocation syntax wrong for PHP in an interview. I'd written thousands of lines of PHP and had most-recently written some the week before.
This, despite starting off my programming journey in editors with no hinting or automatic correction. If anything, I've gotten even worse about remembering syntax as I've gotten better at the rest of the job, but I was never great at it.
I rely on surrounding code to remind me of syntax and the exact names of basic things constantly. On a blank screen without syntax hints and autocompletion, or a blank whiteboard, I'm guaranteed to look like a moron if you don't let me just write pseudocode.
Been paid to write code for about 25 years. This has never been any amount of a problem on the job but is sometimes a source of stress in interviews and has likely lost me an offer or two (most of the sources of stress in an interview have little to do with the job, really)
I've also started requiring minimum of $300/hr compensation for interviews of my time, newly, so far no success though I'm fine with dying on that bridge or requiring at least a new type of interview process.
There are people who just can't program for whatever reason, regardless of whether they could previously. And they constantly try to interview at a programming position.
As I have been using the AI natural language-as-an-interface coding tools I have gone into the IDE to actually write code a lot less. I read more; and reading is not the same skill as writing. I couldn't remember the syntax as much and by what I mean is some of the simple things like in python to iterate over an object is it an iteritems() or is there a dot between or things like that, and can I do a for index, key in array, and do I need to do like array() to do that. And this is because I always did used to code between languages and alternate fast between javascript, typescript and python and earlier in my career I used to have to remember this (because googling coudl take too long), over time and now I can easily have autocomplete and even AI llm tell me, so I don't remember or waste my energy remembering what the exact syntax is. In my head it's just "I know I need to loop through this, do it in the language Python wants to hear" and why would I bother remembering? so naturally I've forgotten the simple things.
I could clearly, definitely do the programming position, the only ones wasting time IMO are the ones checking if I can remember verbatim things like "spelling" when we all live in a day and age of spellcheck and tools. No one wastes time trying to remember for all words because it's silly. Or maybe encyclopedias and trivia games are the better analogy, sure it's a party trick, but how does it help you do the job better? it arguably does not, and the ones who have not learned to adapt their interviews to the tools are the ones wasting time.
If I can do well beyond the requirements of the work position, and the issue is how they are testing my fit is not an accurate representation of the work and tools and environment I'd have access to while doing the work, then its not about "fitting" the position but instead an indication of a poor job fit process.
There’s almost nothing to forget? I’m just struggling to understand.