What does such and such a library function return?" and they'll say "two strings" but don't know if it's a list or a tuple, of if it ever returns None, or whether it raises an Error etc.
I program in three languages in any given week, not to mention using CloudFormation where every resource type has its own configuration. Why would I try to remember what a function returns off the top of my head?
For instance, I do a lot of work with Python and Boto3 - the SDK for AWS (https://boto3.amazonaws.com/v1/documentation/api/latest/inde...). Why memorize what any of the literally hundreds of functions return when I can just call the function and inspect the response within the IDE?
I think OP's point was that the person gives a vague answer off the top of their head instead of checking the doc to see what the actual concrete type is.
If a dev stopped me from working on something to make me look up some documentation for them that they can easily look up themselves, I’d be sort of annoyed.
If the extra info in the documentation wasn’t actually important to the code implementation, I’d be more annoyed.
If the goal of asking is to help me grow as a dev, please directly tell me what it is I need to learn.
It seems like the OP is just as vague as the junior dev when it comes to communicating.
If the senior dev saw something in the junior dev’s code and thought it was important to look at the documentation, why not just tell the junior dev that? Why does the senior dev have to tiptoe around and ask leading questions?
Whiteboard interviews are generally supposed to test understanding of abstract concepts that form the basis of most programming languages, rather than something specific.
An IDE isn't going to help you with an effective whiteboard interview question. If someone is asking you about specific APIs in a whiteboard interview, they're likely doing the interview wrong.
But if you are doing yet another software as a service CRUD app, or some bespoke app that no one outside of the company will ever see, how relevant are “abstract concepts” as opposed to just sitting some one down to an IDE with a skeletal non working class with failing unit tests and telling them to modify the code to make the tests pass as a pair programming session?
The first time I encountered an interview test like that, was for a company that had a SAAS for railroad car repairs. The coding itself wasn’t that complicated in an abstract way, but the business requirements were insanely complex.
This is just a preview. Going down the rabbit hole of rules around railroads is like going to a tvtropes article.
I mainly use java, but why would any developer ask another developer what a function returns, when the person asking can just check that in 2 seconds using an IDE, why ask another developer?
- Not all IDEs show method signatures.
- Not all languages have IDEs developed specifically for them.
- Some IDEs require configuration/plugins to have that feature.
- Some IDEs will give you method signatures for Standard libraries, but not custom ones.
etc.
If an IDE exists that does indeed return such information, not using it is using the wrong tool for the job. And in almost all cases, it does. I can't think of a major language that doesn't have a jetbrains ide that does such things. If people want to spend time manually looking up signatures and manually formatting their code in whatever editor, fine. But if they are lazy and don't do this work, then blame it on not wanting to use a proper IDE when one exists, they are not doing their job and frankly, shitty engineers.
I can’t think of a single semi mainstream language that doesn’t have some type of plug in for VSCode.
But we are talking about the return value. While because of the crazy way that you have to instantiate Boto 3 in Python, an IDE can’t give you intellicense and you have to look up the docs to know the arguments, you can still assign the response to a variable, put a breakpoint on the call and see the response.
I program in three languages in any given week, not to mention using CloudFormation where every resource type has its own configuration. Why would I try to remember what a function returns off the top of my head?
For instance, I do a lot of work with Python and Boto3 - the SDK for AWS (https://boto3.amazonaws.com/v1/documentation/api/latest/inde...). Why memorize what any of the literally hundreds of functions return when I can just call the function and inspect the response within the IDE?