Live data from Hacker News

Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

news.ycombinator.com

81–90 of 363 posts

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#81
post #37

I have been unable to think of one for Linux system administrators. :-(

I've seen a good one -- actually got asked it in a phone screen I did last year: "How would you recursively delete all files with extension 'mp3' in a given directory tree?" The (simplest) correct answer (I know) is find /path/to/wherever -name "*.mp3" -exec rm -fv {} \; Maybe that's more of a pons asinorum , I suppose, but then isn't a pons asinorum precisely what a fizzbuzz question is meant to be?

The simplest would be

    find /path/to/wherever -name "*.mp3" -delete
This works at least in GNU find and FreeBSD.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#82
post #78
post #31

Earlier quoted context omitted.

I'm not a mathematician, but it looks to me like we know E(x,z) is false. The transitive property gives us E(x,y) & E(y,z) => E(x,z) but since we know !E(y,z), we can infer !E(x,z). (I'm not a logician, either, so I hope you'll excuse what may be imprecise phrasing on my part.)

Your result is correct but your reasoning is not sound. A & B => C and !B does not imply !C.

Well, I already admitted I'm not a logician: if A & B => C, (!A | !B) => !C looks implicit to me, and while this isn't the first time I've had my nose rubbed in the fact that it's not, I never could understand why not.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#83
post #70

For sysadmin/ops jobs, I want to see debugging ability in addition to programming skill. I usually ask about HTTP and DNS (for web-focused) or Kerberos/AD logins (for user focused). There are a lot of moving parts to either of these, so a question like: "You type a web address into a browser, it doesn't load" can turn into questions about the DNS resolver process, system and network config, split horizon, time setup,…

More sysadmin / troubleshooter focused person here, and I love this sort of question. It also brings out people who will throw out things like "do a network capture". Then you either get the "well, send it to the network team!" answer or the (much more desirable) "look for X, Y, Z, or something weird in N...".

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#84
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

Follow-up question: "Should you?"

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#85

For a data scientist I ask "what's a p-value?" Both Junior and senior candidates often get this wrong. The only difference is that senior people bristle at such a simple question before also getting it wrong.

It's always possible that if so many candidates get this wrong, especially senior ones that your understanding might be incomplete, or possible not understanding clearly. I often find that people get these pet questions and think they understand them when they don't really. I'm not even a data scientist or statistician and could tell you what a p-value is. I find it hard to believe experienced candidates can't.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#86

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

Should I parse it as tossing the same coin 10 times, or choosing from the jar 10 times?

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#87
post #17

I have been unable to think of one for Linux system administrators. :-(

I've found 'list 10 two-letter linux commands and their use' They don't actually have to think of 10, but their answer can show what they've actually had to do on a *nix system. Its also lets you prod them with questions like 'how might I get disk usage' or if they mention dd, ask them how they use it, what its good for etc.

I was surprised I could actually think of 10. Using both dc and bc seems like cheating, though ;)

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#88
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

Just curious, why do you not allow the interviewee to use jQuery? Do you expect the candidate to know JavaScript's DOM-level APIs without having to look them up?

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#89
post #37

Earlier quoted context omitted.

I've seen a good one -- actually got asked it in a phone screen I did last year: "How would you recursively delete all files with extension 'mp3' in a given directory tree?" The (simplest) correct answer (I know) is find /path/to/wherever -name "*.mp3" -exec rm -fv {} \; Maybe that's more of a pons asinorum , I suppose, but then isn't a pons asinorum precisely what a fizzbuzz question is meant to be?

The simplest would be find /path/to/wherever -name "*.mp3" -delete This works at least in GNU find and FreeBSD.

At which point I'd argue that using -exec with an appropriate command is simpler, in the general case, than using one of find(1)'s many, many, many twiddly little command-line arguments. Granted, -exec spawns a process per file, but processor cycles are cheaper than brain cycles, &c., &c.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#90
post #82
post #78

Earlier quoted context omitted.

Your result is correct but your reasoning is not sound. A & B => C and !B does not imply !C.

Well, I already admitted I'm not a logician: if A & B => C, (!A | !B) => !C looks implicit to me, and while this isn't the first time I've had my nose rubbed in the fact that it's not, I never could understand why not.

[deleted]
Post reply on HN