Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
I’m an Engineer, Not a Compiler (numbergrinder.com)
263 points by Luyt on March 7, 2012 | hide | past | favorite | 151 comments


Imagine interviewing carpenters:

Method 1:

  How many ten penny nails in a pound?
  Who makes better screwdrivers, Craftsman or Snap-on? Why?
  What's your favorite toolbox? Why?
  How can you tell when wood has been treated?
  Why should you measure twice, cut once?
  Which end of the hammer do you hold?
Method 2:

  Show me something you built. Describe what you did.
  Cut this piece of wood according to these specs.
If you needed someone to build your house, which method would you choose?


> If you needed someone to build your house, which method would you choose?

Both. The first method provides better protection against talented bullshitters, the second provides better insight into the candidate's work.

There is nothing wrong with examining the level of details somebody has at their fingertips. If they don't have the specific detail immediately handy, watching (and perhaps collaborating) with the person to find detail-type info gives you insight into whether they have a suitable user-interface when you need information from them.


>The first method provides better protection against talented bullshitters

Assuming that your skill level is above that of a talented bullshitter it shouldn't be that hard to drill deeper in to the previous projects with specifics. You don't necessarily need to even know the field, if you're a competent programmer you should at least get a feeling of how skilled/technical the other person is. And I'm willing to bet that that information will be a lot more reliable than the "what package is Foo in ?".

IMO using the first approach you concede that you aren't skilled enough to meaningfully evaluate the previous work/ skills, which is fine for contracting small work on your home, but you should consider third party evaluation/insurance service for anything big. In a interview scenario using this approach tells me I'm being interviewed by technically illiterate person that can't or won't use someone with more technical ability to do the evaluation, and both can't/won't options tell me that this company probably isn't for me.


> IMO using the first approach you concede that you aren't skilled enough to meaningfully evaluate the previous work/ skills

Only to those who confuse a test on details with ignorance of a field.

There is a wonderful scene in The Seven Samurai. The leader is testing the prospective candidates one-by-one as they walk into the "interview" room. There is a junior fighter hidden behind the doorway who attacks each prospective samurai as he walks through the door.

Most of the fighters dispatch the junior fighter without much ado, and forgive the "interviewer" understanding that he must test each one of them. There is one candidate who stands outside the door before walking in and says (paraphrased): Please, skip the attack that I know you have planned; It is a waste of energy. He does this in such a way that it is clear he will dispatch the junior fighter even before fighting.

Then there is one candidate who is unaware and gets whacked over the head.

The scene is a wonderful summary of interviewing candidates. (And a great movie too, fwiw.)


>Only to those who confuse a test on details with ignorance of a field.

There are insightful details that you only catch by working with something, eg. If I ask you what will the following python code print :

    def default():
      print("using default arguments [1, 3]")
      return [1, 3]

    def append_five(a=default()):
      a.append(5)
      return a

    print(append_five())
    print(append_five([1, 3]))
    print(append_five())
    print(append_five([9, 7]))
I expect you to know the "detail" of python handling default arguments, even tough it's non obvious anyone with decent amount of experience in python has probably been bitten by that behavior, you'd have to be a master bullshitter to guess that one. Similarly there are many such nuggets that could be used to determine if someone has actual experience/skill with the language/tools vs. reading the brochure before the interview and did his homework in college.

But this is not the same as asking what package contains what class, and similar petty details that you think are good questions because you looked them up in the documentation before the interview. I would expect many good programmers to miss that and bad ones get it right. Knowing the answer to the above question vs. knowing the name of the Java clusterfuck naming convention IMO gives a very different level of insight in to the experience of a programmer.


Eww, that's a nasty bug, though Python certainly isn't the first language to have it. IIRC, Dylan's "init-value" for class slots did much the same thing.

But really, this question only tells you whether a candidate is lying about Python experience on their résumé. If the candidate answers, "I have no idea. But I have 5 years of Ruby experience, and many years of Perl before that, and I can be competent in Python within a month or so," this question tells you nothing either way.

I've always been delighted to hire a really good programmer. I'm usually not too picky about which languages they're really good at.


Well technically it's not a bug - it's by design :)

But I agree completely, which is why I said you should be able to evaluate the previous work trough the interview, even if you don't know the specific technology (eg. If I was interviewing someone for a Django/Python gig and he has RoR experience ~10-15 minutes of interviewing about a previous project that he thinks is representative would be enough to figure out if he's winging it or he knows what he's talking about, it's cool if someone misses something but he should be able to reason about things on the fly, eg. in the above gotcha I expect you to figure out what's happening when I tell you the result if you didn't get it right away).

I'm just saying - some details can be useful, eg. if I knew Ruby or Rails I could ask about a few similar details that separate the men from the boys - but asking what namespace is foo located in isn't going to provide useful information and puts you in the PHB class of people who don't realize that their lack of skill is preventing them from creating good evaluation tools and can't delegate the responsibility to someone skilled - the kind of environment I would want avoid at all costs.


That's ridiculous. There are so many things that determine whether a candidate is good outside of how deeply they know language X.

