I spend lots of time reading about smart people's opinions on programming, and will be able to recite that knowledge and play it off as my own hard-earned experience. I could talk for an hour about tradeoffs between Vagrant and Docker, without ever having spent more than a few hours actually working with Docker.
If the interviewer is really sharp they could maybe dig deep enough until they see that there's nothing beneath the surface, but I suspect most wouldn't do so even if they were capable.
I also ask people to implement the Blum Mental Hash, which I heard about on NPR in 2014. It's easy enough to explain in five minutes or so, but difficult enough to write out in a half hour or so.
https://scilogs.spektrum.de/hlf/mental-cryptography-and-good...
I've had so many co-workers talk, passionately, about stuff they don't have the faintest scent about. It's shocking.
Unless you actually oversee a candidate work and reason through a representative problem, implement it and articulate it, there's no good way to gauge competence.
1. I ask about prior experience, following up on any interesting resume items or comments. I try to act like a "biographer" (per the book "Who") and just learn their story.
2. I ask them to describe data flow in a basic web app. If I push this UI submit button, explain the progression of data from the client to the database.
3. I ask for an explanation of core concepts of the framework I'm interviewing for or any one they've used.
4. I ask about version control concepts and some specific git commands.
5. I ask about prior team practices, e.g. what types of meetings they have and what the interviewee thinks of their effectiveness.
6. I ask about their knowledge of ops/DevOps, e.g. explain how a pipeline works.
7. I ask about basic CS/object orientation/language concepts, e.g. static vs. dynamic typing.
8. I ask what their most interesting project or story was and why it resonated with them.
9. I ask what their toughest debug was and how they solved it.
10. I ask about their experience with testing and opinions on how best to do it.
Between all that you get a pretty decent picture of what level they're at and what is their capacity to learn.