3 ms·
I've done this by deriving most of the functional constructs in the language. At the end the guy was finally like, do you know lisp? Most people just don't ha
by base698 10y ago
I've done this by deriving most of the functional constructs in the language. At the end the guy was finally like, do you know lisp? Most people just don't have the knowledge base and think you don't know what you're doing.
- brianpgordon 10y agoThat sounds like a reasonable question to me. If you're rolling your own versions of built-in constructs then you're writing code that's hard for other people to maintain. It's a bad sign when the interviewee writes weird, non-idiomatic code. I interview people all of the time who say that the programming language they're most familiar with is Java but use classic Java 1.4 style iterators to loop over a List. It's a huge red flag.
- base698 10y agoWhat about JS with multiple idiomatic styles? I was asked what filter and each do, which I wrote out because they are super small. Easier to show a little code to explain.
- sharms 10y agoThis sounds like jumping to conclusions: 1. Simple iterators vs Syntactic sugar both pass the same unit tests 2. The 'Java 1.4' style closely matches idiomatic golang code, which has high adoption and maintainability 3. People who want better iterators, also want better everything, leading them to use more progressive JVM languages like Clojure and Scala rather than just waiting for the Java spec to move forward I don't see a 'red flag', just simple contextual differences
- hota_mazi 10y agoI see plenty of red flags, starting with a developer who hasn't kept herself updated on a technology she uses every day. Sure, she might be forced to use 1.4 in her job but surely, any developer who's a bit passionate about what they do would be aware of the more modern version of their tool of choice? If we use 1.8 where I work, I can't really evaluate whether she'll be able to adjust since she didn't make any time to adjust these past ten years.
- sharms 10y agoRephrased: 'I prefer the 1.8 style and I hire people based on that'. For interviewing, the 1.4 style is totally valid, works in more environments and achieves the same result. I don't red flag folks who answer questions based purely on small preferences, in the same way I wouldn't red flag you for writing these loops instead of using map / reduce concepts instead.
- cle 10y agoIf this is what you care about, then ask questions that lead the interviewee to demonstrating knowledge of these skills. Demonstrating skill with functional-ish "stream" APIs means the developer is a lot more likely to understand any impl's built on functional paradigms (e.g. Spark, actors, etc.), or at least can pick them up very quickly since the APIs and semantics are quite similar. A candidate who writes list.stream().filter(...).map(...).collect(...) gets big bonus points in my book. I'll ask them about efficiency, to see if they know when to drop to for-loops. If they write a 1.4 for-loop, I'll ask them to evolve or parallelize it to see if, at some point, they stop adding complexity to their loop and instead switch to a cleaner functional style. Starting from a for-loop and asking to implement some simple transformations like filters, reverse, group by, map, etc., does wonders to separate the wheat from the chaff here.
- rpdillon 10y agoItem 46 in Effective Java is to prefer new-style iteration. I think dismissing best practices is a warning, though perhaps not dire (it could just be ignorance / oversight / the pressure of that interview).
- woah 10y agoItem 46???
- throwaway91111 10y agoThat's what code reviews are for, though. You can't be expected to commit flawless code for (environment x) on day one.