3 ms·
I think my daily driver language (Ruby) has become so ingrained in my mind that it's written out of muscle memory in Vim, and translating that direct connection
by nitrogen 6y ago
I think my daily driver language (Ruby) has become so ingrained in my mind that it's written out of muscle memory in Vim, and translating that direct connection from thought to Vim into a whiteboard might actually be challenging. You almost never write for loops in idiomatic Ruby anyway, you use an iterator chain.
Languages like C that have a single official for loop syntax are a bit easier to remember, in part because it's a syntax I have previously used on a whiteboard rather than exclusively in actual code.
So if a candidate can't write a loop on a whiteboard, maybe let them try in a non-IDE text editor, or have them glance at a formal grammar for the language as a refresher that won't give away the game to someone who can't actually code.
- AshamedCaptain 6y agoEven if your IDE would type your entire programs for you, you would still know the syntax of the language just because I am 100% sure you have actually read more code than you ever wrote. And do note that even in C there is not a single official loop syntax -- a while (get_next())-like thing is a perfectly valid loop in C. All of them valid answers -- I used the word "sequence" and not "C array" for a reason. And if I start showing them an EBNF grammar for the language, now that's TWO languages that you will show you don't remember rather than one. I find this even more absurd; you don't remember anything of the syntax of the language you used at work for years, but you think you can rediscover it from the FORMAL language specification in a whiteboard?