There is only so much esoteric knowledge one person can know and you can't expect candidate's specializations to overlap yours. You are being lazy by looking for someone exactly like you (because you obviously know you're experienced) instead of trying to figure out if the candidate is knowledgable in their own right.


No, if someone claims he has experience with Python, and I've seen a few of the self proclaimed python gurus, that question will provide a quick filter. And you don't have to get it right, but when I show you the result I expect you to be able to backtrack and reason about what's happening on the spot. And there are other advanced things, for eg. meta-classes, multiple inheritance and dispatch order, etc. Not things that you need to know on the top of your head but should be able to reason about when provided the context. And this really isn't that esoteric, it's the sort of thing that separates newbies from experienced programmers, if you've written a decent amount of python code chances are you will know at least a few of the edge cases. And that question is only in response to jpdoctor saying that details can matter, I was saying I agree that some details can help but others are just useless trivia questions that make you look bad.

Also the language was just the first thing that came to mind, you can use a common library/framework/tool quirk, etc. Anything that shows familiarity with the required tools.


If I had to deal with the fact that 85 out of 100 applicants got the "end of the hammer" question wrong, you can bet I'd always start with method 1 just to filter out the imposters. That would free up time to correctly use the method 2 with the remaining 15 applicants.


The "end of the hammer" question was a poor choice. Also, you could get that by asking them to pound a nail into a 2x4.

A better example of nano-questions would be "What is the A312X131/22 3-1/2 inch nail used for?" or "How do the Black & Decker DS321 and Rockwell RK7866 belt sanders compare? When would you use one over the other?"


Well, then we're in agreement that "end of the hammer" questions are reasonable just to weed out the obvious imposters, right? So the question is whether these "nano" questions are reasonable equivalents?

And I think "how do you inherit a class" is the "end of the hammer" equivalent for a language if you claim to have been using it continuously for the past two years. I'm much less happy about the "what package" questions, but if they're meant to simply get you to name a few major packages I think they're fine. You might get the package question wrong, but I expect you to get it wrong intelligently ("what package" questions were reasonable 12 years ago when programmers dealt with them daily, but eclipse does all that for you now).

I think of these as "what color is the door" questions. If you tell me you've been working at Company X, I expect you to be able to tell me the color of the front door, or where the bathroom is, or something about the place. Not that I care, it's completely irrelevant to your skills, I just want to find out if you're really the person you claim to be before I waste time with a serious interview.

Because my time is precious, and I want to spend it with the serious candidates.


I think in this case, "take this array of numbers and sort them" would do just fine to see if they know the basics of the language, much like "take this hammer and nail that nail" would for basic hammer knowledge.

Another option would be to email the candidate a chunk of average code while you're on the phone with them, then say "walk me through the code and tell me what it's doing."

"I think of these as "what color is the door" questions. If you tell me you've been working at Company X, I expect you to be able to tell me the color of the front door, or where the bathroom is, or something about the place. Not that I care, it's completely irrelevant to your skills, I just want to find out if you're really the person you claim to be before I waste time with a serious interview."

That's what references are for. FWIW, I can't remember the color of the doors to ANY place I've worked, except for our current office which has quite a peculiar door. And besides, how are you going to know that I'm not bullshitting when I say the door was green and was right beside the elevator?

The problem with nano questions is that they assume that these few tiny tidbits of trivial and often overlooked factoids are representative of knowledge on the whole, and thus are prone to false negatives. They are heavily biased towards what YOU tend to notice, not necessarily what others tend to notice.


You contact your interviewees' references before the serious interview?


It's cheaper to contact a reference than it is to bring someone in for 5 hours.


My references are people I like and respect, and I'm not going to impose on them any more than absolutely necessary. I don't even give out their numbers until I have a firm expectation of receiving an acceptable offer. (I make an exception for HR staff, because confirming employment and such is part of their day job rather than a personal favor.)

Besides, if you have the slightest clue, your references will all speak favorably of you. It's a test with very poor specificity.


Actually know a guy who just had to completely redo his deck because the contractor used the wrong nails on treated wood. So in that regard technicalities do have some signifigance.


Method 2 would have covered it with :

Show me something you built. Describe what you did.

When the person describes what they did that opens up questions around materials, methods, and technicalities. Just having them tell you what a certain kind of nail is would have been useless without also demonstrating they used it properly when needed.


The fact he was using nails rather than screws for a deck should have been the first clue.

But neither method would have overcome your friend's lack of expertise.


Imagine if 90% of candidates were actually welders who acquainted themselves with carpentry by flipping through a book on butterfly joints. It is far more efficient to ask a "nano" question to get done with an interview faster than to laboriously struggle through them trying to present a fine welding job as a woodwork.


Differences between programming languages are much bigger and more important than differences between different brands of toolboxes or hammers.

If you realise you made a poor choice of screwdriver it is trivial to replace it with a different one and carry on working almost immediately since it's operation is basically the same.

Choosing your language or platform poorly and running into issues later once you have an app close to release or already running in production is going to cause much more difficult problems.

Essentially our tools end up embedded inside our product itself.

It's close to impossible to reliably compare programming to any other profession simply because there is nothing else quite like it.


I don't think this is borne out by reality.

Making a general contracting mistake such as accidentally compromising the structural integrity of a building by making a poor choice on where to run the plumbing can easily result in a lot of work having to be re-done, at significant cost.


Comparing screwdrivers and languages is inapt. A better example would be a choice to use a different building material than wood.


You obviously have never seen the work of a truly talented carpenter the work the wood shop turned out at my first job was stunning.

Some of the models (for hydrodynamic research) they produced in teak and other hardwoods where works of art.


A friend of mine just became a registered carpenter which involves hours of study and exams to learn the technical specs. He's now allowed to work on more demanding and interesting projects and gets a pay rise, because his houses won't fall down because of using the wrong materials. My grandfather can build a hell of a woodshed but I wouldn't trust him to put together a 3-story townhouse.


Depends who I am. If I didn't know anything about carpentry, I would choose method 1. I don't have the specialized knowledge to judge his work.

Insert obvious parallel about hiring managers who can and can't program.


The first round of questions you would use to establish whether or not the candidate will have the vocabulary to work with the other members of your team. There is nothing worse than hiring a carpenter who can't communicate with the other carpenters he's building a house with.

Once you've established you can talk to this guy (and he can talk to you) you'd ask him to show of his skills.


Neither.

The proper method is:

Here are the plans and specifications. Bids close in two weeks. Please include qualifications and references with your submittal.


IME the interviews have been more like "build this Escher painting with balsa... You have 2 hours".


I think the comparison of programmers to carpenters is really pertinent. There are so many analogies.. the modern computer programmer, as-is, is today's carpenter.


  IDE dependency? Perhaps, but that isn’t necessarily a bad
  thing since that is representative of the tools they will
  be using in the office.
Mine is perhaps an unpopular view.

I have come to believe that a decent programmer can and should be able to work well enough without an IDE. Presence of an IDE should be a sufficient condition not a necessary condition and I see so much of the latter.

IDEs are a crutch and there is a minimum level of "walking" that I expect from you without a crutch. If you have to reach for a crutch even for the simplest tasks you will earn my suspicion that you are not as comfortable as the other guy in more complicated operations. As for the claim that IDEs are a representative tool, it need not be true, more for a start up pushing the envelope. Who knows which new or non mainstream language/technology will be most suited for the job. There may not be any mature tooling available yet. I would want my co-hacker to be able to cope.

To give an example, there was this guy who claims he knows scala, but loathes working on a scala project because apparently there are no mature debugger for scala in eclipse. For him a eclipse plugin is a necessary condition.

I have seen too many programmers who program in the following mode - let me type something in the IDE. No errors detected ?, good. Let me test it on a few cases. Didn't work ? let me bump up the loop bound by one, no cookie ? let me decrement it by 2, didnt work, let me change the sign of this expression from positive to negative -...ad infinitum. I am more scared when such a code passes a few half assed test cases and the author cannot explain why the fix works.

I am not saying IDE are universally bad, quite the contrary. I advocate IDEs, but under two scenarios - (i) you are learning a new language (ii) you are an expert in that language. It is the overly populated middle ground, where it is used as a substitute for (a) thinking about your code or (b) knowing the language, that worries me.


If you have to use an IDE to program, you're not programming in the language, you're programming the IDE.

There are many times I have to log into remote systems and all I have are nano or vi. Not even emacs. If I have IDE-dependancy, I'm up a creek without a paddle.


If you're hot-patching code in a remote environment, you have much bigger problems than "I don't have an IDE!".

I use an IDE--and for many languages, ex. Java, Scala, and C#, would say I have to--because my time is worth something to me.


I use an IDE--and for many languages, ex. Java, Scala, and C#, would say I have to--because my time is worth something to me.

For the languages you've mentioned. Java and C# do you really have any other option, but to use an IDE? Its like, goes without saying and assumed that you are and every body is programming with an IDE.

In case of Java. You must know eclipse today is nearly a part of the language and not a separate tool.


I can write Java without an IDE. It's not that hard--it just takes additional time. Valuable time that I could spend writing other code or sleeping or drinking beer.

The assumption that it would be Eclipse, however, is hilarious.


You aren't really "programming the IDE" since you are using the same language as you would be if you used something more like vim.

You may be used to a workflow that a particular IDE emphasizes but that doesn't mean that they couldn't muddle through with an editor + command line tools if required.

Sure you might have to read some more documentation but I would argue that you are still using what is in essence an "IDE" just without the "I" since you are using a more loosely coupled set of tools.

At it's core an IDE is usually just a text editor with a few buttons that run scripts anyway. Whether you happen to call them from BASH or a GUI is largely inconsequential.

There may be people who are hopelessly lost without an IDE but more than likely it's just that it's that IDE they learned at school/their last job because they were focusing more on learning the code than learning Unix commands.

People are naturally afraid of things that are unfamiliar but given time and a push in the right direction anybody capable of writing a program should be able to pick up these skills.


  but that doesn't mean that they couldn't muddle through
  with an editor + command line tools if required.
Anecdotal evidence is not a proof, but my empirical observation suggests otherwise.

There is, unfortunately, an un-ignorable set of IDE users who cannot be bothered into reading documentation about the language (and I am not talking about support tools manuals). They feel entitled that the IDE should take care of those "details". For this crowd, IDE becomes a necessity and my claim is that its an accidental or an artificial necessity. Not having an IDE may slow you down but it should not stop you, and that is exactly what I have seen time and again.

I am fine with them using any of their preferred tools but they should have some idea of whats going on underneath, hence my two use cases for an IDE. If you know what you are doing, by all means use an IDE.


If someone has a pathological aversion to documentation then relying on an IDE may be more of a symptom. However quality of documentation for programming tools/languages varies so much that I can understand where this may come from if you have mainly been exposed to the bad kind.

Plus sometimes it is nice to have a bit of "magic" to do some of the work for you when you have something you need done on a deadline and don't have time to grok the details of everything. It can be useful to go back and try and grok some of the details later but you won't usually grasp this until you experience the pain of working with an incomplete understanding first hand.

I have also met programmers who are almost the complete opposite of IDE addicts. Usually people who come from a PHP/Javascript background and have become used to doing everything using EditPad and debugging with echo statements. It's often just as difficult to make these people realise that they could save time and gain more power by looking into more sophisticated tools whether they are parts of an IDE or command line tools.


I don't mind writing C++ or python or javascript in mcedit or kate (sorry, I just can't get used to vim nor emacs, I tried).

