Live data from Hacker News

Ask HN: Scolded on a job interview for not namespacing

news.ycombinator.com

21–30 of 69 posts

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

#24
post #12

Honestly if I ever had someone yell at me in an interview I'd just pick my stuff up and walk out. Cheap way of figuring out you don't want to work there. Give feedback to the recruiter of what is unacceptable behaviour. As to the actual point I'm with you: be explicit. I write std::cout too. Not that I'd get upset if someone used "using namesace std" as long as such using statements are used judiciously, it's fine. L…

Why bother giving feedback to the recruiter? That's only going to improve the company he's not going to be working at, rewarding them for already failing to do their jobs (who put this guy is an interviewer's position? etc.)

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

#25
post #12

Honestly if I ever had someone yell at me in an interview I'd just pick my stuff up and walk out. Cheap way of figuring out you don't want to work there. Give feedback to the recruiter of what is unacceptable behaviour. As to the actual point I'm with you: be explicit. I write std::cout too. Not that I'd get upset if someone used "using namesace std" as long as such using statements are used judiciously, it's fine. L…

I'm with you. I'd say "Thanks for your time" and leave, giving feedback to the recruiter. If anyone at my company did that in an interview, we'd certainly never put them in an interview rotation again, and there might be further repercussions. There's one guy in our office who is a brilliant programmer, but when reviewing code, he's incapable of seeing anything but the negatives. (Upon reflection, he perhaps did this on purpose to get out of interviews... ha.)

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

#27

No matter what type or kind of interview you go to, it is unacceptable to be treated like this, even if you have started talking nonsense or unrelated to the interview questions. This guy's attitude represents what is currently happening inside that company: the environment must be extremely toxic to work in and as the others have said, you have just dodged a bullet. In all seriousness, I wouldn't want to work for su…

A billion? I'd do it for a billion. I could put up with a year of that for unimaginable wealth. Probably even a million to be honest.

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

#29
To answer your final question: No, I haven't. Lucky me :)

I think there's multiple levels to this.

1. On a personal level: You clearly dodged a bullet.

Also:

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

Kudos to you.

2. On a more organizational level: That's what style guides are for, end of discussion (a coherent code base is worth much more than individual subjective quibbles). Would the guy have been a professional, the answer should have been "you'll have to change the style to match our style guide, but that doesn't matter here".

3. On a technical level: I don't write much C++ code nowadays, but yeah, I also always use the std:: prefix.

My reasoning would be this:

- "using namespace X;" in a header is a no-go anyway (I don't think is negotiable).

- In a .cpp file, I'd rather only operate in one namespace implicitly to avoid a giant mess of overloads. To the argument "compilers are amazing": Editors are not, I can guarantee you that much.

- I never write code for std, since that's reserved for the standard library and STL. So, for me, there's no valid reason ever to use "using namespace std;".

- On the "confusing" argument: I'd wager you'd never use std::cout directly except in very simplistic scenarios. Usually, there's either an abstraction (typedef is your friend there, if you want simpler names), or you write your own functionality on top of it (certainly not in the std:: namespace). Similarly, if one of your functions contains more than a couple instances std::, it probably is way too big, anyway.

But then, the technical level is the most subjective part of all of them.

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

#30
I am not c++ developer myself, so can't help on the namespacing decision, although a quick search on a project made by google, it seems they don't although I assume it will change from team/company to team/company who might have their own guide styles: https://github.com/google/flutter-desktop-embedding/search?q...

having said that, the question here is not who is right but the unprofessional behaviour shown by the interviewer.

I'd suggest to write to the company's HR or even to one of their c level managers and tell them about this situation. I think it's hasn't been the first time and that even this toxic behaviour is not a surprise within his coworkers.

Post reply on HN