News for hackers. Stuff that matters.
Re:How Can We Achieve Age Diversity in Silicon Valley? by S4M on Monday October 19, 2015 @10:41AM (#10413180)
> I usually sneak in a couple of technical questions for the interviewer and he blew those questions

That's interesting, how do you ask technical questions to interviewers without being too direct? I am genuinely curious about it.

Re:How Can We Achieve Age Diversity in Silicon Valley? by DavidWoof on Monday October 19, 2015 @12:12PM (#10413793)
I momentarily "forget" something that's only tangentially related to the problem at hand. It's usually something like "I've been working primarily in the new (or beta) version for the past three months, do you remember if you could do it this way in the current version, or is that a new feature and I have to do it this other way?".

The trick is finding something minor but indicative. Things related to testing frameworks or immutability are usually good IMO. Things that are incredibly important to good devs but afterthoughts to medium-level devs.

Lately, I've been asking about C# read-only autoproperties, which just came out 2 months ago. That's a really minor nano-feature in and of itself and sounds like an overly-technical syntax aside, but if you're a c# dev and you care about immutability then the lack of that feature was a constant annoyance and you would be intensely aware that it wasn't possible. So if you just don't know or don't care, that tells me something about what's important to you (The usually caveats about ensuring exactly what is the interviewer's primary daily language apply, but that's usually easy to determine).

Re:How Can We Achieve Age Diversity in Silicon Valley? by steven777400 on Monday October 19, 2015 @01:12PM (#10414223)
I'm a C# dev and I had to lookup this new feature since it didn't ring a bell. I'm curious, why is this is a big improvement of just having "private set;" in the auto-property? I'm not being sarcastic, I genuinely want to know.

(Incidentally, in terms of your filtering, I absolutely categorize myself as a "mediocre" or "medium-level" developer, but that doesn't mean I don't care about things. Just that their value may not be immediately obvious to me.)

Re:How Can We Achieve Age Diversity in Silicon Valley? by DavidWoof on Monday October 19, 2015 @05:00PM (#10415714)
readonly means the property is immutable. It can't be changed after construction, period. "private set" suggests it can be changed at any time, but only privately.

Like I said, it's a small item, but if immutability is a primary concern to you during class design, then typing that "private set" constantly (or alternately, using a backing field) annoys you just a little bit multiple times a day. You're acutely aware of it and its workarounds.

Most devs, even most "advanced" devs, don't think about immutability that much. I would never dream of using this as some kind of hiring filter when hiring devs, it's too obscure. But if I'm on the other side of the interview chair, I find it useful to know if your top devs, the people you rely on to evaluate others, care about things like that.

OTOH, in practice, I think the question turned out to be not nearly as useful as some of the testing questions I've asked in the past.

Re:How Can We Achieve Age Diversity in Silicon Valley? by briHass on Monday October 19, 2015 @02:00PM (#10414510)
It is actually the equivalent of a private backing field that is marked readonly.

  public class Person{

     private readonly string name;
 
     public Person(string name){
        this.name = name;
     }
  }

It's syntactical sugar that shaves a few lines of code off, particularly if you aren't setting values from parameters in the constructor and just want readonly values that are inherent to the class.
Re:How Can We Achieve Age Diversity in Silicon Valley? by recursive on Monday October 19, 2015 @01:56PM (#10414486)
With private set; you still have to invoke the setter in the constructor. For some cases, it's more readable to have the value of the property calculated in the same place that the property is declared.

Also, when reading code, private set; doesn't guarantee that the property is reassigned elsewhere in the class. You have to read the whole class to verify that.

Re:How Can We Achieve Age Diversity in Silicon Valley? by S4M on Monday October 19, 2015 @02:58PM (#10414842)
Actually, I would use that technique of mentioning a cutting edge or rarely used feature of a language, not to discretely test the interviewer as he does, but to show off my knowledge and redirect the conversation on something I will be familiar.
Re:How Can We Achieve Age Diversity in Silicon Valley? by felixgallo on Monday October 19, 2015 @11:21AM (#10413440)
Just ask how they would do X. They'll either be appreciative of your engagement, or appreciative of an opportunity to show off. Never fails.
Re:How Can We Achieve Age Diversity in Silicon Valley? by crdoconnor on Monday October 19, 2015 @01:58PM (#10414504)
I sometimes 'ask their opinion' on taking a certain approach when there's a right way and a non-obvious trap.

If they get the question right they'll feel smart for a second and it gives you an opportunity to bond - you can laugh together about the idiots who did it the wrong way.

If they get the question wrong they're usually oblivious to it. Opinions can't be wrong, right?