But Java is special, try to code Java without an IDE. It's possible, but it's PITA. Typing org.something.somethingElse.somethingEvenMoreElse.ClassINeed and looking it up for every class you need will kill you. Even importing org.something * from every library won't help, you still need to know subpackages path to each class, and most libraries have quite huge depth and branching factor :).


Do you believe that a decent programmer can and should be able to work well enough without a text editor? If not, what do you see as the difference?


Actually, I do believe this. I am not going to make the age old argument "real programmers program by toggling there OS into the front panel of the computer". However, I am going to argue good programmers can program in such an environment.

A good programmer can put together a system with nothing but a stack of note cards, a pencil and a good eraser.

Since good programmers can work in really archaic and restrictive environments should they? Of course not! You should give them the best tools for the job, they will work quicker. However, that doesn't mean they can't be amazingly productive with primitive tools (see the 1970s for instance).


Absolutely. To extend that answer: a programmer who can't work without an IDE probably:

- Can't work without an integrated debugger (i.e. can't diagnose a core, doesn't know how to attach a gdb to a running process, etc...)

- Can't diagnose problems outside of the development sandbox.

- Will demand access to expensive debugging tools instead of throwing some logging in.

- Doesn't code experimentally. Won't try things. Will ship the first version that works.

- Can't generate a simple test case for a bug, instead hammering away on a giant 200-file project someone else wrote.

- Often can't write a single-file, simple program from scratch AT ALL.

The analogy to a crutch is very apt. Yes, you can do great work with IDEs, and I'm sure people do. But 90% of the time an IDE user is using it only because it's all they know, and they're too lazy or unskilled to learn something different.


>>A good programmer can put together a system with nothing but a stack of note cards, a pencil and a good eraser.<<

A real programmer uses a pen.


Perhaps real programmers communicate telepathically, why should you need a pen as a crutch? Perhaps the other two gentlemen who think an IDE is a crutch will know the answer.


If you claim you do not see a difference between an editor and an IDE I believe you are just trolling. Not sure if I should feed you. One is a general and a language agnostic tool and promote skills that are largely transferable across languages and platforms whereas the other is a language specific and a limited tool that is likely to be absent for new languages.


editor and an IDE

I think the problem is that unless you're talking about using nano or notepad to code versus something else then you're trying to make your IDE sound superior over someone elses choice. When most people talk about being superior using an editor over an IDE, they usually mean using vim/emacs editor. The problem is that these days vim/emacs are IDEs. They may be lighter weight versus some other IDEs, but they are IDEs in functionality, plugins, and language support.


I haven't seen a vim plugin with refactoring or debugging comparable to IntelliJ or Eclipse yet. Do you know where I could find one?


I don't know if you're being snarky or asking a valid question. Either way, at no point did I say either had all the features of other IDEs. We also never defined IDE. Must they include refactoring and debugging tools to be considered? Debugging, depending on language, can be shelled out to the underlying tools. Refactoring is a hard one even in other modern day IDEs, so to say that vim/emacs are not IDEs because the lack refactoring means a lot of other IDEs also are not IDEs.


I meant it as a question. My normal response to people who want me to use an IDE is to ask what it does that vim does not do, and so far I have found that these two IDEs do these two things (at least, for Scala and Java. I would not expect any IDE to do correct refactoring of Python) that I have not yet made vim do.

I'm particularly interested in this right now because I've just moved from a C++ project to a Scala project, which meant moving from vim to an IDE.


Argumentation note: claiming you have an unpopular opinion and then leaping to call people trolls so you can refuse to engage them is pretty poor form.

Of course I see a difference, but it's a difference of degree, not kind. I should clarify that by "text editor" I mean something above the level of ed or nano (though I'm happy to make a similar argument for these too): language-aware features in vim or Emacs such as auto-indenting, syntax highlighting and ctags support are not "transferable across languages" unless someone does the work to implement them: witness Emacs's lack of C++11 support.

Expecting e.g. auto-completion to work cross-language in vim but claiming that debugging in Eclipse in inherently language specific flies in the face both of experience (I personally have used debuggers in Eclipse for Python, Scala, and Java, and I know others exist) and also common sense; both are fully extensible via code, and while Eclipse's support for Java is better than the other languages, it's not tied to it in the way that e.g. the Python REPL is tied to Python. I think you'll find that Emacs's support for various languages differs in quality too.


Text editors are not completely language agnostic if you want to use features like syntax highlighting as somebody had to add syntax for a particular language to your editor of choice.

Also IDEs like eclipse are faily language agnostic, of course the tool support is better for some languages rather than others.

I use eclipse for PHP but I only really use it as a text editor (along with some of the features that help me navigate the code easily), all the debugging etc is done server-side anyway.


> I have come to believe that a decent programmer can and should be able to work well enough without an IDE.

Let me help you understand how absurd your statement is: "I have come to believe that a decent builder can and should be able to work well enough without power tools."


+1 (I hope +1 is ok as a response here.)


I have come to believe that a decent programmer can and should be able to work well enough without an IDE. Presence of an IDE should be a sufficient condition not a necessary condition and I see so much of the latter.

I have come to believe that a decent marathon runner can and should be able run well enough without shoes. Presence of shoes should be a sufficient condition not a necessary condition and I see so much of the latter.

You can run for like 50 meters without shoes. But you need shoes to run a marathon.

It makes zero sense to be developing a very big Java application without IDE's. And any one who is doing is simply for no reason under going self punishment.


You chose a poor analogy, barefoot long distance running is becoming rather popular lately. Many runners have completed marathons and clocked competitive times without shoes.


Just like how many programmers manage to program Java on Emacs today...

I mean does anybody have to bear that kind of a pain for no reason? And what you are going to accomplish doing that by the way?

I don't understand this self punishment and I don't see why this is even needed.


This only goes to show that you never worked in multi-site projects with millions of lines of code, which are integrated into enterprise processes and build infrastructures.

Trying to navigate or refactor code without the help on an IDE is just plain insane, regardless of the language being used.


You're perpetuating a silly myth which is along the same lines as the "language X sucks because it attracts Y-type programmers." Don't hate a valuable tool just because you've seen it misused. Also, don't assume that because a person uses or even prefers one development environment, that he or she is incapable of working outside that.

claims he knows scala .. there are no mature debugger for scala in eclipse. For him a eclipse plugin is a necessary condition.

What's wrong with that? If your favorite editor is vim with a host of preferred customization and plugins, and I tell you that at my company we only allow the use of TextPad, are you going to be happy about that? How is it wrong for a developer to prefer working from within a particular environment? I hear people talk about muscle memory and the power of vim, yet when the table is turned they cry about crutches and ineptitude.


And then I claim that you are indulging in a "silly" refutation of things that I have not said and you are conflating concepts of necessity and sufficiency. I guess we all have our trigger happy moments.

Also keep in mind that optimal decision making requires that prior probabilities be taken into account together with the costs of false posotives, cost of false negatives and the cost of acquiring evidence. Evidence does change posterior beliefs but but Bayes' rule essentially dictates that stronger claims (i.e. low prior) require stronger evidence.


refutation of things that I have not said

How's that? You're a technology bigot, plain and simple.


This is getting beyond silly, and I dislike long threads, but if you insist this is how:

I dont hate an IDE I advocate it. Circumstances matter.

I do not assume, I verify and learn from past experience. You may find this helpful http://en.wikipedia.org/wiki/Posterior_probability

I have no problems about users preferring one tool over another. I re-iterate , "preference" is different from necessity.

I am not sure why I am re-repeating myself. Apparently it does not make a difference and dont expect that it would even now. Perhaps an integrated reading/comprehension environment is called for.


People who advocate IDEs don't define them as crutches, nor do they judge a developer for his preferred environment. You can add all the disclaimers you want, but you made your position clear. Stop trying to be condescending and own up to your words.


