9

My job requires me to know how to work with Ruby, Python, Bash, Puppet, Golang, MySQL and occasionally Scala and PHP. Yes I really do have projects including most of these and there are weeks where I have 3-4 tickets from projects which cause daily work with 4 different languages.

Yes, I can do it in an acceptable fashion. But when it comes down to it keeping all of the syntax straight is the main issue. So I rely heavily on searching online for how to do things. Sometimes there are hiccups in understanding here and there but reading the docs always helps.

My question is, how on earth can I get past a whiteboard interview when my mind is so scrambled with so many languages? I need to know at least one language well enough to interview but I find it pretty hard and routinely mismatch syntax. Any ideas on how to better do this?

  • 3
    "I rely heavily on searching online for how to do things" - this is not unusual, but you must have a main language that you learned at some point in the past and know intuitively, surely? If you don't know any language properly, the only answer is to buckle down and learn at least one. – Steve Jun 20 at 23:32
  • Never have really @Steve – Biff Jun 21 at 2:00
  • 4
    Are you asking about "being great in one language" or are you asking about "how on earth can I get past a whiteboard interview"? Because there is almost no relationship between the two. – Jörg W Mittag Jun 21 at 15:15
  • Oh, so those dream jobs exist! – sepehr Jun 27 at 13:39
14

Exact syntax matters less than you might think. In an interview, you can say something like:

I don't remember in this language if a set.add returns a boolean indicating if the item was already in the set or not. It doesn't really matter for this problem because it's easily looked up, but assuming it does return that indication, this is how I would write it...

The idea is to be confident, and show them you have enough background to solve it regardless of the exact syntax.

There are pedantic interviewers, especially those who have always focused on a single language at a time, who will ding you for an answer like that, but you probably aren't a good fit for such a shop anyway.

However, for it to work, it should just be exact syntax between languages you are glossing over. If you are having trouble with language-agnostic concepts, that's a lot more likely to hurt you.

| improve this answer | |
3

My question is, how on earth can I get past a whiteboard interview when my mind is so scrambled with so many languages?

A whiteboard interview is not a syntax exam.

It's an examination of your ability to break down a problem. You don't need to use a particular language for that. Pseudocode would apply equally here.

If certain companies are using whiteboard interviews as syntax exams, then they are woefully misguided in their expectation of people writing syntactically valid code without any kind of error checking or lookup (whether it's Intellisense or googling).

I am predominantly a C# developer, it's been years since I did anything else. And even I can't keep my syntax 100% straight. That's a normal consequence from having relied on outside help (Intellisense, Google, StackOverflow). I generally know and trust my logic to be correct, but I don't remember specific prebuilt namespace, class or method names unless I use them on a daily basis.

I cannot write down (from memory) how to get a specific node from an XML document using C#. But that's not important, it can be googled in under a minute. What does matter, and what makes me pass interviews, is that:

  • I know that it can be done
  • I know when to use it. In other words, the posed problem can be solved using this step.

Those are the main checkboxes that display developer skill. I'm not a walking snippet repository, I'm someone who breaks down problems into small logical steps. So I focus on showing that.

Having worked in so many languages, you should have a good understanding of how the process of developing software is exactly the same regardless of the language. The only thing that changes is the buttons you press on your keyboard, but the (broken down) goals you try to accomplish remain the same regardless of language.

I suspect you may be bogging yourself down with expecting yourself to use the appropriate language. So here's some tips on how to dodge a specific syntax that you don't know by heart (for example, let's say the interview is about JavaScript):

  • If you know it in another language, refer to that syntax and mention that you mean the JavaScript-equivalent of it.
  • Use a descriptive method name that clearly signals what you're trying to do with it. GetLastItemFromArray(myArray) or GetOldestPerson(people) are not existing JavaScript functions but it's abundantly clear what they would do if they were.
  • Use a black box where you describe the input/output but don't delve into specifics of how you get from input to output. If that processing step is not the focus of the problem, then it doesn't matter whether you know it or not, what matters is that you know what it needs to run and what it will return.
  • Feel free to point out that you're not sure about the precise syntax but don't feel obligated to point that out - the interviewers probably don't care about it. And if they do, they'll ask anyway.
| improve this answer | |
0

I have had the opposite problem of knowing a few languages well and having to describe technical programming tasks for programmers knowing hundreds of languages. At times I have to resort to a made up pseudo code, where formatting might be based on Python, but using terms that should be familiar to a C programmer.

You might try a pseudo code based on the language they want, but deliberately don't sweat the details maybe the function is actually uppercase() and you write upper(); ** instead of ^; <> instead of! =. You should be able to show that you can program. If moving to a single or dual language environment you should be able to show that you only have to pick up a small amount of language specifics that should come naturally.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.