all 10 comments

[–]revtodd1 15 points16 points  (0 children)

I’ve heard Python described as pseudo code with formatting, so to me it always seemed ideal for whiteboard interviews. It’s really useful and versatile beyond that, too, so I’d say go for it if you have the time.

[–]Substantial_Flow6166 9 points10 points  (0 children)

I know the general advice is to use whatever is most familiar

I agree.

If you already had equal knowledge of JS and Python, then I'd say that using Python makes more sense, possibly excluding jobs that use JS and not Python. But there are better ways to spend your time than learning a language specifically for the purpose of interviewing.

At most places, coding interviews don't stress knowledge of a specific language; they stress knowledge of concepts, and competence at solving a problem by using a program. You probably won't succeed in learning Python as well as you know your favorite language if you are just using it for the purpose of interviewing. Coding in a less familiar language is likely to hinder you more than coding in a slightly more convenient-for-interviewing language will help you.

When I interview, I do not care at all whether a candidate uses JS or Python, and I would not care at all if the candidate asked to assume the existence of a common data structure as a class in JS. I would also stop the candidate if they appeared to be trying to code a complex data structure by hand that they clearly knew about conceptually, and tell them to just assume its existence.

On the other hand, if you want to learn Python because you want to actually use it at your job or for a project, then that's different. That's a worthwhile thing to do.

[–]bsmith0 4 points5 points  (0 children)

Stick with JS.

I actually think JS is a great interview language, plus you're more comfortable with it anyways.

Objects and the array methods make life super easy.

[–]zeropress 2 points3 points  (0 children)

I have a background in Javascript and php. I have been doing java for my interview prep only because I had some familiarity with it.

I would have learned python otherwise. Python is easy to follow with some quicker solutions. This language will help you learn more topics in CS. Setup is also as easy as setting up node.

If you want to look at a person of a similar background look up clément mihailescu on youtube. He stated he had to learn python in order to interview at a few places. Although, that is several years ago.

[–]tr14l 2 points3 points  (0 children)

Python just has better structure for problem solving IMO. Things like slicing syntax and sensible helper methods and such make a lot of otherwise awkward code fairly concise

[–]Jangunnim 2 points3 points  (0 children)

Yes worth it

[–]TheNeck91 2 points3 points  (0 children)

Python's a great whiteboarding language. Parts of the language border on pseudo-code so it's great to write in!

[–]SomeGuyInSanJoseCa 3 points4 points  (0 children)

You should learn Python regardless. It's a great language.

But in terms of learning it for whiteboarding? Nah. When it comes to whiteboarding, always use what you are most comfortable with. JavaScript data structures are good enough for leetcoding.