> My favorite phone interview question? “What’s your favorite language?” followed by “What are it’s weaknesses?”

This is also one of my favourite questions to ask when I'm interviewing someone. Unfortunately most of the time the only response I get is confused stares. Maybe this is just a UK culture thing but it feels like many people are not prepared to display critical thinking on a job interview.


Thats a great question to find newbies. It shows that the candidate has deep experience with the language or programming. As an ancodote: I was on RailsConf Berlin 2007, as a Ruby programmer with 3-4 years of Ruby experience. It was like being the grumpy old man (with 23 years :) ) in a group of young, happy and fundamentally unexperienced people. Most of them had about 6 month or less of ruby experience, they just hadn't seen the bad parts yet.

I think any experienced programmer can rant for a least 5 minutes about his favorite language. Also, I think that experienced programmers can quickly find valid criticism even in languages that they don't use all day.

And I think thats global. Most people aren't critics and will hop onto any prepared argument they can find. Thats why I hate most discussions about software.


Along the same lines, my favorite question is "What is your favorite data structure?". Most of the time, the answer is HashTable followed by a complete lack of understanding as to how a hash table works. Occasionally someone would respond with 'Quick Sort'

Every now and then you get a candidate whose eyes lit up and you can't get them to shut up (in a good way). And that is the story about how I discovered judy arrays.


Depends who you ask. Ask most people at my school and they will give you an answer of "Java". Is Java their favorite language? No. Its their only language.

Also if one cannot understand the philosophy behind the language that they are using and express why they like that philosophy and what benefits it brings, they probably aren't using the language right.

However, ask anyone who is great at what they do and you got yourself an hour long discussion.


In my experience (on both sides of the table), it's okay to say "what are the shortcomings of language_x" if you are interviewing for a specific set of skills. If the candidate has a list of languages on their CV, then it may be worth asking the "what's your favorite language" question first.


I have seen so many programming languages that my only answer to the first question can be, "None".

Haskell is too restrictive, OCaml too verbose and inflexible, Java lacks closures, Javascript has weird equality semantics, C lacks garbage collection, Python lacks static typing, Clojure has too many `)))`s, Ruby is inconsistent, ... I could go on.

In the end, I just settled on a language that I have to use at work (currently Python), but I'm wishing for something better to come along...


There are two kinds of programming languages, those that people hate, and those that no-one uses.


You see, what you've just written down is a perfectly fine answer to the question.


You should try C#. It's like Java with closures (and some other nice features: http://stackoverflow.com/questions/610199/the-art-of-program... )


C# is one of the most interesting languages, really. It's been developing really fast, and along with F#, it shows that MS is really putting an effort into programming language progress. However, my main concern with C# is not the language, but the libraries/ecosystem. It's so tightly bound to Windows that it hurts. There are no good cross-platform implementations, poor IDE support, and I'm pretty concerned developing for a runtime that might go away...

Now, if only MS would open-source their implementation, most of these arguments would become void.


Mono is pretty good. F# also runs on the Mono runtime.


Mono is a great attempt done by great people (I did Google Summer of Code for Mono and it was a blast). However, its utility is hit-or-miss; performance is a concern relative to Java-on-Unix or .NET-on-Windows and I'm starting to find that a lot of the cross-platform usefulness claimed by stuff like MonoTouch to be a lot less than I originally bought into. I can get most of the same out of C++ (and most of the same, iOS excepted, from Java), and I know it'll be there in the next few years.

Couple that with the future of .NET itself not looking terribly bright thanks to WinRT, and I'm personally getting more and more concerned about the viability of .NET, and implicitly Mono. I'd dearly love to be wrong, but I don't think I am.

- This is one of the things about Microsoft that infuriates me. I've heard from people in Microsoft that "developers have told us they want C++"--well no shit, really, when you've jerked around .NET as much as you have, people are going to assume there's little future for the platform. Self-fulfilling prophecy.


Back around 2000 I was studying graphics programming as a hobby, and the DirectX APIs were moving pretty quickly at that time. It seemed as if a new version was dropping every 6 months. I got tired of playing catch-up to Microsoft and switched to OpenGL. Much better experience; got code running much faster.

I saw the same pattern begin with .NET; you had to keep playing catchup and buying into the New Hotness. I realized that this seemed to be a Microsoft strategy: obsolete the old knowledge and watch the developers pay money for the new hotness. I'm not saying that MS needs to be static, but there appears to me to be a deep seated instability in their approach, which implies pretty heavy retraining every five years. Contrast this against C++, which has been more or less standard since the mid-90s, especially for the common cases.

I get tired of running on a tech treadmill. Learning how to crap out the same concept in yet another language (much the same as the ones I already have used) has nil interest for me. I am tired of wasting my life figuring out the subtleties of a Java clone, or a C++ clone, or a Perl clone, or... etc.

I look for a stable, long-term language, on fairly stable core technologies, so I can build really amazing new technology without throwing it out and restarting due to the New Hotness. I personally have picked Common Lisp for my long-term code and projects. Others might pick C++, Perl 5, or Fortran. I look over new languages and technologies as they come out and see if they have something meaningfully innovative that really merits learning and/or switching. Some do. Most don't. Haskell looks like it has a good future right now.


That sounds about right. I've gone back to Java and C++ for most of my own projects because of the uncertainty factor.

(OpenGL is a festering mess, though. DirectX is a wonderful API in comparison.)


Your 'lacks' are features not imperfections.


Same difference. Lack of closures is my biggest complaint about Java, my best language. The design philosophy of the whole System.Windows.Forms library (sub-elements demand how they are laid out, not wrapping elements) is my biggest complaint about C#, the language I use at my day job.

The lack of closures in Java means I have to go write an interface and implement that single method (or go implement Runnable). It creates line bloat which can separate code out too far and makes it harder to read, and so on. The lack of a feature is a weakenss.


It depends who you ask, a lot of developers out there are not polyglots and mostly (especially in the enterprise world) are good old 9-5'ers who have no interest in programming outside of work time. I've encountered many people like this.

Nothing wrong with that obviously, but asking a question like "what is your favourite language" is never going to yield fair results across the board


I think the point here is that you want to weed out such monoglots that lack a deeper understanding of CS and instead find a hacker who loves coding and has exposure to many languages, paradigms, data structures, etc. If that's your goal, wouldn't asking "what's your favorite language" yield very fair results?


Personally I would think you want somebody who can get job done instead of some ADD kid which is jumping from one hyped language de jour to other. But that is only me , YMMW


That is a false dichotomy--just because somebody is interested in different languages does not mean they are "some ADD kid" and, moreover, somebody exclusively working 9-5 with no particular passion to programming is probably not "somebody who can get the job done" especially if the job is non-trivial. And if you're hiring for a trivial position, optimizing your interview process is probably a waste of time anyhow.


It takes a long time to become a truly awesome developer. And working more than 9-5 tends to burn people out over time. Which is why I suspect most of the top programmers in the world are much closer to 9-5'er than most people on HN are willing to admit.

PS: One of my favorite stories of such a person goes something like this. Coder X was fired after failing to get a 6 month project finished after a full year. Greg, took two 40 hour weeks to read the documentation and slap something together to keep the project from slipping, but made a simple mistake which ended up causing significant problems in production a few days later. After fixing the problem he asked the QA people why they put it into production that quickly while missing such a basic issue was not discovered. Their response, we stopped testing your code a few years ago and this is the first problem that's showed up. The most interesting part of this story is if Programmer X had got his code to work after say 11 month he would no have been fired. Which means the company would employ someone that's 3% as effective as this guy.


I love this question and have been using it lately though not tied directly to languages. It works great for frameworks and libraries (think Hibernate, Spring, etc) as well. I am uneasy about programmers who are passionate about a technology without being able to talk the problems with that technology.


I was thinking about this question and agree, it's a good one.

Just out of curiosity: How would you react if my answer is: Shell?


