2

Which programming language do you use for coding round interviews?

Profile picture
Software Engineer at Taro Communitya month ago

I use Typescript for work and in the past I used C++ exclusively for coding interviews, but now I feel I can use Typescript itself for interviews. What do all use and has anyone given a coding round using Typescript? It would be great if you highlight the pros and cons as well.

58
5

Discussion

(5 comments)
  • 3
    Profile picture
    Tech Lead/Manager at Meta, Pinterest, Kosei
    a month ago

    All else being equal, use the more concise language for interviews. Time is of the essence in an interview, so if you can write less code to get more done, you have an advantage. A good default that many people know well (both interviewer and interviewee) is Python.

    Of course, you don't know all programming languages equally well. So your default should be to pick the language you know best. In your case, this sounds like TypeScript. That's a great choice since it's likely that any company you interview at will use TypeScript as well.

    If I were to interview today, I'd choose between Kotlin or Python.

    Alex covers exactly this point in his course about DSA: Programming Language Selection

    See also:

  • 2
    Profile picture
    SDE @ Amazon www.anamazonsde.com
    a month ago

    If the best language you know supports basic data structures and classes, use it without hesitation. If that best language was python, a lot better. But don't use python on it's own unless it's your best skill.

    In the interview, you are expected to produce code, and communicate your thought process to the interviewer, having to do so with a language that you don't touch daily, and only use for interviews, might send negative signals about how comfortable you are implementing code.

    You will not be judged in the interview by which language you use, but you will be judged if you use one as your best, and then struggle to remember how to add items to a stack.

  • 2
    Profile picture
    Mentor Coach for SWEs | Former Staff Software engineer
    a month ago

    FWIW, I have used Java for interviews throughout my career and it served me well.

    I somewhat disagree with the notion of learning a language only for interviews—it's hard to know the language really well that way.

    At Senior levels in particular, sometimes interviewers do want to know your proficiency level in a specific language, esp. if it's directly used in the team. If you happen to run into an interviewer that is passionate about programming languages in general, they might get into the weeds of the language. It happened to me when a 20-year Java veteran grilled me on all sorts of Java internals that I thankfully knew and did quite well.

    If this were to happen, then coding in a language you learned just for interviews and using a different language for proficiency discussions can be a very big red flag.

  • 2
    Profile picture
    Eng @ Taro
    a month ago

    I would definitely use the language that you are most comfortable in. You want to avoid the situation where you have trouble with a technical question because you forgot syntax or forget what's available in the standard library.

    For you, I would use Typescript, and I would make sure to use Typescript when you are solving Leetcode questions. You want to get to a place where you never have to look up anything specific to the language because that can eat up time. If you run out of time or can't solve a problem, it should be because of some conceptual misunderstanding, never a programming language issue. If you are running into language issues, make sure to note them down so you can avoid making repeated language issues.

    Even though interviewers should look at the overall solution that you present, if you have a lot of syntax errors or you're too handwavey with your syntax, it will subconsciously, negatively affect the interviewer's judgement on your performance.

  • 1
    Profile picture
    Tech Lead @ Robinhood, Meta, Course Hero
    a month ago

    You should 100% use TypeScript. JavaScript/TypeScript are concise and fast, making them a great choice to beat the clock (i.e. one of your biggest enemies in coding interviews).

    If you're using it for work, it will also be your sharpest language. Win-win.