My thought process was:
Well, most of the code I use uses a Reverse Communication Interface. But, I think these are pretty old-school projects, maybe I should start by talking about the Object Oriented interface to the library that we recently did. Or maybe I can talk about the file IO based interface that I did, it was extremely cursed but kind of funny. Wait, oh shit, is this about UI?
But I keep an open mind, and am always ready to be pleasantly surprised.
Depending on how recently I'd been working on our printer drivers I also would likely need clarification. Now if the job is "frontend developer" I agree, someone needing to clarify if you're talking about a user interface or communication layer interface is probably a bad sign.
But if it's a looser role I'd definitely look to clarify the question!
I guess you could just give a generic answer: an interface represents some kinda boundary between users and implementation details, and hopefully said boundary is easier to use than the details.
I would guess some would flag that as a bullshit answer, but without clarification you can't do anything but speak in generalities.
Now if it were the interface keyword, they're primarily a means by which to introduce polymorphism. They no more achieve the goal of a generally-defined interface than does a regular class, which already satisfies the definition of the generally-defined interface through their public methods. This might also sound like a load of bullshit to some.
It isn't an easy question, but I'd really suggest to see such broad questions as a chance to show off your knowledge, instead of a potential trick question where the teacher expects you to read their mind and gives you an F if you answered the wrong question. If an interviewer isn't happy with a broad answer to a broad question they can always ask you to go into detail on a specific aspect. Having demonstrated that you have a broad overview and a high level understanding is valuable either way.
"What is an interface?", is a totally legit question that can be answered without thinking about any specific interface. E.g. it could could be described as a systemic boundary between two domains, that is ideally well defined. You could talk about different interfaces, what the advantages and pitfalls of introducing interfaces are, conventions that exist etc.
In my experience, outlining one or a few things you call interfaces would be a much better display of both knowledge and attitude: GUI, API, interface keyword or concept in some programming language, etc. Even better, add a quick description of what they all have in common ("broadly speaking, a way to access a set of functionality" or something like that).
And THEN you may ask "would you like me to elaborate on one meaning in particular?"
This isn't school where teachers give you trick questions and you fail if you misunderstand it. If you are applying as a software developer and you can't talk at length about various forms of interfaces you are probably not very experienced. UI, API, ABI are all interfaces..
After I went through my experience with Java, C#, python, etc. he said, “I meant like… Spanish…”
Because even of you were thinking about spoken languages, what does "knowing" mean? I "know" Hungarian exists, I know how Hungarian sounds like, I know how Hungarian words look like, but that doesn't mean I speak or understand it. Now if it was clear they meant apoken languages we could infer from the context they want to know about our skills with different spoken languages and didn't read our CV, which at least where I am from always contains a languages level with a skill level (e.g. German A1, English B1)
So yeah interviewers can suck at their job.
Please explain leetcode live sessions, random brain teasers (how many pinball balls blah blah blah), weird off-the-wall questions (you were just in a plane crash/you wake up as a cockroach), AI trivia screeners, and the rest?
My approach to interviewing is that I want candidates to do the best they possibly can.
Now if a terse question deserves a terse answer that's to be judged on a case by case basis, I suppose.
As a matter of fact, yes, that's the best approach, but only because if you receive a question like the OP's, you've already lost and have to just take a blind bet.
would be my answer.
It's hard in the moment, but we'd do well to appreciate that not passing a myopic screen is likely a blessing.
Each time I've gotten my way it turned out to be a great decision. When I've acquiesce to "but they knew all my java trivia questions" it's been a bad choice.
"Depends in which context we are talking about it, but in the broadest sense it is a defined systemic boundary between two different domains. E.g. a User interface marks the boundary between the user and the program, an API could mark the boundary between the program and other programs, an ABI can mark the boundary between binary data and programs who read that data and so on. Ideally you want those interfaces to be well defined as theh act as translation layers and other systems can start to rely on the shape of an interface. "
I could then talk about why interfaces can act as a decoupling layer etc.
In Object oriented programming, it's a contract between two encapsulated modules: you define how one should be used, without exposing internals, and the other will have only this contract to manipulate the module.
Otherwise, for a graphical interface, it's a translation between what the machine can do and what the human can see.
Maybe the interviewer is okay with either answer, but I could easily see this question resulting in bzzt, you’re wrong if you happen to be thinking the way the interviewer isn’t.
Heh. I had a brian freeze just reading that. That is not a basic question, just because the concept is fundamental.
"An interface is roughly how a system is designed to be interacted with. A web page can be an interface with your bank if they have online banking. An API can be an interface for a back-end service to provide to other back-end services. Did you have anything specific in mind?"
"Ah, so you meant OOP, got it!"
One of them I remember being especially unfair - "if one of our systems connections goes down, how would you troubleshoot it"? I had what I thought was a great answer, reviewing logs, looking for errors, verifying the server or system had internet access, etc... They informed me that the correct answer was checking that the ethernet cable was plugged in...
Along with feeling completely defeated after the interview (since I really needed a job at the time), I felt like it was an extremely loaded question and my answer should have gotten a +1, especially since my answer discussed internet access. I did dodge a bullet though. That startup failed 15 months after my interview.
Everyone’s architected a system, handled communication with stakeholders, contributed to technical direction of the team, mentored other developers, etc etc
It’s funny the stuff I assume is really easy and common and keep getting reminded that the world is really diverse.
I got things like inverting signed values 2-complement form, or bit shifting a float, or casting structs to arrays and poking at the bytes.
After starting i asked them if they had checked with AI, and they had apparently tested the quiz and it scored quite bad, so it was a good filter. (even if a-lot of the questions leaned more into puzzle solving than coding or design)
Can't you just vibe-code your way through it?
Genuinely curious on your thoughts on this idea here.
The arms race never stops.
If they built the bot themselves, they've already proven themselves to the extent that an online coding exercise would.
An online coding platform is going to be all js. You can track key press and mouse events and probably get a good idea of what's obviously real and what's not.
There's already a user-side AI program for talking to customer service phone systems. (Need to find the reference. Really good idea.)
(I can't find the reference. It's buried under a sea of advertising for company-side chatbots. Anybody remember the link?)
Paet of it is that a lot of places just aren't hiring to begin with. So I guess I shouldn't be surprised that those who remain either have poor processes (maybe some by design) or don't know how to find what they are looking for.
I'm not sure how to parse this.. you've done hundreds of interviews, as the candidate, in 9 years of experience?
I refuse to do that to. Usually you can just curse or talk gibberish until the system gives up and you get redirected to a human.
If that doesn't work, just find another communication method that does - send an email to a C-level address if you can find/guess one.
That said, the other side of the equation is also bad, for employers. I was asked to conduct some interviews recently. I asked the most basic of questions (like absolutely basic stuff, "what is an interface?" level basic). The number of people who said "I don't know" is far less than the number of people who tried to spin stories, make shit up on the fly etc. One guy boasted that he learned programming on his current job (never coded before) and now is a rock star leading a team of 5 people. His confidence was so high, I thought we might have a winner. For the next 20 minutes, he couldn't answer anything, even from his own resume. That is not even the worst part - while leaving, he had the audacity to ask "When can I start?".
Recruiting is broken from all sides. Recruiters working on commission are the worst, but employers and job seekers aren't far behind. I have no clue if this is true in other industries, but in tech it is bad, very bad