Then I would hope to hear something about dangerous quoting or difficulties in abstracting things or how it affords some fairly dangerous practices and writing rock-solid shell scripts takes disproportional effort vs. other languages or possibly how it can be slow if you're not careful, though I'd consider that a last-tier objection. But it would be a bit of a bizarre choice. I would expect it only if you were coming out of a sysadmin position transitioning to a developer. (Which I've seen, so I don't mean that as some sort of implicit impossibility.)


Actually I'm coming from database programming, primarily in SQL, where scripting can add immense value to whatever you're up to.

That said, I very much agree with your sentiments and it does require effort to write resilient, maintainable scripts.

Nevertheless, for my day to day work it's probably the most useful "language".


I imagine he would say 'What are the weaknesses of bash scripting?'


Perhaps the word 'limitations' might be more appropriate than 'weaknesses'?

A 'weakness' implies some kind of flaw, whereas a limitation is something the language wasn't specifically designed to do or specialise in.


I think weakness is appropriate. For example, I love Python. But I only use it for automating system tasks and data post-processing. It just doesn't perform well enough for me to use it as part of the infrastructure in a high-performance system. I do consider that a flaw; it is a weakness. It is also a limitation, but when given a choice between synonyms, I prefer the stronger one.


This story is a bit embarrassing to me, but I'll tell it anyway, I went for an interview a while ago, where I got asked a basic Javascript question ... problem is, I haven't actually written actual javascript in almost 3-4 years (not simple, but not really that hard either) ... I've been writing jQuery, which is supposed to be javascript, but I digress ...

I know how Javascript works, scoping, hoisting blah blah blah, but I haven't written a for loop, or used an actual getByTagName or whatever in a long long time ... I told the interviewer this, and they seemed cool with that, they asked me to write in pseudo code and I did that, then they asked me to convert it to javascript ... hunh?

Well, I started going through line by line and started doing just that, asking them to refresh my memory about the syntax of stuff, even how to write a for loop (yup, its amazing what spending years using jQuery.each or $.each will do to you :P). Anyway, we concluded and though I was annoyed at how out of practice I was, I thought I did okay.

Well the recruiter who set it up, called me back (very nicely I might add) and gave me the feedback on the interview. The interviewer, (who had been very nice to me too btw), had eviscerated me, writing that I displayed a lack of Javascript fundamentals ... saying I didn't even know how to write a for loop.

I don't blame them, because we clearly shouldn't have been talking in the first place, they were obviously looking for a hard core Javascript guy ... and not person who could just build complex front end UIs & interactions using backbone/ember/spine/jquery/whatever, which is what I was more interested in.

But it also got me thinking about how some engineers fixate on syntax, and use it in judging other programmers, and I realized that in some circumstances it is pretty appropriate.

For example, if you're looking for a specialized dev, then that kind of stuff probably does matter; in that, it can help you spot a star very quickly ... but I also think that over reliance on it could let you miss out on people who could easily specialize to the level you want, but might not have that immediate level of familiarity with the language. But when you have to go through 100's of candidates, is that something you're willing to take the time to look out for? Should you?

Sorry for the rambling, just been thinking about it for a long time now.


You have your specialization / generalization axis the wrong way around, I think. Knowing what a for-loop looks like in a C-derived language is correlated with broad experience; once you know it in C, you know it in Java, JavaScript, C++, C#, etc. But someone who knows primarily jQuery / backbone / ember / spine etc. is much more of a specialist, not a generalist. They have deep specific knowledge of a narrow toolset, rather than broad general knowledge of a wide toolset.

That is, knowledge of language over libraries indicates generality (if you know the language and its idioms well, you should pick up most libraries fairly easily); knowledge of libraries over language indicates specialisms, because you end up a little out of your depth when not wading through the library's DSLs.


I assumed he meant a for(obj in list), not for(int x = 0; i < foo....

It's pretty natural to forget the first syntax if you haven't used it in a while because there's no real standard for it across languages.


Actually its the latter ... I do a lot of python, ruby and jquery (almost exclusively), so I really can't even remember the last time I had to do a for loop.

I've done, C, C++, C# & Java so the syntax wasn't unfamiliar to me at all, and I probably could have recalled it if I had taken 2 minutes to do it, I just didn't think it would be a big deal to ask so I could get on with the code.


I disagree with some parts of the post. I think good engineers have to be able to work effectively at a high "system" level of abstraction as well as at a low "compilation" level of abstraction. If you can't look at a chunk of code and know enough about the language to know that it could throw a ClassCastException, then it is quite likely that you will fall prey to other language gotchas which can bubble up and destroy the entire design of the system you're trying to build.

I don't think the current state of the art in software development has yet advanced to the point where we can just black-box away all of the entire "compilation" stuff such that it never affects the "system" stuff. I really would like that to be the case, because it would eliminate a lot of unnecessary complexity in software development.

I think asking a limited number of compiler-level questions (less than 5) in an interview doesn't take up a lot of time, and can allow you to get an idea of how much actual experience the candidate has with the language as well as dealing with nitty-gritty problems that come up while you're coding. The value and time spent are both small, so the value/time ratio is probably in the same ballpark as any other question you might ask.


I don't know. I remember problems with different classloaders, old versions of classes being deserialized, different versions of classes being sent over RMI, etc. Some of these probably resulted in ClassCastException. Some had thrown more specific Exceptions, am I supposed to remember the exact Exception that was thrown in each case? I'll probably know if you show me stacktrace. But I only know because I've encountered such problems. People working on the other end of our system would recognize different set of problems that results in this Exception or similiar.

Nano questions are bad, because you are really asking if candidate has had the exact same experience that you had. Some did, some didn't, it doesn't matter. Anybody will solve the problem within minutes, most probably googling the most promising lines of the stacktrace, and ctrl+clicking around in Eclipse (or grepping the source tree, whatever).

Even auto-importing packages in IDE can cause problems - sometimes it imports from the wrong package. Is it enough reason to ask questions about "which package contains Hibernate Session class?" or even "which package contains ArrayList class?". I don't think so. Being aware of the problems good abstractions can cause (there's always a few problems) is IMHO enough, no need to remember everything you can google in 5 seconds.

EDIT: or maybe you meant that you just check if people know casting can throw ClassCastException, with that I'm OK.


I for one would be grateful if an interviewer asked me this kind of question. It gives me an instant and unambiguous indication that this is not a place I want to work, saving me a lot of wasted time - and God forbid if I'd otherwise actually ended up accepting a job there.


It’s usually a bad sign about the interviewer’s interviewing skills, not always them as a person or the team.

I have worked for some nice, amiable smart folk who interview like crazy people. It’s the whole > IT skills < social skills thing.

But I empathise - I really don’t like interviews which are like that, especially when they’re usually a game to try and make the interviewer seem smarter than the interviewee.


To me, a perfect interview would be:

"Here's a coding challenge, go home, write the code to solve this, come back tomorrow and tell me three things: - How you did it, - Why you pick this solution, - How it could be improved"

by doing this I could see how he writes code, if he's just a google copy&paster, and what's his skills in algorithm optimization etc...and specially, how he/she thinks.

Quite frankly I don't care if someone doesn't know what Polymorphism is right from his head. I didn't knew what polymorphism was until a few months ago, and yet I was applying the same principles in a lot places in my code. That's the downside of being a self-taught you don't get to know a lot of theory, but on my work I know I'm doing it right. (Also because polymorphism is a very abstract thing to be honest....)

In a nutshell, get developers who can show you their code and can it explain it, don't rely on theory, you are not hiring a college professor.


I believe Any senior engineer worth his salt should be able to do lint style verification of someone else's code quickly. When I am expecting someone to be a senior enough engineer, they should be able to look at someone's code during Code reviews and find the issues in it that can lead to problems without resorting to IDE/debugging.

I do agree that nano-questions are not useful except in situations where you get a resume with keyword bonanza: You know the kind, ones with every language,OS in the first page listed so that they will pass through the corporate recruiter filter. For those, nano-questions trip up but that will give me an indication to dig a little deeper into their IDE usage pattern. If they show some proficiency in it, (for e.g., tell me the command in Eclipse to find all the references to a particular method, if the answer is search in files, .. :)).


