Live data from Hacker News

Ask HN: Scolded on a job interview for not namespacing

news.ycombinator.com

1–10 of 69 posts

Ask HN: Scolded on a job interview for not namespacing

#1
I went on a job interview for a Quant position.

I wrote out some c++ and I used namespaces like: std::cout, std::merge, etc. I did not write: using namespace std;

The interviewer just lost it. Went on this rant that "how can programmers now write such confusing code", "just name space it ahead of time".

And he was just plain mad. Uncomfortable mad. I tried saying "what if functions have the same name"..he spouted off about "how compilers are smart enough to know what the programmer wants based upon parameters provided and why would any programmer use functions with the same name and how so many people he talks to don't know how to code but call themselves coders...and why didn't I write my own code to merge 2 files. Did I need to use the std.."

What does everyone else do?

using namespace std;

cout merge(...);

or

std::cout std::merge(...);

and I always use std:: instead of writing my own. I mean "time tested" versus "have I had enough coffee...". In 25 years of c++ I always used std:: before re-creating.

Has anyone else had a horror interview like this?

Edit: I didn't shout or get mad. I practiced my Buddhist learning and turned the other cheek without emotion.

Re: Ask HN: Scolded on a job interview for not namespacing

#3
Based on your description of their behavior, the interviewer sounds like an socially insecure and technically incompetent programmer. Even worse would have been if you were hired and worked with this person as organizationally senior to you (shudder). Not exactly "Mr. Mentor" material.

Re: Ask HN: Scolded on a job interview for not namespacing

#4
I used to use namespaces but a developer/client of mine had some sort of issue with them. (By issue, I mean a technical problem like name collision or something.) Ever since then I stopped using them. I find it helpful to be able to look at function name and instantly know what library it came from.

Added: You dodged a bullet.

Re: Ask HN: Scolded on a job interview for not namespacing

#6
At least in my experience, no compiler will save you from having to suddenly manage namespaces if you add a dependency mid-project that has namespace collisions.

I always use STL functions with the explicit namespace, since I work in the namespace of the code I'm writing by default (to not cause other people problems with collisions down the line).

I've seen this done in other projects and thought it was a good practice.

Re: Ask HN: Scolded on a job interview for not namespacing

#8

Ah Quants. All the best shouting matches in my last office were between the Quants arguing over things that ultimately were a matter of taste. Proper storming out and slamming of doors arguments.

The math guys I interviewed with were totally awesome. We talked about strategy, pure arbitrage stuff, probability, Martingale vs Ant-Martingale, Turtle trading. It felt like a conversation at a coffee house.

Then comes this guy in afterwards...

Post reply on HN