6 ms·
I'm a retired data architect and C developer with 36 years of professional experience. In my opinion, this is not how you find an appropriate candidate. It wo
by njd 10y ago
I'm a retired data architect and C developer with 36 years of professional experience. In my opinion, this is not how you find an appropriate candidate. It would be better to ask substantive questions that are related to the thing you are making. What does this person bring to the team? How will the team receive this person? Has this person delivered something of substance in the recent past that would convince you that he/she would succeed on your project? How was this person an asset on their previous job?
- fiedzia 10y agoThose are questions for juniors. Most likely they had no previous job at all. The only thing they can bring is potential, and this question tests it rather well.
- cableshaft 10y agoDoesn't stop people from asking these questions of people at all levels. I still get asked these coding questions pretty much every interview I have had, and I have almost a decade of programming experience, and have even been lead programmer on some projects (without the title). I've been asked a barrage of these questions for senior positions, even. Especially sucks because I don't usually program terribly fast or well in an interview environment, so I look worse than I actually am, and often get put on the defensive in these interviews, which I absolutely hate.
- collyw 10y agoHave you ever needed to flatten a list in your career outside exams and interviews?
- iguanayou 10y agoYes.
- scarface74 10y agoYes. Something like: List<List<Blah>> records; We would send a request off to multiple services, wait for all the responses and then the front end would sometimes need all of the lists and other times need it flatten. How would I do it? var allitems = records.SelectMany(b => b).ToList();
- mannykannot 10y agoI am not an enthusiast of this approach to recruiting, but to be fair, the purpose of the question is not to find someone to flatten lists. It is reasonable to ask, if a programmer cannot flatten a list, in what sense is that person a programmer? Putting aside the question of whether this is a good approach to recruiting, if this question is being failed with any regularity, it raises some interesting and important questions about the innate difficulty of programming and/or the methods by which it is taught.
- brudgers 10y agoIf the person flattens a list with the: Google Copy Paste Algorithm, are they a programmer? Are they more or less of a programmer if instead they use racket or clojure's built-in =flatten=?
- mannykannot 10y agoIt is the cases of failure that are interesting and informative, and if the methods you mention are the only ways a person can solve the problem, that counts as a failure - as I mentioned, this is not actually about flattening lists.
- zzzcpan 10y ago"Have you ever needed to flatten a list in your career outside exams and interviews?" I had to write this function to flatten a tree of expressions, so I could sort them by precedence, etc and fold them into a tree. I already had a bunch of higher-order primitives for constructing a parser and that was basically a lazy hack for me to get expressions parsed. I eventually implemented a proper expression parser, that was basically the same thing, but produced a flat list from the beginning.
- cableshaft 10y agoI mean, I once wrote a python script called unearthed.py that took all the files in all subfolders and put them into the parent folder, then deleted the subfolders, but I'm pretty sure I just used a simple os.walk for that. Came in handy when working with rom archives that liked to put everything in its own folder, and a couple of times when I just had a bunch of crap that I didn't want to have to manually dig up anymore. Other than that? No, not really.
- throwaway2016a 10y ago> Have you ever needed to flatten a list in your career outside exams and interviews? Yes, multiple times in multiple languages. C, C++, Javascript... sometimes "npm install" is not the answer.
- throwaway2016a 10y ago> Have you ever needed to flatten a list in your career outside exams and interviews? Yes, multiple times in multiple languages. C, C++, Javascript... sometimes "npm install" is not the answer.
- fiedzia 10y agoExactly once. But I needed to know recursion, typechecking, and modern language features almost every day.
- WkndTriathlete 10y agoFlattening a list of lists is a problem that occurs quite frequently in functional programming. OTOH, in functional programming languages and frameworks, there is no need to actually write a method that does that since it is usually a library function call.
- brudgers 10y agoIt does not really test potential because a junior trained in Java has poor tools for flattening a list because idiomatic Java would not represent hierarchical data structure as a nested list. Idiomatic Java would use tree and node objects. Idiomatic Java also prefers arrays over lists for sequential data. An experienced programmer might look at the problem and choose a better tool: a different language or call a service or rewrite the offending code that produces a nested list or any one of a dozen things that are not bashing away with the hammer of Java.
- fiedzia 10y ago> An experienced programmer might look at the problem and choose a better tool: a different language Come on, you are not going to call Haskell or Python to flatten a list in your Java. > or call a service I know we have "micro" services now, but really? Sending serialized data to ListFlatteningService to get deserialized FlattenedList? > or rewrite the offending code Something may produce it because it makes sense it its context, while it doesn't for you. No offence here.
- deleted 10y ago[deleted]
- brudgers 10y agoI make no claim to being a good programmer or having high potential (of any sort but the wasted), just the ability to occasionaly mimic those who are. Charged with flattening lists, I'd write my Java in Clojure. (flatten [1 [[2] [[3 4] [5 [6]]]]]) as much of it as I could because it would be less work and easier to read and maintain and debug. Since nested Java lists are isomorphic with trees, there's more than one way to deserialize them: inorder, preorder and postorder. Flattening deserializes in preorder. Expecting different consumers of the nested list to deserialize it in different ways might be a reason that producing a nested list makes sense in a particular context. Once we start talking about "consumers of the nested list" we are using the language of services. That, for better or worse, is a road that currently tends to lead to micro-services.
- ng12 10y agoSounds to me like that's a really god way to hire people who are really good at bullshitting. The absolute hardest thing about hiring developers is hiring people who I can trust to write code. Most applicants are just not adequate programmers and any other redeeming qualities they have can't overcome that core deficiency. I need people who can look at different ways to solve a problem, implement an approach that makes sense, and explain why it does. I need code reviews to be about architecture decisions and correctness not lessons on how to write code. If someone can't do that I really don't care how well they can sell themselves as an "asset".
- walshemj 10y agoyes its a very artificial Q a better one might be how would you use a computer to measure how efficient 100 different toilets are :-)