11 Replies - 1096 Views - Last Post: 31 December 2018 - 06:01 AM

Poll: Interview question involving a programming language's standard lib (5 member(s) have cast votes)

If a candidate for a job wrote in their resume that they are familiar with a particular programming language, is it fair to ask that candidate questions regarding the standard library used in the language?

  1. No. A language is only the syntax and keywords. It doesn't include the standard libraries. (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. Yes. A language encompasses the syntax, keywords, and the standard library. (3 votes [60.00%])

    Percentage of vote: 60.00%

  3. It depends on how specialized the knowledge. See discussion below. (1 votes [20.00%])

    Percentage of vote: 20.00%

  4. Yes, as long as it is something a student would run across in their first semester with the language. (1 votes [20.00%])

    Percentage of vote: 20.00%

Vote Guests cannot vote

#1 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6765
  • View blog
  • Posts: 23,069
  • Joined: 05-May 12

Interview question involving a programming language's standard lib

Posted 29 December 2018 - 07:26 PM

If a candidate for a job wrote in their resume that they are familiar with a particular programming language, is it fair to ask that candidate questions regarding the standard library used in the language? For example, they say they know C++, it is fair to ask them how to how to convert a string to lowercase in a locale sensitive manner without using the C tolower(), but rather use the std::ctype<> class instead? If they say they know Java, is it fair to ask them to setup logging for a class so that warnings and lower priority messages are dropped?

Or is company that asks these type of question, probably not somewhere you would want to work at anyway?

Now, what if it's not the company asking the question directly, but rather the company uses a pre-screening testing service (ex. Pearson) that asks you a question like this?

Is This A Good Question/Topic? 1
  • +

Replies To: Interview question involving a programming language's standard lib

#2 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12526
  • View blog
  • Posts: 45,655
  • Joined: 27-December 08

Re: Interview question involving a programming language's standard lib

Posted 29 December 2018 - 07:36 PM

Quote

If they say they know Java, is it fair to ask them to setup logging for a class so that warnings and lower priority messages are dropped?


This may reflect poorly on me, but I have worked with Java for ~10 years (granted not so much in the last few years), and I have minimal experience with the Logger class.

For me, it would raise red flags if someone didn't know how to use the basic ArrayList functionality. Beyond the basics like that, I would be more concerned with their ability to learn new frameworks and their comfort making reasonable design decisions. Can they think and learn? These are the most important skills for a software engineer, once they meet the threshold of basic competence.

Someone I know who has interviewed candidates told me that Intro to Programming level questions are usually sufficient to weed out the majority of incompetent folks. I haven't interviewed folks, so I'm sure others here will have better insights than me on this matter.

Quote

Now, what if it's not the company asking the question directly, but rather the company uses a pre-screening testing service (ex. Pearson) that asks you a question like this?


I think if a service is posing technical questions rather than potential coworkers, then that is a company I would avoid. The signal it sends to me is that they don't have technical people and don't know what they need. This is a recipe for feeping creatures, unicorns, and overbearing managers.
Was This Post Helpful? 1
  • +
  • -

#3 jimblumberg   User is offline

  • member icon

Reputation: 5678
  • View blog
  • Posts: 17,442
  • Joined: 25-December 09

Re: Interview question involving a programming language's standard lib

Posted 29 December 2018 - 09:27 PM

Quote

If a candidate for a job wrote in their resume that they are familiar with a particular programming language, is it fair to ask that candidate questions regarding the standard library used in the language?

Yes. In general the standard library is part of the language so general knowledge would be applicable.

Quote

For example, they say they know C++, it is fair to ask them how to how to convert a string to lowercase in a locale sensitive manner without using the C tolower(), but rather use the std::ctype<> class instead?

It would probably a fair question, but don't be too surprised if you get a blank stare back unless the candidate stated they have more than a "simple familiarity" with the language.

Jim
Was This Post Helpful? 1
  • +
  • -

#4 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11423
  • View blog
  • Posts: 19,476
  • Joined: 19-March 11

Re: Interview question involving a programming language's standard lib

Posted 29 December 2018 - 10:26 PM

I would say that "fair" is not necessarily the right benchmark. You want "relevant". Does this question expose something useful about the candidate's background, skills, and aptitude for the position? If so, it's fair game, IMO.

I suspect that python's attitude towards libraries is different from most languages. First of all, thanks to pip and the insistence on writing highly idiomatic ("pythonic") python code, the boundary between standard libraries and other libraries is maybe more permeable than in most languages. This means that, second, there are just a ton of libraries that someone can be reasonably expected to know about and third, that if they don't know about it, it's reasonable to expect that having learned about it, they'll be able to use it in short order. So quizzing people about the "standard library" would feel like an exercise in trivia, but asking people to use idiomatically-written libraries that they're not familiar with would be a much more interesting exercise in my part of the world.

But if someone wants to have a pub quiz instead of an interview, I'll take itertools for $200, please.
Was This Post Helpful? 3
  • +
  • -

#5 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1354
  • View blog
  • Posts: 4,179
  • Joined: 12-May 09

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 06:27 AM

I don't want to quiz them about standard library stuff on the spot, but I do watch for signs that they haven't worked seriously in the language. For Java, if they don't use standard collections (ArrayList, as mac mentioned), or don't know how to use generics, etc it's a warning sign. For ecosystem standards, I'd rather just have them review some code or look at some code they've written, which isn't always easy. I care less about them knowing about multiple ways to do things in the stdlib, even less so for historical ways.
Was This Post Helpful? 1
  • +
  • -

