me: "Let's write some code, what's your favorite language?"
them: "My favorite? I guess C++"
me: "So how about, write a function to find the most common string in a vector of strings."
They write something like
int MostCommonString(vector v) {
for (int s = v[0]; s < n; s++) {
int count = s
count++
}
return count
}
me: "I see. Well for one, in C++ you need to end each line with a semicolon."them: "Jeez! Interviewers always expect you to have all this trivia memorized!!!"
The function logic is wrong; yes, that's a problem. But forgetting the semicolons has no significance whatsoever.
I always think its really lame when an interview candidate claims they can't possible show me an example of iterating over a collection in the language they use every day because they don't have intellisense, autocomplete or google.
Your framework doesn't just do that for you?
Edit to downmodders:
I'm not being flip or sarcastic. In all seriousness, if you're writing repetitive boilerplate - and particularly if you have to look that repetitive boilerplate up - you should be using some kind of templating system that does the repetitive (and hence programmable) stuff for you.
It could be as simple as a text file web page template with the proper doctype and generic css / javascript imports already typed out. You'll save yourself time and aggravation and reduce the incidence of silly mistakes.
Yes, your framework should have a shortcut for boilerplate like that, so you don't have to type it every time. I have worked with numerous frameworks, and I am in fact building one myself: jperla webify. Please notice that to include this feature in my framework I had to look it up using Google because I didn't know!
I have to look it up every time precisely because my framework usually does it for me.
But also, what is your framework's magical shortcut function to link the external CSS? I don't know because 1. it's not standardized across frameworks like html is, 2. it's often coded in automatically (e.g. rails asset-packager) so I practice it little and never learn it. Like I said, I know a number of frameworks intimately, but not this trivia. I have to look it up. Google does, however, teach me the high-level concepts about the benefits of using a web framework and asset packager.
Finally, sometimes I just bang out a quick 1 page of static html with 1 statically linked CSS file (for debugging or mocking or random wanton fun) for which a framework would be wasteful overhead.
Google is also teaching people more than ever (e.g. I know many more definitions of words than I ever would have looked up without Google). Google (more Wikipedia) gives me instant summaries of complex topics or figures or events, which I remember.