
Choosing a Programming Language for Interviews - bcjordan
http://blog.codingforinterviews.com/best-programming-language-jobs/
======
OhHeyItsE
_Read in a file full of numbers, one number on each line

Represent those numbers as integers in your program

Replace each number with that number times its line number

Write the file out elsewhere

And complete the task right now at your computer as fast as possible, you’re
being timed

Think—what language would you immediately reach for? Do you start your
experimentation with ipython, or irb? Do you pop open Eclipse and write some
Java? Or create a new .cpp file?_

I have 13 years of experience leading teams in building and designing web
applications in a wide variety of languages and platforms - some pretty big
ones, too.

I would not be able to do this in any language without looking at the API.

And they wonder why "It's so hard to find good people!"

~~~
benhoyt
I've been interviewing a fair bit lately, and I just really struggle with what
you say above. To me if you can't write that simple program in _some_ language
without looking at an API or consulting Google at every turn, it feels like
you haven't used the language enough (either that, or the problem isn't in a
domain your familiar with, but you can usually tell which it is pretty
quickly).

I don't deduct points for not getting the syntax precisely, but if they don't
know the very basics of "open()" and "for line in file" and "int()", but say
they have 3 years Python experience, I'm thinking No Hire.

~~~
OhHeyItsE
And that's where we disagree. I think this whole "FizzBuzz" craze is as
equally stupid as the riddle craze was.

My brain, right now, is working on a way to pop messages off of a RabbitMQ
queue onto a clustered pool of Akka workers while minimizing the duplication
of work and avoiding race conditions in the output.

My career experience is in Java with a sprinkling of Python. I honestly cannot
recall off the top of my head the I/O Api to do that task. Let alone on a
whiteboard or in some shared google doc.

Hm, I need to open a file. OK, no problem - new java.io.File(path). Er, wait,
I remember there's a FileReader. Probably should use that. Do I need a File
first? Or can I just give FileReader the path? Ah, shit - I need to read each
line. I think that's a BufferedReader. How do I get from a FileReader to a
BufferedReader? Is it constructor param? Wait, maybe FileReader _IS_A_
BufferedReader.

So, I 'fail' the interview with you. Maybe your company has a need for someone
who can write a 10 line script that can read a file line by line without
having to look at the API while being timed. In that case, yes, you probably
have weeded out a bad candidate.

------
angersock
Has anyone had the luxury of using multiple languages in an interview?

E.g., "Oh, you want me to twiddle bits? Let's do this in C.", "Oh, now doing
silly text file stuff? Ruby.", "Write a simple properties thingy?
Javascript.", "Find all permutations of blah? Lisp or Scala."

I wonder how common that is.

~~~
steven777400
For my current position interview, there were several code samples I needed to
write. One of the requirements was that I had to use two different programming
languages (although I could pick which one for which sample).

------
727374
I was recently job hunting and chose to do coding problems in python when
possible, even though I have 7+ years C# experience. For the first interview
it got me into trouble because I actually didn't know how to read args from
the command line and didn't have access to the internet! For all my other
interviews (mostly Java jobs), I'm glad I used python for the simple reason
that solutions tend to require a lot less boilerplate code than C#. I
typically have to erase/change a couple lines as I'm solving a coding problem
and using a terse language helps reduce this distraction. I don't think the
interviewers minded and in one case I think using python gave me some
(undeserved) mystique.

------
SeanDav
This reminds me about that saying: _' There are three kinds of lies: lies,
damned lies, and statistics.'_

According to the table about relative popularity of programming languages,
Javascript (5.2%) and C# (5%) have only 5 times the popularity of Scala (1%)
and Haskell (1.2%). In most contexts, this data is just wrong.

This just proves that unless you know or show the underlying method and
context, quoting statistical summaries is almost completely pointless in
trying to enhance your point.

I realize that this is probably being a bit pedantic as that graphic is hardly
the main point of the article however it does tend to place a question mark
over the rest of the article when a seemingly dishonest bit of data is used to
help prop up other points.

~~~
cowls
It specifically says:

Consider this great visualization of the most popular coding languages of 2013
from the interactive practice problem website CodeEval:

------
tom_b
A follow-up question for interviewers lurking here on HN:

What are your thoughts about candidates who code correct solutions in a
language not in use at your workplace?

I have a nagging feeling that some positions in my group have gone unfilled
due to tech stack mismatches in candidates who were probably perfectly capable
(or better) coders, but were most recently working in other tech stacks.
Considering these types of candidates seems to be challenging in my workplace.

~~~
727374
For general roles, it's a question of how much you are willing to invest in a
candidate before he/she starts producing. Big firms like Google/MS/Amazon are
willing to hire strong candidates who aren't familiar with a given stack. A
young startup might (understandably) not be able to pay someone for a few
months to ramp up on a stack that's not familiar to the candidate.

~~~
gaius
That is subtly wrong, because there are really two things there: there is the
language itself, and there is what has already been built with it. Say you get
a really strong Perl guy, but you use Python. At a startup, he just has to
learn the language. At a big company, he has to learn the language _and_ the
last decade's worth of codebase.

~~~
727374
You are missing the point - startups don't always have the time/money to train
someone in a new language. That's why they are looking for Javascript Ninjas
who can hit the ground running. Established firms inherently have money to
invest in training if they choose to.

~~~
georgemcbay
If you have hired the right person they will very quickly "train" themselves
and the only cost to you will be a slightly slower start (which will resolve
itself in days to a couple of weeks max) at producing real code.

Well worth it if the alternative is hiring someone who knows the
language/framework you're working in, but pretty much _only_ knows that
language/framework.

------
wyager
I always try to interview in Python, because I can bang out complicated ideas
quickly with very minimal boilerplate.

Writing in Python can be almost like writing in pseudocode.

~~~
nilkn
I switched to using Python from Java for coding interviews and it almost felt
like cheating. List comprehensions and the like don't necessarily trivialize
many interview problems, but they certainly make them much quicker to solve.

~~~
benhoyt
I can see why you feel it's cheating, but I think it's simply using the right
tool for the job -- instead of worrying about which headers to include and
what the exact C++ type specification for a map iterator is ... in Python, you
can think about the actual problem at hand, rather than arcana.

------
at-fates-hands
Python is the most popular language at 30% in 2014? I've worked for a lot of
big corporations and interviewed at hundreds more over the last few years. Not
a single one used Python in any way, shape or form.

Maybe that's changing, but I find it hard to believe.

~~~
yeukhon
Define big corporations? I am sure C++ and Java are still the most widely used
in big corporations.

~~~
at-fates-hands
Best Buy, United Health Group, Target, Medtronic. And I agree with you, I
thought C++ and Java were more widely used than Python. The graph at the
middle of the page in the article indicated Python was the most popular
language at 30+%.

~~~
yeukhon
The main issue in the blog post is about "you, interviewee, which PL to use
for coding interview" and the statistics OP uses is about what PL people uses
on CodeEval (which is a place people go on to challenge themselves).

So you are right about the doubt. Simply put, a lot of interviews tend to be
fixed. Interviewees don't get to choose the PL to use during coding session.
It is usually fixed. If you are interviewing for Java software engineer
candidate, then coding in Python makes no sense. So that statistics does not
reflect reality. It's merely to say that "Python and Ruby alike PL" are
popular should the candidate has the right to choose a PL.

------
oh_sigh
I tend towards python simply because most interviews are done on whiteboards,
and python is a very concise language, which means I can average more logic
per handwriting effort than I can with something like Java.

------
NotDaveLane
Or... Have people use whatever they want so long as they are able to
communicate their ideas, and move the focus to ensuring that they understand
how software development works. You can teach syntax much more easily than you
can train someone to think like a programmer.

------
peterbotond
If I had this option during an interview, opt not a language, rather the idea
to solve a problem described in Abstract Syntax Tree. This usually ends up in
a pseudo code with parens.

~~~
TheCoelacanth
So, Lisp?

------
gre
As a candidate, always use python.