If you want to someone to do lint, why not just run lint and save on an expensive hire?

Code reviews are there to find problems with the code that are not found by trivial static verifiers and/or IDEs. This requires a level of understanding of the language and experience in reading (instead of writing) code, but has nothing to do with regurgitating keyword definitions.

Better in that case to just give a code fragment and make them spot the (algorithmic, logic, security, not spelling) errors.


Ok. I was making a point but I guess you are right about lint. I

was trying to point out that it is easy have developers write code that can easily be O(n2) vs O(n log n) because this did not use the right kind of the maps when they were initially building the code. Or I can see developers using HashTables vs HashMaps interchangeably and not see the threading impact. In these cases, some basic questions about their understanding of the classes seem to be a good indicator. Would you consider that a nano-question? I was..


If you happen to be asked such questions it might be a good indication that the type they are looking for is code monkey. Or they are just not good enough to assess engineering skills. In both cases it's a red flag.


Yeah, basically one should always remember that interview with a company always works both ways. It's OK to ask questions or just listen to your internal BS-o-meter while talking with company reps.


I'm kind of on the fence on this.

These questions might seem pretty lame, but as an interviewer it does tell you something about the candidate's level of experience with a language.

If you've worked with a language for any decent amount of time. There are things that you really should know without having to look it up all the time.

This is especially true if you mention on your resume that you're an expert at something. I'm definitely going to ask you a difficult question about it and I'll expect you to answer in some depth.

If you mention you're a Java pro but can't tell me what the 'synchronized' keyword does for example. I'd be concerned.


That's no the same at all!! 'synchronize' and 'synchronized' is part of Java's concurrency model. Every midlevel Java programmer should know that every Object has and intrinsic lock, that you can achieve mutual exclusion among threads using that reserved words... even if they can't recall which one is for methods and which for blocks.


Wow you have high opinion of midlevel, I would guess that a midlevel Java programmer does barly know what locking is for.


If you are trying to hire an "expert" and ask him questions like that, you are doing it really wrong, unless you are trying to scare him away. If anything you want to actually talk to him about what he has done, about the languages, his thoughts and passion in the subject... not ask him first programming classes in college questions.

However if you are trying to hire some kind of junior-like engineer who has never had a job before, i can see why questions like this could be asked, but i still dont think it's the best way to gather knowledge about the person you are interviewings level of expertise.


I think these could be weeder questions for people you know little about.

If you have an applicant who has a github full of great code or experience working for a good software company you can probably skip this.

However if you get a candidate without much on paper but who insists they are a Java expert but doesn't know what the extends keyword does then there is something wrong somewhere.

The problem with asking for definitions for words though is that I personally often forget exactly what these are if I ever learned the correct term in the first place.

For example I knew how to override methods and the differences between the type system in PHP and the one in Java long before I knew what polymorphism or "dynamic typing" meant.


Don't get me wrong. I ask all those other questions as well.

The problem is: people lie.

It's the old thing where if you want to hire a juggler, don't you want to see them juggle?


So ask the programmer to program or debug something, give him a decent IDE and access to Google. Don't ask him to answer trivia. 'Can you fix this simple 10 line function' is much less insulting.

It is a huge turn off for a lot of people and indicates that the interviewer is either too lazy to make the question interesting, or not technical enough to generate an actual good question. Either way it is a red flag.


Why would an experienced Java programmer know off the top of his head which packages certain standard classes live in? It's not something one encounters on a regular basis, and memorizing it confers essentially no advantage.

If you want to ask difficult questions, be my guest. But "what package is class X in?" is not difficult, just foolish.


I’m going to take the incredibly unpopular stance that nano-questions are not considered harmful. It’s true that only asking nano-questions, or emphasizing them, or thinking that a good engineer must necessarily be able to answer all of the nano-questions perfectly are all broken ways of thinking.

But I look upon them as a kind of FizzBuzz. I know for a fact that while you can look them up in Google in 500 nanoseconds, experienced people doing hands-on work are going to be able to answer 2/3 nano-questions instantly. A few such questions sprinkled in the opening part of the interview are useful for weeding out the AbstractArchitectureAstronautFactoryFactories from the Programmers.

I’m not talking about esoterica, e.g. “What is protected inheritance in C++?” Lots of practitioners might say, correctly, that they never use it and can easily look it up if you need to know how it works. And sometimes answering esoterica correctly has negative correlation: You end up hiring people who are SmartButTooBusyPlayingWithCoolIdeasToGetStuffDone (I’m a prize example of this). But if a programmer says he’s working with jQuery and I ask him to explain the difference between $(‘.foo.bar’), $(‘.foo,.bar’) and $(‘.foo .bar’), I don’t want to hear from him that he can look it up on the Internet, a jQuery programmer knows the answer.

It’s acceptable for someone to say, “I don’t know jQuery, but I’m a smart guy, I can figure it out on the job by looking stuff up,” but if he says he’s been using it to build awesome HTML5 applications, I want to ask a few of these questions to make sure that I’m interviewing the person described on the resumé. A working programmer will know the answer to all of them, they shouldn’t be hard. Interview pressure will cause some fuzz, so I don’t expect perfect, maybe get 2/3 or 3/5 right and then we can talk about composition vs. inheritance or whatever other pet “Start a conversation with a smart person” question.

I want to be incredibly clear about this: I don’t think that there is some strong correlation between memorizing things and being a good programmer. I don’t think programmers should rush out and memorize trivia just to “pass” an interview. I look stuff up all the time in my job. But I do think that if the questions are easy and obvious to the working programmer, a few of them are an appropriate FizzBuzz for weeding out the folks who have falsified their hands-on experience.

By and large, interview questions are a touchy subject because they serve as a kind of metric for valuing people. So when I say I think it’s cool to ask a few of these questions, some folks are going to think that I say that I measure their worth by whether they know a handful of bits of information. That’s not the case. I’m not saying you’re unworthy if you don’t memorize things. But I am saying that if you claim to have a certain type of experience, there are some questions that are going to be dead easy for you to answer, and those questions are going to help us get to the good part of the interview very quickly.

p.s. List vs Set is a funny question. I can’t imagine anyone with a degree being ignorant of the difference regardless of the programming language! It’s also a good lead-in to a more experiential question: “Okay, can you describe a time you’ve used a set of some kind? What were you trying to accomplish? ..."


List vs Set is a funny question. I can’t imagine anyone with a degree being ignorant of the difference regardless of the programming language!

That's not what he's complaining about, though, he said that question was perfectly fair game. Because it is something that, as a Java programmer, you actually need to know to do your job. Similarly, the difference between the jQuery selectors is relevant, because those things actually do different things. I'd argue that even your joke example, "What is protected inheritance in C++?" is still relevant, if esoteric, because it's knowledge that could potentially be relevant to how code works and what it does.

You truly never need to know what package List or File is in, though, in the real world. If you're programming Java like 99% of the other people out there (i.e. you're not the type of masochist that thinks they can be productive in a boilerplate-heavy language like Java with nothing but a text editor), your IDE will fill in those blanks, and quite literally hide the import statements from you so you never need to think about them again (unless you mis-selected the class, in which case the fast solution is still not to remember the actual package name, but to delete the offending import statement and "Optimize imports" again, this time picking more carefully rather than mindlessly selecting the first one in the list...).

That said, most Java experienced programmers would probably know that stuff like List is somewhere in java.util, and stuff like File is going to be in java.io, just from having auto-completed them so many times, so it could be a very weak filter against people that are lying about their experience. But I still don't think it's a useful question, at all - if they get it right, it very weakly confirms that they're not lying, and if they get it wrong it's nothing more than a minor eyebrow-raiser, suggesting that possibly they've exaggerated their familiarity (though again, any practicing Java programmer could be very good but still be weak at the "Name That Package!" game, because it's 100% irrelevant to the job). The thing is, you'd get far more information either way by just having them rant about Java in general, or asking them to talk about what pieces of the standard library they use the most, etc.


I program Java in emacs. I work with many people who do. Of course, it's hard for me to say _objectively_ that I'm productive, but my peers seem happy with my work.


I think you deserve appreciation for showing such patience and bravery to be programming Java in Emacs.