#6 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6765
  • View blog
  • Posts: 23,069
  • Joined: 05-May 12

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 04:50 PM

Here is an interesting tangent to this: would you expect your candidate to be able to read the error messages generated by the compiler, linker, and/or build system commonly used in that ecosystem (think Gradle, Maven, gulp, etc.) and give you a rundown off what you look for to fix the error?

I'm just thinking back to number of times I've written in the C/C++ forum that part of learning the language is learning how to read the compiler and linker error messages.

Or is this question only relevant for a DevOps or build engineer position?
Was This Post Helpful? 0
  • +
  • -

#7 Martyr2   User is online

  • Programming Theoretician
  • member icon

Reputation: 5359
  • View blog
  • Posts: 14,256
  • Joined: 18-April 07

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 07:32 PM

As someone who has done the interviewing of candidates before, I would expect them to know the basics of the standard library but I wouldn't necessarily question them on the finer points. My main interest is more on how they solve problems, how they research things and if it fits with the rest of the team. I never expect anyone to memorize the functions but they should know that a certain function exists and where they can quickly find out the details and documentation. I think asking technical questions on fine grained syntax and features is a waste of time and the big software companies (FB, Google, Microsoft) all agree with me. They have recently changed their interviewing style to focus more on tasks that someone may encounter in their job and how they solve the problem, not ridiculous questions about a function that may or may not change in the next version of the language.

But in short, I do expect them to know the well used parts of a library but if the company/interviewer knows what they are doing they wouldn't be focusing on that.

This post has been edited by Martyr2: 30 December 2018 - 07:34 PM

Was This Post Helpful? 2
  • +
  • -

#8 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6765
  • View blog
  • Posts: 23,069
  • Joined: 05-May 12

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 08:03 PM

So no red flags if you ask a candidate to do some string or array manipulations in C, and they happen to use memcpy() with overlapping ranges? (For non C programmers following this thread, memmove() supports overlapping ranges, but memcpy() does not.) How about mixing up source and destination parameters for strcpy()?
Was This Post Helpful? 0
  • +
  • -

#9 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11423
  • View blog
  • Posts: 19,476
  • Joined: 19-March 11

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 10:16 PM

Well, that's kind of a different question, isn't it? If they happen to pick a library to use and they do something unsafe or unwise, I'd definitely want to ask about that. Was it a momentary brain fart, did they forget about the behavior of that function because they were thinking about the logic of the problem you're asking them to solve, did they just assume it would be fine and not think about it? I would be really interested in their reaction when you ask about it. After all, one of the things I want to know about a potential colleague is how they react to their own mistakes. We know there will be mistakes, I want to work with people who can make a mistake and recover gracefully.

Quote

Here is an interesting tangent to this: would you expect your candidate to be able to read the error messages generated by the compiler, linker, and/or build system commonly used in that ecosystem (think Gradle, Maven, gulp, etc.) and give you a rundown off what you look for to fix the error?


That's a nice one. Understanding the error messages is certainly a sign of someone who's made mistakes and profited from them, so if they do make good use of that information, I like that.

This post has been edited by jon.kiparsky: 30 December 2018 - 10:52 PM
Reason for edit:: removed repetitive repetition

Was This Post Helpful? 2
  • +
  • -

#10 BetaWar   User is online

  • #include "soul.h"
  • member icon

Reputation: 1598
  • View blog
  • Posts: 8,424
  • Joined: 07-September 06

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 10:23 PM

I typically refrain from direct library-based questions unless we are hiring someone for a position in which the library is a necessity and we want them to be able to hit the ground running (minimal onboarding). Typically I will request that they accomplish a certain goal (converting a string to lower case) and see how they implement it for whiteboarding along with pick their brain on why they chose the way they did. Now, that doesn't mean I won't give bonus points for someone using the library to the fullest, but I very seldom remove major points for someone manually doing things - especially if they can explain what they are doing and why they are doing it.

That being said, I have also asked a question in the past of "shuffle a deck of cards" and had the person attempt to spend the entire time writing a truly random random number generator. When I asked why they didn't use rand said that it would always generate the same sequence - which is correct, if they didn't seed it, but they apparently didn't know that. So, by watching how they approached the problem and the hangups they had on it, I was able to get a fairly good sense that they would be someone that wanted to reinvent all the wheels.

Also, general interviewing tip: Don't say that you hate the language that is primarily used for the job your are interviewing for - it won't end well.
Was This Post Helpful? 2
  • +
  • -

#11 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11423
  • View blog
  • Posts: 19,476
  • Joined: 19-March 11

Re: Interview question involving a programming language's standard lib

Posted 30 December 2018 - 10:55 PM

Quote

I was able to get a fairly good sense that they would be someone that wanted to reinvent all the wheels.


And also, that if you were to hand them a wheel, they might not do a very good job of rolling with it.
Was This Post Helpful? 1
  • +
  • -

#12 jeffindenver   User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 180
  • Joined: 07-August 15

Re: Interview question involving a programming language's standard lib

Posted 31 December 2018 - 06:01 AM

"Familiar" is a pretty loose term, and also it's far from claiming expertise. That's how I would describe a language I knew but not too well.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1