←back to thread

1764 points fatihky | 1 comments | | HN request time: 0.203s | source
Show context
lordnacho ◴[] No.12701486[source]
I'm amazed he knew things in such detail. I mean who would know just how long a MAC address is? Or what the actual SYN/ACK etc tcp flags are? You just need to know what they're used for, and if you need the specifics, you'll find out with a single search. He seemed to know that as well though. Kernighan for bit twiddling algos, that kind of thing.

It's a bit strange to have someone non-technical interviewing a techie. You end up with stupid discussions like the one about Quicksort. If you point out qs is one of several things with the same big-O, you'll probably also get it "wrong". But the real problem is that a guy who is just reading off a sheet can't give any form of nuanced feedback. Was the guy blagging the sort algo question? Did he know if in detail? Does he know what the current state of research on that area is? There's no way to know that if your guy is just a recruiter, but I'm sure even a relatively junior coder would be able to tell if someone was just doing technical word salad.

I wonder what would happen if ordinary people recruited for medical doctor jobs? Would you be comfortable rejecting a guy who'd been in medical school for 10 years based on his not knowing what the "funny bone" is? Wouldn't you tell your boss that you felt a bit out of that league? It's amazing you can get someone to do this without them going red in the face.

replies(34): >>12701588 #>>12701606 #>>12701620 #>>12701625 #>>12701648 #>>12701659 #>>12701722 #>>12701725 #>>12701748 #>>12701796 #>>12701805 #>>12701854 #>>12701894 #>>12702003 #>>12702005 #>>12702106 #>>12702118 #>>12702186 #>>12702310 #>>12702312 #>>12702327 #>>12702439 #>>12702478 #>>12702496 #>>12702544 #>>12702566 #>>12702572 #>>12702655 #>>12702699 #>>12702757 #>>12702829 #>>12703332 #>>12706141 #>>12708605 #
tptacek ◴[] No.12701606[source]
I knew all these answers too, because I was a developer in the 1990s.

There is absolutely no purpose to knowing off the top of your head how long an ethernet address is, or even what system call will retrieve an inode (his bickering over stat() "filling in" rather than "returning" was bogus, for what it's worth). The top Google search result for each of these questions has the answer. Knowing these things isn't part of being a practicing programmer; knowing how to find out is.

replies(9): >>12701685 #>>12701692 #>>12701960 #>>12702093 #>>12702100 #>>12702332 #>>12702334 #>>12702435 #>>12702610 #
mox1 ◴[] No.12701685[source]
The question was what function "returns" an inode.

Those functions return a error code, you pass in a stat structure and the function populates that structure.

He was saying (correctly), that they don't return (in the classic C sense) the inode. They return an error code.

To me that is a big difference...

int lstat(const char path, struct stat buf);

vs stat* lstat(const char *path);

2 completely different functions.

replies(5): >>12701767 #>>12701989 #>>12702007 #>>12702335 #>>12703194 #
edanm ◴[] No.12701767[source]
This strikes me as an entirely trivial point, the meaning of the question was pretty clear. It wasn't "what is the literal return value". Many APIs will return error codes, and people still talk about them as "returning" certain values colloquially. Of course, if the OP's answer would've been "it returns an error code :) but I assume you're talking about..." I would think that's fine.

Btw, that is the only thing I really disagreed with OP on, the rest seemed just ridiculous.

replies(5): >>12701862 #>>12701943 #>>12705596 #>>12706655 #>>12707078 #
jknoepfler ◴[] No.12701943[source]
There's a precise distinction, and thinking about it as "returning" anything other than an error code is chummy human thinking rather than the sort of precise knowledge the test was (supposedly) looking for. The question was actually worse than asking "I'm thinking of a number between 1 and 10, what is it?" because rather than applying a random filter to candidates, it punished the candidate for having precise knowledge.
replies(2): >>12702249 #>>12702781 #
alttab ◴[] No.12702249[source]
The difference is memory management, completely different. Don't ask me for a function that "Returns" something in a technical interview and when I call you out on it say I'm wrong, when I'm not.

It's a technical interview, the question should have been technically correct. "What function passes by-reference copies of inodes?"

replies(1): >>12702778 #
bpchaps ◴[] No.12702778[source]
My worst offense of this was for a linux admin position when asked from another abmin about how to list connections on a machine. My answer was "lsof -i, since I've found it's easiest to pull granular information."

"lsof just prints open files... you would use netstat, not lsof."

I tried correcting him, but he wouldn't listen and ended the call soon after.

I never received a call back.

replies(1): >>12703597 #
dekhn ◴[] No.12703597[source]
Most people don't know that lsof works into two modes- the typical one is to run it against a process ID. The rarer one is no args, which runs it against everything on the system. however, I observe that lsof needs to run as root to print the same information that netstat -tanp returns for a reglar user.
replies(1): >>12706034 #
1. bpchaps ◴[] No.12706034[source]
Yeah, you're right about needing root (edit: for processes not owned by the current user). Though, if you have the access, it's a very, very worthwhile tool to learn:

  ~ $ lsof -a -n -c chrome -iTCP:443 | head -2 #sanitized output
  COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
  chrome   1234 me   12u  IPv4 12345      0t0  TCP 127.0.0.1:12345->127.0.0.2:https (ESTABLISHED)