On any other day, if the choice of eclipse or equivalents(IntelliJ etc) is not available it practically makes zero sense to deal with monstrosity and needless complexity Java has with a ordinary text editor. Even if that is Emacs. Emacs is still a text editor.

On any given day Java development makes sense only if done on a IDE. And that's nearly every Java programmer works. Exceptions exist, but they only prove the rule.

Having said all that, These days eclipse really does 90% of the coding. You job is only to tell eclipse what needs to be auto completed.


I'm in a similar position as the grandparent - Java coding in Emacs. For various reasons using a smart Java IDE is a pain in our environment (multilanguage code with Java parts). Emacs just works.

Emacs has working autocomplete from Java, especially with Semantic. It's far away from being as smart as something like IntelliJ, but it works well enough. Most functions and arguments you remember after a while. I can type much faster than I can think, so less autocomplete doesn't slow down. In fact, not having to watch if the autocomplete gets it right frees the brain to think ahead more. Maybe it's because I'm used to this.

Import statements are one of those things where you have to switch to Google, though.


I do most of my other stuff Perl/Python and any other stuff apart from Java on Emacs. Some times on Sublime Text 2.

I am now planning to shift to ST2.

Even on an editor like ST2 which is awesome anyway. You get to see what an editor is designed for. Its supposed to make 'Text' manipulation easy. So that is what it is, after everything.

So Emacs with all its power is still a Text editor, albeit a very powerful one.

Every time I work on Text editor I focus on reading manuals and understanding stuff no matter which editor that is. But with Java,IntelliJ and Eclipse its different, I just throw in whatever little is there on my mind and just wait for the autocomplete to do the magic.

Some of my colleagues go a step far. They just can't write any Java code without an IDE and I see that's the case with nearly every Java programmer I've met so far! Even in interviews. Its sort of like if you are talking of Java development its taken for granted that its is happening on an IDE. You never know, a few days from now the Java language specification my include a IDE specification.

According to me tools and languages must enable you think more than you write. Unfortunately in case of Java(and now growingly Python) you just can't work without an IDE.


> (multilanguage code with Java parts)

Yes, this is often a good use case for avoiding tools like Eclipse (IntelliJ is somewhat better), sometimes the multi-language pain is just too great. Especially if you already have to set up a complicated build by hand and interact with several other systems, the IDE can no longer gain you very much.

For pure Java, though...I don't know. I use Emacs all the time for other stuff, but I just feel so naked when coding Java within it (I've tried a few times, but always end up going back), maybe I'm just too used to all the help I get from IntelliJ...


I prefer it.

I have experience working in good IDEs. For many years I did .NET development, and Visual Studio is very, very good.

However, over time I realized that even with all their awesome features, powerful IDEs were a net-loss to my productivity. They work best from a single machine and that made me a lot less likely to work remotely (I have done my best work in the middle of the night, from home). Their less responsive UIs made it easier for me to get distracted. Their slow startup times exacerbated my natural proclivity to procrastinate.

I realized: My working memory is fine for most projects, and emacs' text-based autocomplete fills in the rest.

All I'm saying is: don't assume that the way you work, the tools you prefer, or the tradeoffs you make are universal. There are a lot of programmers out there, and a whole lot of tools.

(If you really care, I have an interview about my setup here: http://aaron.boodman.usesthis.com/)


I never said you couldn't be productive, I'm sure you could be - I really don't mean to imply that there's something wrong with choosing to use a text editor for Java, in fact I have quite a bit of respect for anyone that can do it without going nuts!

I just think that it's a good sign that you can tolerate a lot of pain. :)


You can't remember everything. The real test is how well you can function once you hit "here be dragons" - can you figure it out reasonably quickly and then be back on your way?


I disagree. Fizzbuzz is actually a different beast in that it exploits the generality that people who can't think coherently in complex architectures usually can't think coherently in simple architectures either. It's also why I love it when an interviewee has never heard of fizzbuzz before; it means that I'll get a 100% true test of their ability to think in basic algorithms (i.e. they aren't regurgitating something committed to short term memory just before the interview - although that's usually easy to spot anyway).

Nano-questions, on the other hand, I don't see as useful at all. I spent 5 years writing enterprise Java applications, and I couldn't tell you what package List and File are in without looking them up. I've also been away from Java for a few years and have been using other languages, so I couldn't tell you for sure if the "inheritance" keyword is colon, parenthesis, "extends", "subclass", "specializes", or whatever. So in this case I'd get 0 out of 3, thus weeding out a proven, experienced, enterprise Java architect. Even if I had known the answers, I'd consider it a major red flag that such questions were even asked, as it would bring into question the interviewer's ability to think creatively (and no creative person wants an uncreative boss).


I'm not sure your jQuery question is quite of the same nature as the nano-questions mentioned in the article. Your example is actually fairly conceptual. Yes, it requires them to know the syntax, but asking them to explain the difference ends up being fairly high level.

The examples in the article have no high-level component at all. I don't know what package File is in off the top of my head. I've never needed to commit it to memory, since the IDE will look it up, and if that doesn't work I can look it up myself. It's not useful information. Your question, on the other hand, is useful information.


I think there are some good nano questions that show A) that you have worked with some piece of technology (or at least read up on it well) and B) that you have some deeper conceptual understanding of it.

For example, you could ask how to switch two variable's values in C++ with the aim of finding out whether they know about the swap function (and you can then go on to ask about template specialization for extra credit).

This would be a better question than the ones in the OP because it's not just trivia and it's not something that your IDE will do for you.

Many people will claim to know a programming language on their CV because they spent a week trying it out 3 years ago, figuring that they can just pick it up quickly if they get the job (this might be somewhat true for the 5th or 6th language, but probably not for the 2nd). And these are the same people who will then program in that language for years without ever producing any quality code because they don't realize that there is room for improvement after you know all the keywords.


Now this makes me wonder. Can someone come up with an interview question that's strongly correlated with engineer ability, but sounds terribly unfair to everyone including the awesome engineer who gets hired because of it? How much additional effectiveness can we buy if we allow ourselves to be arbitrarily unfair, and how much unfairness will that imply?


I had a company that was ready to give me a job make me take a PHP test on http://www.123assess.com

After the 10th question asking me to debug 30 lines of obfuscated code in my head while a 3 minute countdown ticked away, I called it a day and decided these were people I didn't want to work for.


"A good engineer thinks abstractly in terms of designing and building systems, they think in terms of algorithms, components, and engineering design. They do not necessarily know all of the details of syntax of a given language"

Precisely. I'll take someone who can think this way before someone who can rattle-off all of the minutiae about a particular language. I've run across too many programmers who don't have a clue about project organization, MVC, data representation, optimization, etc. Yet, they can pass minutiae-filled tests about a particular language.

Unless you've been programming in a single language for an extended period of time you will not have encyclopedic knowledge about that language and its libraries.

Get 15 to 20 languages under your belt and the effect is more pronounced.

I know exactly what it takes to write a number of sort algorithms, genetic solvers, neural networks, real-time embedded OS and more. No, I can't rattle off exactly how to write it in the language of the day. When switching to a language I haven't touched for a while it takes me two to four weeks to "task switch". I surround myself with reference books, use the IDE and any available online resource. Somewhere during that period I start to rock. I get the job done and produce clean and efficient code, fast.

I would probably fail the kind of questioning the article describes. Yet I've been solely responsible for large projects using languages spanning from assembler to Forth, C, C++, Verilog, Lisp and, lately, Objective-C.

Bad programmer! No doughnut!


The real problem is what knowledge the question is supposed to test - is it testing whether you know the answer to the question, or is it testing something else altogether?

Put another way, the problem is less the specificity of the questions and more the ease with which you can expect to earn them.

I haven't used Swing/AWT in two years, and I couldn't really tell you what inherits from what. But after a weekend of breaking through the rust, I'd get back into it, so it's of no consequence to any potential employer.

However, some language-specific questions are very telling. For example:

    How many arguments does type() take in Python?[1]
