What is closure in Swift? Is it similar to callback in Javascript?

Is it normal to be asked an advanced javascript question when I applied for a ruby on rails programmer position?

  • I recently applied for a job where the job title was "ruby on rails developer". They were looking for full stack developer who can quickly build things from front-end (javascript/jquery/css) to back-end (ruby on rails). My first interview went well. The guy asked me some basic web technology stuff like caching, using javascript event handlers, etc. I passed that one, and was invited for the next round. However, this time the new interviewer started out by asking advanced javascript questions. Now, I don't have any problem implementing any kind of web interaction using javascript, and I do have a basic knowledge of more in-depth javascript stuff like closure. However, I was mostly focused on "using" javascript to build websites, and wouldn't call myself a javascript professional. The interview was a disaster, this guy only asked me these advanced javascript puzzles. No question regarding ruby. Not even those common computer science questions. I've always been working on my own startup and this is the first time I'm ever trying to get a job somewhere, so I don't know what companies are expecting when they look for a "ruby on rails developer". Was this an unusual experience? Or should I expect to get these questions in my further interviews?

  • Answer:

    That does seem a little odd to me. When we interview people at my company for a "full stack engineer" position, we'll have different people focus on different aspects of the stack.  One person may talk about data design, another may get into ruby code on the server, and a third my check out the person's client-side JS/CSS/HTML abilities. If the position is described as a "ruby on rails developer", I'm surprised they had someone go super in-depth into advanced Javascript.  Maybe there was a miscommunication about how much JS you knew.  Or maybe they just wanted to see what the limits of your JS abilities are, so they would know what sort of projects they could put you on. Remember that interviews are not always carefully crafted experiences.  I've been asked "hey, we have this person coming in for an interview, and Joe was supposed to interview him in 10 minutes, but he's stuck dealing with a production issue.  Could you jump in?"  So maybe there was some snafu on their side. I'd follow up with whoever your contact is at the company, and inquire about it.  Say you were a bit surprised that the interviewer went so deep into Javascript, and check in to make sure you're on the same page about the position and its requirements.

Jon Moter at Quora Visit the source

Was this solution helpful to you?

Other answers

Interviewers ask what they know best about, and unfortunately this could be either related or not-related to the job description. I was once interviewed at a position that requires "either one of the following languages: C++, C# and Java". I thought having experience in the first two (I'm not a CS major, in case you wonder why) would have my basis covered, but I knew I was wrong when the interviewer came in and said "I'm more of a Java person...". As a result, he couldn't ask me any in-depth questions and therefore couldn't evaluate my coding capabilities. So my conclusion is, anything marginally related to the job  description is fair game, and you should be at least mentally prepared for it. On the other hand, don't get too upset in those situations as there is indeed a large degree of randomness in the interview process.

Xun Wang

It really depends. The interviewer may have had other motivations than simply assessing your JavaScript skills. It is pretty likely that it was more to assess how you function under pressure when you don't know something. Don't sweat it that much. With that being said, JavaScript is a very real and important tool for a modern web engineer, and you're likely to get a ton of questions about it to assess your level of knowledge if you continue interviewing, so you should be comfortable enough with the language to be able to answer what I imagine are probably standard js interview questions. Luckily, you just got a bunch of them, so learn the stuff you didn't know by the next time you interview somewhere and you'll ace it pretty easily. To directly answer your question though, at most places you unfortunately have to be prepared to answer any bit of random CS trivia during an interview - nothing is really off the table, especially questions on a language you'll likely be interacting with and writing occasionally.

Scott Werner

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.