Live data from Hacker News

Ask HN: Scolded on a job interview for not namespacing

news.ycombinator.com

51–60 of 69 posts

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

#51
It's possible he was acting, trying to put you in a "high-pressure situation" to see how you'd react. If that's the case it sounds like you probably did OK.

If on the other hand he was just being his normal charming self, then I guess you now know why they're hiring. Nobody hires because it's awesome; they hire because they have to. Which is because the last person quit. Which is because of this asshole.

I've had rude interviewers, but never to the point of ranting like that. In the moment I mostly just keep going with the rest of the interview and make the best of it, but later on I always come up with lots of ballsy things I could've said. Including some version of the above like "OK I think I just found the source of your turnover problem" and point at the guy...

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

#53

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.

In the short time that I worked at a quantitative hedge fund (all of 2007, basically), the quants were the absolute nicest, friendliest people in the whole company.

If you were even slightly technical and curious, almost any of them would answer whatever questions you had and would casually shoot the shit about anything in their nerdy areas of interest.

This in contrast with the one floor trader who repeatedly and forcefully kicked me while I was under his desk replacing the Bloomberg keyboard he spilled his Sprite all over...because 3 minutes and from half the building away wasn't a fast enough response time for him.

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

#54
> Has anyone else had a horror interview like this?

Here's my horror story from last year where the interviewer was getting frustrated at my mistakes in dictating C++ over the phone and abruptly cut off the interview with "It's clear you are not right for this position. Goodbye."

This was for a hedge fund infrastructure dev position... I wonder if there's something in the water?

https://news.ycombinator.com/item?id=17727794

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

#55
post #47

I hate typing the same thing over and over... so, yeah, I'd use namespace std. However, for an interview, you are correct. This is something too trivial to mention or "get mad" at...

Typing is cheap. Debugging, reverse-engineering and refactoring is expensive. Taking shortcuts just because you don't like typing a few extra characters is a bad habit to have, it leads to the kinds of code that has obfuscated variable names, no comments, 'clever tricks' that put way too much logic in a single line, etc. I used to think like you, but I realized saving a few keystrokes is almost never worth it.

The difference is name spacing is a feature of the language. It's not a clever trick or short cut.

Would you fully qualify every reference then? I'd argue that would add more clutter and obfuscation.

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

#56
post #47

I hate typing the same thing over and over... so, yeah, I'd use namespace std. However, for an interview, you are correct. This is something too trivial to mention or "get mad" at...

Typing is cheap. Debugging, reverse-engineering and refactoring is expensive. Taking shortcuts just because you don't like typing a few extra characters is a bad habit to have, it leads to the kinds of code that has obfuscated variable names, no comments, 'clever tricks' that put way too much logic in a single line, etc. I used to think like you, but I realized saving a few keystrokes is almost never worth it.

Except when it comes to Vim. Amiright? jk

But really though, this is solid, sound advice. And it's a great way to relate it back to business value. The extra half-second incurred when it comes to additional typing is going to be far less than the time saved when it comes to clarity gained from looking at the code again. Whether that be for future development, debugging, or whatever else.

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

#57
post #43

Earlier quoted context omitted.

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…

"when reviewing code, he's incapable of seeing anything but the negatives" isn't is the purpose of code review

Nope! It's part of the code review process, for sure, but it's not the purpose of code review. The purpose of code reviews is to have better code at the end of it. That includes pointing out bugs, improving fine-but-inefficient code, praising good code, encouraging documentation, and providing learning experiences for the developer and anyone else reading the review.

Furthermore, interviews != code reviews. For an interview, not only is the candidate putting their best foot forward, but the interviewer should be putting their best foot forward, as well. It doesn't matter if Joe is the best programmer in the company -- if he's abrasive, you don't want to put him in front of prospective candidates.

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

#58
Most of the comments here are focused on the interviewer’s behavior. As for the code, I make it a policy to never, ever use “using namespace x” because of the potential of namespace pollution/confusion. Always prefix standard library identifiers with std::

I didn’t think this was even controversial.

I also always use this-> to access members even when I don’t have to. Write things explicitly so there is no potential for confusion when someone else reads your code.

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

#59
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.)

Feedback is not a reward. It's a way to improve processes, and if we as a group give feedback then we as a group benefit. That recruiter might move on to another company, and you might benefit when you interview there next. Or you might benefit from someone else having given feedback to a recruiter at the next place you interview. Or it could come back to you in myriad other ways.

The idea that it's only worth doing things with a direct and immediate benefit might appeal to some people's Randian insensibilities, but it's really quite broken.

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

#60
1) Your style of code is much more common

2) Even if it wasn't, either or, it's not a big deal.

3) That kind of behavior is not normal even in the presence of a serious problem. I would expect self control around a security flaw in production, let alone a triviality in an interview.

Don't tolerate this. You're worth more than this.

Post reply on HN