If you answer '1' or 'either 1 or 3', that tells me two very different things about you. The latter tells me that you may understand that Python uses prototypical inheritance, rather than 'pure' class inheritance, and it tells me that you may have done a non-trivial amount of Python metaprogramming before. If you understand Python's inheritance structure in this way, you're a much more valuable candidate to some companies than you are for simply knowing syntax errors and interpreter-specific quirks... and the opposite may be true at another company).

(Of course, it's possible that you know that and have simply forgotten, or were confused by the phrasing, etc. - no question is perfect, but after enough of these, you start to piece together a picture of the candidate).

The point is, the former question is something that you can reasonably learn during a training period and which asks little more than face value. As for the latter question - you all know that now, so you can also learn it during a reasonable training period. But actually applying that knowledge (which comes with the followup questions) is something that would require a significant level of familiarity with the subject in question, which is what they are really trying to get at.

[1]This may not be the best wording for the question, since it tips the interviewee off to the trick beforehand, but I can imagine a way to present this question so that it wouldn't.


My standard approach to the "determining their depth" problem is to give them a problem where detailed knowledge provides an obvious (or perhaps more elegant) answer, but there are other possible answers.

For example, "how would you implement a least recently used cache in Java" can provide a wide array of answers and tells me a lot about the person's knowledge of the SDK and overall algorithm design. The details of their solution and the ensuing discussion tells me a lot more, no matter what their level, than whether they simply know that LinkedHashMap.removeEldestEntry exists.


This is why as a 20 year veteran of Windows C/C++ programmer I no longer bother applying for C/C++ software development contracts.

I really don't give a stuff that your Boost/STL trick question is missing a semi colon, which in reality would result in pages and pages of false compiler error messages.

I really don't want to try an second guess the compiler and tell you where the missing semi colon should go.

I use the compiler to detect my mistakes. I read the compiler output error messages, understand the message and fix my mistakes.

But I don't pretend to be a compiler. I'm a software developer. I use the tools available to me to write software.


I think it is important for questions to be within the scope of the resume. If the applicant claims 20 years of Java only experience, throwing in a few of those questions is just a sanity check for that claim, especially if that claim is one of the reasons you are hiring them.

A sportswriter who claimed an expertise in basketball wouldn't feel it unfair to be asked a few trivia questions in an interview. If he didn't know how may winning seasons the Chicago Bulls had with Michael Jordan then maybe he isn't as expert in basketball as he claims.

Where these questions are unfair is when the applicant is more of a generalist. They have worked on very diverse projects in multiple paradigms and multiple languages. Their skill lies not in knowing how to use their tools, but in approaching new tools and quickly understanding how to use them. If you are a Java shop and someone comes into the interview with little Java experience then asking questions about Java specific type enforcement is going to leave them a little flustered.

Cater the interview to the applicant, not necessarily to the position. Then evaluate your understanding of the applicant with respect to the position and see how well they fit.


I'm coming at this from the perspective of someone with a pretty good memory for things like this, but those particular "nano questions" seem pretty damn fair to me. They're fundamental enough that it's not really relying on random trivia; they're testing things that you need to know 90% of the time to write a program, no?


You don't need to 'know' them because you can literally find them out in 500 milliseconds. There's no value whatsoever in memorizing it. It's a useless factoid.

I use C# almost every day and if you quizzed me about what namespaces certain types are in, I'd probably get it wrong. That's not because I haven't been using it regularly for years (I have), it's because that shit isn't worth wasting brain cells on.

Even worse, though, the modern programmer ends up using a lot of languages. I have, in the past few years, had cause to write C#, Python, C++, C, Perl, JavaScript, ActionScript, PHP, SQL, Lua, Objective C, and Ruby. All for work. Each one has its own syntax, semantic quirks, standard library, etc. Out of all of the important things for someone to understand about a language - why would you care about something as unimportant as the exact namespace/package path of a particular type? Does that matter? Would you rather know whether I know the exact namespace Adobe's JSON parser lives in, or would you like to find out whether I'm familiar with the ins and outs of the ActionScript runtime?

Honestly, if you think the kind of minutiae this article mentions is a good interview question, there's no way I'd want to work for you, because you don't care about things that matter - culture, candidates' desire and ability to learn, candidates' willingness to teach others, etc.


I just don't know what I would stand to gain by learning that the candidate can recall from memory which package the Java List class is in. It seems pointless to ask.


Fully agree with this post, even not being a programmer 8I'm slowly asking myself why anyway...) I'm not thrilled by the prospect of answering detail questions out of my head. Things like, I already hated them back in university. Nice to check if the candidat can remember the basics, but I'd actually prefer a guy who can not only remeber them but actually use them in context. Coming more from the classical engineering fields, you don't want a guy who can write in norm script on hand written drawings, you want a guy who can use Catia (or what ever) AND can actually design good, working parts. And that actually has nothing to do with Catia skills. Nothing different to my current field in Supply Chain Management, but there I'd strongly suggest using some basic nano questions, sad as it is.


On the list vs. set... This is an "easy" one if you just stick to the standard CS def, or you just know a language that has a clearly defined library offering that... But in PHP, there's technically no difference between a list and a set: An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more. As array values can be other arrays, trees and multidimensional arrays are also possible.


But in PHP, there's technically no difference between a list and a set

Sure there is. In a set, you can't have repeated values. PHP arrays can. Of course, you can implement a set using a PHP array.


I'm well aware of the difference between a set and a list.

My point, which was apparently lost, is that the underlying implementation of these structures is the same in PHP.


I wonder, how would someone interview a doctor. Asking him more of theoritical questions ? Or asking him to do practicals, which I believe might be completely off the books depending on the situtation :). Anyways, there are 1) people who pass the interview very well, and cannot perform the duty on the job. 2) people who do fair on the interview, but are very well executors of the duty. 3) People who really become the backbone of the feature, and become the go to guy for everything and anything, they may or may not perform at the interview.


There seems to be trend toward ever increasing absurdity when it comes to interviewing for Software Engineers. In fact some of the recent HN posting about interview techniques are verging on being a parody of the Knights who say Ni from Monty Python and the Holy Grail ("We want you to cut down the largest tree in the forest...with a Herring !!").

As the post says find the Person who is the best fit for your team/company. Everything else can and will be learned on the job if you get the right candidate.


So an interviewer asked dumb questions, and sometimes they get my orders wrong at McDonalds. NEXT.


Great post. I felt the same way recently in a few interviews.


Excellent article, totally relevant, thanks.


> Basically: Any question that takes 5 seconds to answer with Google is not a good question.

Can't argue there. I haven't done a ton of interviewing in my career so far, but it is important to me to find out how the other person thinks. Being able to cite function names and package identifiers from rote is not important, at all.


From another POV, I would argue that being able to use Google-searchable resources effectively is a very important skill that should be explored more thoroughly in the modern interview process. The examples and code snippets available on the web (e.g., Stack Overflow) can save hours and hours of time (= money), particularly when the official documentation is crappy.

Coupled with that, maybe some questions would be in order about how and when you're legally allowed to use the stuff you find using Google (MIT license? GPL? Creative Commons? How do I have to attribute this stuff? Do I have to release the source?).


I usually open with some nano questions. Sorry, but if you say you have 5 years of experience with C# but can't tell me which namespace List<T> or Stream or SQLDataReader is in, then we're done, because you're lying.


I have eight years of C# experience, and I don't really know. I think the generic list is in System.Collections.Generic or something, but no clue on the SQLDataReader. ADO something something?

I don't think I've ever written an import statement by hand, it really, really isn't important to know.


And ya' know, that would be a fine answer, "I use resharper and haven't even had to think about that in years". I would also accept "System.Collections" as a reasonable answer. You should here some of the responses I get:

What's a namespace? Uhmmm, HashTable? I don't use collections.

Also, if they can't name some namespaces I'll usually ask them what classes they're familiar with for accessing a database or opening a file. If you can't name parts of the framework you use on a daily basis by namespace of class name, you're not going to be a very productive programmer.

If knowing this stuff isn't important, than I'm an expert Java programmer too. I just can't name any of the packages or classes, but I can tell you all about inheritance.


Fair enough. :)


I guess it's hopeless.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: