1,410 karma · joined April 29, 2009
I hope to one day be remarkable.
My intuition is telling me this is true.
and My intuition is telling me this is true. Let me test it.>Under a scientific framework, input from intuition, tradition, experience, common sense, experts, and logic might be incorporated during the construction of a preliminary hypothesis
Of course, I'm assuming if you have legal/contractual restrictions against open source, those restrictions also apply to making code publicly viewable.
We often hire C++/C#/Python/Perl/Ruby/Objective-C/Java/etc (seriously, we use all those languages) to work on existing code bases. We work on Linux, VMS, Windows, iOS, and BlackBerry. We have plenty of "glue" code, frontend code and code that needs to deal with large amounts of data.
We don't expect recent graduates to have much coding experience. You seem to think that we have some strict checklist which is not the case at all. I really don't know where you got this idea. My initial comment was simply meant to answer the OPs question. I don't always ask those questions, I weight many things in my decision (including whether I think I conducted the interview well - sometimes it's clear that I've failed to properly describe the problem) and discuss the candidate with other people who have also interviewed them.
While people might not need to write searching and sorting algorithms much any more, understanding the difference between an ordered map and a hash table can be crucial in many common "real world" scenarios.
I also have tried to stress that the answers to my algorithm questions are only part of the criteria in determining whether we hire someone or not. I brought them up because the OP asked specifically about coding questions, not hiring questions.
That said, C++'s standard library has a next_permutation function that returns the lexicographical next permutation of a pair of iterators (actually it does it in-place and returns a bool). If a candidate used that I'd allow it (as long as there was some discussion as to how it worked).
I've since stopped asking that question and now stick primarily with the split array question as I think it's less tricky. There's more than one way to solve it and most of the solutions build up on simpler solutions which makes for good discussion. I also don't ask for actual code for that problem unless I get the feeling the candidate will understand the problem better by expressing it in code.
For the split array problem I rarely ask for code (only when I think it will actually help the candidate), it's just a discussion. It usually goes something like this:
Candidate: Well I can sort it first, then do a binary search.
Me: How would you sort it?
C: I'd use quicksort.
M: Can you do better than an nlogn algorithm?
C: Well I suppose since it's two pieces that are both already sorted, I can just find where they are split and then rearrange them.
M: How would you find the split?
C: I can go through each number until they stop increasing.
And so forth. The "best" solution (that I've come up with, anyway) is to find the split using a modified binary search, and then use a regular binary search on the piece that might contain your query. Not everyone gets that and that's okay.In addition to asking coding questions I always ask candidates about previous experience and projects they've worked on. Sometimes the answers to these questions are more important. Most of the people I have been interviewing, however, are recent graduates or students who are just finishing college and may not have much experience or many projects that really engaged them.
I spend a lot of time thinking about how I can improve interviews within the confines of how my company conducts them. I've stopped asking the permutations question as I feel that it has too much of the "aha!" factor in that either the programmer goes "aha!" and solves it or they don't.
As for what I get out of the interview - you're right, it's not going to tell me how good of a programmer the candidate is. But it will tell if they can code, and will give me some idea of their problem solving abilities. (I've also personally solved both questions without help in under 15 minutes each, though not under stressful interview conditions).
I attribute this to two things, first I think our phone screenings work well enough to keep out people who really can't do FizzBuzz, and second that I'm fairly generous during interviews. I often don't expect real code, sometimes I'm satisfied with just a discussion of the algorithm (no white board coding at all). I don't expect code to compile and I even let candidates use undefined "helper" functions (although I usually only allow that if I get the feeling that they could implement them if asked).
* For those that are curious I have two favorite questions - print out all the permutations of a given (ASCII) string and describe a search algorithm for a sorted array that has been split in two and the two pieces have been swapped (i.e. - 4,5,6,7,8,1,2,3).
I myself have been guilty of this but I eventually realized my own hypocrisy and just stopped caring about it. I'm a cool twenty-something techno-hipster - not because I want to be so much as because that's who I am.
If the court decides that encryption is like a safe then, regardless of how impossible it is to open the safe without a key, the court can coerce you into decrypting your HD.
However, if the court decides that encryption is like a secret language that only you can translate (a more accurate representation of encryption, in my opinion) then they will likely rule that they cannot coerce you into decrypting the data.
This is pretty much the same thing they are demanding from her - we don't want your password, we want access to your hard drive.
If you change your passwords often then you don't need to worry about this as much.
All of the incidents I have read about have been legitimate problems, but I personally would have handled all of them very differently.
This particularly incident, for example, probably could have been solved simply by e-mailing github. In Shaw's case, he assumed they were in on it. I'm sure he had his reasons, and certainly the troll behind dongml gets no sympathy from me but I don't think blaming github and dragging them into this was appropriate.
Honestly I've never understood why some people (seemingly) defend him unconditionally. It sounds like he's a really stand-up guy in real life, but I'm still willing to call out my friends when I think they've gone too far.
-Niki Yoshiuchi
I don't see how that makes github "out of touch" nor do I see how this situation was created by a "general disregard of customer service." Granted this might be true, but it doesn't sound like it had anything to do with this particular incident.
In the case of Apple, they have made modifications to the library itself. They are then using the library, with modification, in Safari. Safari can be released under any license as outlined in section 5/6 but not the modifications. Those need to be released.
Technically speaking, you are only allowed to refuse to answer a question if you believe that answering will incriminate yourself.