Re: Brainbench perl test?
The thread reminds me of a story my brother told me years ago about when he was hiring for a games programmer position. He remembered a good question from _his_ first job interview - How would you find the intersection between an object traveling in a parabola and a plane? The interview went from this question to: How would you find the intersection between a parabola and a line in two dimensions? How would you find the intersection between two lines? ... What's a cosine? Each question getting the answer I don't know. It must have been horrible for the interviewee.. -- Jasper
Re: Brainbench perl test?
On 5 September 2012 23:25, David Cantrell da...@cantrell.org.uk wrote: Nor's a naive iterative method though - it takes no time at all before you overflow your ints and then (assuming that you're aware of this and use bigints, instead of just doing a fandango on core^Wvariable) every single operation after that is on bigints, and so is like trying to suck molasses through a straw. Python seems to handle big integers much better (that is a complete Python newbie's POV). Maybe you could switch language ;) -- Jasper
Re: Brainbench perl test?
On Thu, Sep 06, 2012 at 10:23:21AM +0100, Jasper wrote: On 5 September 2012 23:25, David Cantrell da...@cantrell.org.uk wrote: Nor's a naive iterative method though - it takes no time at all before you overflow your ints and then (assuming that you're aware of this and use bigints, instead of just doing a fandango on core^Wvariable) every single operation after that is on bigints, and so is like trying to suck molasses through a straw. Python seems to handle big integers much better (that is a complete Python newbie's POV). Maybe you could switch language ;) But to Python 2, or Python 3? That is the question. Python 3.0 was released December 3, 2008. As listed on PyPI - packages in red don't support python 3, packages in green do. Hopefully one day everything will be greener. Status: 82/200 Updated: 2012-09-01 04:23:39.745820 http://python3wos.appspot.com/ Nicholas Clark
Re: Brainbench perl test?
On 5 Sep 2012, at 17:35, Abigail wrote: [...] No. Well, it filters out the wannabees. It doesn't recognize the serious coder. If, given the Fibonacci sequence, or a similar recursive formula, and your first instinct is to solve it with recursion or iteration, you aren't serious. Isn't the *point* of this to be a simple test to quickly filter out the no-hopers? I'd hope it wasn't the *only* test. Were I to be given this particular chancer-filtering shibboleth at an interview, I'd smile and comment that it's a classic interview question, and then explain that I don't have a mathematical background and thus don't know if there's a clever algorithm to find the Nth element in the sequence in less than linear time[2], but I'd research it if this was a problem that came up in real life as opposed to an interview. I am, after all, a programmer who usually hacks on server backends, not a mathematician or computer scientist. I'd then note that there are two recursive solutions, one atrocious but which most-closely models the mathematical description, and one merely rubbish that has an optimisation hack, and also a more sensible iterative solution (unless there's the aforementioned mathematical trick) and ask the interviewer which they'd prefer before making a stab at it in my doctor's handwriting on the whiteboard. The interviewer now knows several useful things me: I've been around the block enough to recognise famous problems[0], there are holes in my knowledge but I know they exist and I'm prepared to find and learn new stuff where necessary, understand recursion and algorithmic complexity and trade-offs between time, space, and code legibility[1], and will ask questions to clarify requirements rather than go off and possibly implement the wrong thing. Of course, booking.com is famously odd, so your interviews may well optimise for different abilities in their staff, and so this may not be not a good question for you. TIMTOWTDI applies to interviews too. [0] Although if they asked me to prove Fermat's Last Theorem, I would suggest they might want to interview Andrew Wiles instead. I have no idea if he's any good at Perl, but given academics tend to be lousy programmers, the odds aren't good. [1] The only reason you'd ever use the expensive recursive solution! [2] Or at least, the solution needs more mathematics than would be required for something like write a function to return the sum of integers from 1 to N, which has a reasonably obvious constant-time solution and is the kind of problem that does appear in real code.
Re: Brainbench perl test?
On Thu, Sep 06, 2012 at 03:55:36PM +0100, Peter Corlett wrote: On 5 Sep 2012, at 17:35, Abigail wrote: [...] No. Well, it filters out the wannabees. It doesn't recognize the serious coder. If, given the Fibonacci sequence, or a similar recursive formula, and your first instinct is to solve it with recursion or iteration, you aren't serious. Isn't the *point* of this to be a simple test to quickly filter out the no-hopers? I'd hope it wasn't the *only* test. Well, I responded to uri who claimed it was the distinguish between wannabees and serious coders. But in my book, being able to calculate the Nth Fibonnaci number doesn't make you a serious coder. It just means you've past one hurdle, and I will have some followup questions. You haven't failed the interview, but you haven't shown that you're a serious coder yet. But if I gave you a recursive formula (Fibonnaci or something similar), and you show that you know how to calculate a generating functions, you do score bonus points. Extra points if you can even do the calculations in a few minutes. Heck, I'd even give some points if you know what generating functions are. Abigail
Re: Brainbench perl test?
On Thu, Sep 06, 2012 at 10:31:49AM +0100, Nicholas Clark wrote: On Thu, Sep 06, 2012 at 10:23:21AM +0100, Jasper wrote: Python seems to handle big integers much better (that is a complete Python newbie's POV). Maybe you could switch language ;) But to Python 2, or Python 3? That is the question. Bigints are builtins and so far as I've heard, and after some 2.x version all ints are longs automatically if needed. Python will just go until it eats all your memory :)
Re: Brainbench perl test?
On 09/06/2012 02:34 PM, Abigail wrote: On Thu, Sep 06, 2012 at 03:55:36PM +0100, Peter Corlett wrote: On 5 Sep 2012, at 17:35, Abigail wrote: [...] No. Well, it filters out the wannabees. It doesn't recognize the serious coder. If, given the Fibonacci sequence, or a similar recursive formula, and your first instinct is to solve it with recursion or iteration, you aren't serious. Isn't the *point* of this to be a simple test to quickly filter out the no-hopers? I'd hope it wasn't the *only* test. Well, I responded to uri who claimed it was the distinguish between wannabees and serious coders. But in my book, being able to calculate the Nth Fibonnaci number doesn't make you a serious coder. It just means you've past one hurdle, and I will have some followup questions. You haven't failed the interview, but you haven't shown that you're a serious coder yet. maybe i overstepped in calling that a serious coder filter. i would never just use that determining a skilled coder. it could be useful to filter out the total losers. i speak to hiring managers all the time and they give out similar tests just to filter out the losers. i review perl tests for a partner agency. i have seen test results that would make you blanch they were so bad. my favorite which i have seen *multiple* times is for a basic merge sort. given a set of large sorted files of lines, write an efficient merge sort. basic stuff and many do ok with it. the dumbest ones read in all the files into a single array and then call sort. then they wait for heat death. the second dumb answer i see is a proper merge sort of only *two* input files into an output file. then another merge sort of that output with another input file until all the input files are done. faster than a full sort but it reads in much of the data N times or so. that is a much more real world problem than fib but the idea of efficiency (which is key to this client) seems to get lost on too many candidates. i have to give ratings on these tests and my partner decides based on that whether to submit them to their client. as you would expect, those answers get downgraded a lot. uri
Re: Brainbench perl test?
On Thu, Sep 6, 2012 at 12:56 PM, Uri Guttman u...@stemsystems.com wrote: maybe i overstepped in calling that a serious coder filter. i would never just use that determining a skilled coder. it could be useful to filter out the total losers. i speak to hiring managers all the time and they give out similar tests just to filter out the losers. There seems to be some evidence that even trivial problems are a good way of filtering, http://www.codinghorror.com/blog/2010/02/the-nonprogramming-programmer.html (and neighboring posts) is an interesting entertaining ( slightly disturbing) read. I can't imagine scheduling an in-person interview without a phone screen and ideally a github link beforehand. Paul
Re: Brainbench perl test?
On 6 Sep 2012, at 22:07, Paul Makepeace pa...@paulm.com wrote: On Thu, Sep 6, 2012 at 12:56 PM, Uri Guttman u...@stemsystems.com wrote: maybe i overstepped in calling that a serious coder filter. i would never just use that determining a skilled coder. it could be useful to filter out the total losers. i speak to hiring managers all the time and they give out similar tests just to filter out the losers. There seems to be some evidence that even trivial problems are a good way of filtering, http://www.codinghorror.com/blog/2010/02/the-nonprogramming-programmer.html (and neighboring posts) is an interesting entertaining ( slightly disturbing) read. I can't imagine scheduling an in-person interview without a phone screen and ideally a github link beforehand. I like the FizzBuzz test. Not far removed from what I was hit with today.
Re: Brainbench perl test?
On Thu, Sep 6, 2012 at 2:49 PM, David Hodgkinson daveh...@gmail.com wrote: I like the FizzBuzz test. Not far removed from what I was hit with today. Talking of which, here's a fizzbuzz solution that's one of the most amazing presentations I've seen. It's Ruby but if you understand lambdas/coffeescript you can follow along, http://experthuman.com/programming-with-nothing http://rubymanor.org/3/videos/programming_with_nothing/ (video; more fun) Paul
Re: Brainbench perl test?
On Thu, Sep 6, 2012 at 3:12 PM, Paul Makepeace pa...@paulm.com wrote: On Thu, Sep 6, 2012 at 2:49 PM, David Hodgkinson daveh...@gmail.com wrote: I like the FizzBuzz test. Not far removed from what I was hit with today. Talking of which, here's a fizzbuzz solution that's one of the most amazing presentations I've seen. It's Ruby but if you understand lambdas/coffeescript you can follow along, http://experthuman.com/programming-with-nothing And they call Perl write-only? Oh, wait: http://stackoverflow.com/questions/437/what-is-your-solution-to-the-fizzbuzz-problem/91068#91068
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 02:17:40PM +0100, Dave Cross wrote: And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I'd rather work with a good programmer who can't answer your question slickly in the heat of an interview, (whatever clever question you think up during your coffee break while chatting with a group of people about how to think up the best interview question), than a bad programmer who impresses you with a predictable memory trick during an interview, (aren't we so cool because we know the same things as each other?) -- Ciao Richard Foley http://www.rfi.net/books.html
Re: Brainbench perl test?
On Wed, 2012-09-05 at 09:01 +0200, Richard Foley wrote: And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I'd rather work with a good programmer who can't answer your question slickly in the heat of an interview, (whatever clever question you think up during your coffee break while chatting with a group of people about how to think up the best interview question), than a bad programmer who impresses you with a predictable memory trick during an interview, (aren't we so cool because we know the same things as each other?) That's fair generally however the question isn't particularly clever and doesn't require you to know any memory trick at all. It's just a very simple test to see if you can take a simple specification and turn it into some kind of code with the added bonus of seeing whether the candidate spots potentials issues with it. As for not knowing what the Fibonacci sequence is I agree that it's not a particularly good test but if it is specified as either of the two questions that were suggested then it's irrelevant whether you recognise and name the equation so long as you can do as asked surely. Jason
Re: Brainbench perl test?
David Hodgkinson writes: On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code? The point I was trying to make in the part of my message you snipped is that different teams value different skills. If you don't feel that adeptness with recursion is what marks out the really useful people in your team, then ask about something else instead. That a particular question is only relevant to some teams doesn't make it a poor question in the abstract. Smylers -- New series of TV puzzle show 'Only Connect' (some questions by me) Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect
Re: Brainbench perl test
One other point I wanted to make on this debate was: No matter how strongly each of us feels about what is or is not a legitimate or worthwhile interview question: part of the benefit of having this discussion is finding out what other people think is important in an interview. Even if we sway the opinions of people in this forum about what interview questions to ask, at the end of the day interviewing is a game and being able to give more complete answers to less worthwhile questions is part of the process. Hence these are the sorts of things we need to swot up on. My general aim in an interview is to present the interviewer with a number of things they didn't know. Hopefully of which a few are of broad practical use. I might argue that memo-ization is a minor, occasionally useful feature of perl, but knowing about memo-ization shows I have studied perl in more depth than the people who don't know about it. I also think it is good to be upfront in interviews about things you haven't done and somewhat humble in assessing your skill level. For the latter, the interviewer is unlikely to take your assessment at face value and over delivery in the interview is not a bad habit to get into. Perl is a huge subject and things like Moose start to challenge what the language is. Many modules are more like language extensions than perl per se. I start to doubt that anyone is a master of all areas of perl any more. At which point I could go off and have a little rant about a number of people who have written about DBI who are obviously somewhat clueless about a few things about databases (but I won't). Chris
Re: Brainbench perl test - girl friday?
I concur. Slightly OT: My daughter is looking for a job in London, but does NOT know anything about the Fibonacci sequence. Girl-friday/actress type of thing? -- Ciao Richard Foley http://www.rfi.net/books.html On Wed, Sep 05, 2012 at 09:11:06AM +0100, Jason Clifford wrote: On Wed, 2012-09-05 at 09:01 +0200, Richard Foley wrote: And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I'd rather work with a good programmer who can't answer your question slickly in the heat of an interview, (whatever clever question you think up during your coffee break while chatting with a group of people about how to think up the best interview question), than a bad programmer who impresses you with a predictable memory trick during an interview, (aren't we so cool because we know the same things as each other?) That's fair generally however the question isn't particularly clever and doesn't require you to know any memory trick at all. It's just a very simple test to see if you can take a simple specification and turn it into some kind of code with the added bonus of seeing whether the candidate spots potentials issues with it. As for not knowing what the Fibonacci sequence is I agree that it's not a particularly good test but if it is specified as either of the two questions that were suggested then it's irrelevant whether you recognise and name the equation so long as you can do as asked surely. Jason
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 12:25:57PM -0400, Uri Guttman wrote: On 09/04/2012 08:03 AM, Mr I wrote: I've literally had people who were Senior programmers (whatever that means) who, when given the instructions Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language didn't even get to the sub fib { my $n = shift; return fib($n-1)+fib($n-2); } IMHO this is a typical example of an awful question! It requires additional knowledge of the problem domain NOT asked by the interviewer.Your assumption is that the candidiate knows: a) the fibonacci sequence b) mathematically how to calculate (included recurrence) why do they need to know it? they are given the formula!! and they can do a linear version if they don't know recursion. and knowing recursion is a good coding test to filter out the wannabes from the serious coders. No. Well, it filters out the wannabees. It doesn't recognize the serious coder. If, given the Fibonacci sequence, or a similar recursive formula, and your first instinct is to solve it with recursion or iteration, you aren't serious. Your first instinct should be Is there a generating function I can use?. Abigail
Re: Brainbench perl test?
On Wed, Sep 5, 2012 at 9:35 AM, Abigail abig...@abigail.be wrote: Your first instinct should be Is there a generating function I can use?. Try not to blow your cache pipeline with all that silly branching, sub fib { my $n = shift; int(0.5 + (0.5+0.5*sqrt 5) ** $n / sqrt 5); } High five! :-) Paul
Re: Brainbench perl test?
On Wednesday, September 5, 2012, Paul Makepeace wrote: On Wed, Sep 5, 2012 at 9:35 AM, Abigail abig...@abigail.be javascript:; wrote: Your first instinct should be Is there a generating function I can use?. Try not to blow your cache pipeline with all that silly branching, sub fib { my $n = shift; int(0.5 + (0.5+0.5*sqrt 5) ** $n / sqrt 5); } High five! :-) My favourite, especially given that: Given that fib(n) is equal to fib(n-1) + fib(n-2) ... in its current form arguably simplifies to fib(n) = ⊥
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 12:31 PM, Paul Makepeace pa...@paulm.com wrote: The spec for fib() was given; the spec for ved() was not. That is the difference. No, neither were spec'd enough to code from. (As is true for every spec I've ever seen.) Either should lead to questions before a single character of coding. And the questions I'd ideally like to see from the fib problem aren't just what is the value of the element at position 0 and 1, (which assumes the sequence starts at 0, something not in the problem statement) but about what the expected range of input is, what to do with invalid input, even the relative importance of startup time cost vs per call cost (a lookup table may be a better choice than memoization) and the memory resources available. And if you are looking for how and what questions someone asks and how the resulting conversation goes, fib() provides a trap where someone familiar with the sequence may assume instead of asking, which IMO is a reasonable response given the name of the function. So ved() wins in my book.
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 01:03:22PM +0100, Mr I said: IMHO this is a typical example of an awful question! It requires additional knowledge of the problem domain NOT asked by the interviewer.Your assumption is that the candidiate knows: a) the fibonacci sequence b) mathematically how to calculate (included recurrence) Except for the part where I don't assume that and I tell them exactly how to do it. The fact that it happens to be the fibonacci sequence is almost incidental. What I'm looking for is - for them to spot that there's going to be base cases - that they notice they'll be doing duplicate work - how they think about how to prevent doing duplicate work - potential other solutions (i.e iteration) In my defense I'm not a monster in interviews, lounging archly in the corner and occasionally sneering Oh, you can't even do THAT? Where do you learn to program? Clown School? and then spraying them with water. I just want to see how people solve problems - if they get stuck I'll gently ask questions that point in the right direction. Just as an aside: one of my other favourite interview questions is I got to a web page in a browser, what happens? which is basically a Rorschach test.
Re: Brainbench perl test?
On 05/09/2012 17:35, Abigail wrote: No. Well, it filters out the wannabees. It doesn't recognize the serious coder. If, given the Fibonacci sequence, or a similar recursive formula, and your first instinct is to solve it with recursion or iteration, you aren't serious. Your first instinct should be Is there a generating function I can use?. Abigail I used to do a lot of interviews with brand new graduates, and quite often asked the CompSci ones to write me a factorial function (though Fibonacci would have done just as well). I don't recall any cases where knowledge of the maths was a problem; and the simple implementation was not intended as a filter, it just got them into the programming mindset. Of course, almost all of them would use recursion, and my real interest was in the follow-on discussion why did you do it that way?, and how long it took them to twig that while factorials are a good illustration of recursion, recursion isn't necessarily a good implementation of factorials. However, if interviewing, say, an engineer or physicist with self-taught practical knowledge of programming, you usually wouldn't get the same reflex response, and I'd probably not bother with that question... Gordon
Re: Brainbench perl test?
On Wed, Sep 05, 2012 at 09:51:27PM +0100, Gordon Banner wrote: Of course, almost all of them would use recursion, and my real interest was in the follow-on discussion why did you do it that way?, and how long it took them to twig that while factorials are a good illustration of recursion, recursion isn't necessarily a good implementation of factorials. Nor's a naive iterative method though - it takes no time at all before you overflow your ints and then (assuming that you're aware of this and use bigints, instead of just doing a fandango on core^Wvariable) every single operation after that is on bigints, and so is like trying to suck molasses through a straw. I've been working on-and-off on a way to reduce the number of bigint operations, but I keep running into other expensive functions. The best I've come up with so far: * requires a function to return the nth prime * requires a function to return the number of primes less than n these are required to get a list of the factorial's factors. You could use a lookup table - but then, why not just have a table of factorials * is NP-complete if you want to really minimise bigint ops the knapsack problem, breaking that list into sub-lists whose products are all just under 2^32 (or 2^64, or ...). And being NP-complete is the least of my problems, because the previous two functions *don't exist yet* and very clever people have been failing to find them for, oh, at least 150 years. Oh, and it's wrong anyway, because it misses some repeated prime factors :-) But hey, it's something to keep me out of trouble. -- David Cantrell | Hero of the Information Age Do not be afraid of cooking, as your ingredients will know and misbehave -- Fergus Henderson
Re: Brainbench perl test?
Really not one to make comment but this one pulled on my goatee On Tue, Aug 28, 2012 at 9:50 PM, Simon Wistow si...@thegestalt.org wrote: On Tue, Aug 28, 2012 at 08:41:14PM +0200, Joel Bernstein said: It's a red flag of lack of clue if a prospective employer tries to use this to weed out candidates. I've literally had people who were Senior programmers (whatever that means) who, when given the instructions Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language didn't even get to the sub fib { my $n = shift; return fib($n-1)+fib($n-2); } let alone dealing with base cases or turning it into an iterative method or memoizing or ... IMHO this is a typical example of an awful question! It requires additional knowledge of the problem domain NOT asked by the interviewer.Your assumption is that the candidiate knows: a) the fibonacci sequence b) mathematically how to calculate (included recurrence) It's such a flawed question. You're not testing the candidates knowledge of maths you're testing their knowledge of programming. The question does not allow you to assess whether the candidate is freezing due to their lack of knowledge in mathematics or in programming. It's equivalent to asking you to write a function ved(n, m) that implements the 16 sutras* and uses them to return the result. A task that maybe easily done by many an Indian programmer yet many in this group would struggle with. A good question should reference a closed problem domain with a clearly defined task (e.g. create a maze in a 6 by 6 grid, sort a pack of single faced cards, etc). That way you can assess the candidates reasoning, approach and coding (hopefully). My $0.02 cents Udo * vedic mathematics
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 01:03:22PM +0100, Mr I wrote: You're not testing the candidates knowledge of maths you're testing their knowledge of programming. If the candidate doesn't ask what happens when n is less than 2, he may be a passable maintenance programmer but he's not someone I'd hire to have any sort of responsibility. It's equivalent to asking you to write a function ved(n, m) that implements the 16 sutras* and uses them to return the result. A task that maybe easily done by many an Indian programmer yet many in this group would struggle with. Similarly, I'd expect the candidate to ask for more information. R
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 1:13 PM, Roger Burton West ro...@firedrake.orgwrote: On Tue, Sep 04, 2012 at 01:03:22PM +0100, Mr I wrote: You're not testing the candidates knowledge of maths you're testing their knowledge of programming. If the candidate doesn't ask what happens when n is less than 2, he may be a passable maintenance programmer but he's not someone I'd hire to have any sort of responsibility. Again your assumptions are on knowing about the fibonacci sequence. So a candidate that does not know the fibonacci sequence but identifies a possible flaw in the question can only be a maintenance programmer? It's equivalent to asking you to write a function ved(n, m) that implements the 16 sutras* and uses them to return the result. A task that maybe easily done by many an Indian programmer yet many in this group would struggle with. Similarly, I'd expect the candidate to ask for more information. However under your above reasoning such questions may result in the candidate only being considered for 'maintenance programming' simply because the candidate does not know vedic mathematics. That's foolishness. -- \\U # http://www.flickr.com/photos/66781473@N00/
Re: Brainbench perl test?
On 4 Sep 2012, at 13:26, Mr I cub4u...@gmail.com wrote: If the candidate doesn't ask what happens when n is less than 2, he may be a passable maintenance programmer but he's not someone I'd hire to have any sort of responsibility. Again your assumptions are on knowing about the fibonacci sequence. So a candidate that does not know the fibonacci sequence but identifies a possible flaw in the question can only be a maintenance programmer? Disagree. His assumptions based on being able to figure out that that iterative relationship needs a start point. It's impossible to implement without it.
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 01:26:46PM +0100, Mr I wrote: Again your assumptions are on knowing about the fibonacci sequence. So a candidate that does not know the fibonacci sequence but identifies a possible flaw in the question can only be a maintenance programmer? No, the question needs zero prior knowledge of what the fibonacci sequence it. It is instead testing that the coder can recognise and implement a solution to a problem that is defined in a recursive manner. -- A walk of a thousand miles begins with a single step... then continues for another 1,999,999 or so.
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 01:26:46PM +0100, Mr I wrote: Again your assumptions are on knowing about the fibonacci sequence. So a candidate that does not know the fibonacci sequence but identifies a possible flaw in the question can only be a maintenance programmer? The question contains a specification of a function which, while technically complete, raises some questions. Someone who doesn't ask those questions isn't much use if he's going to be doing anything for himself rather than just executing someone else's instructions. If this is a non-interactive test, I want annotations on the code, and either of these broad classes would do: (1) I'm assuming from the name that this is a Fibonnaci sequence generator, and therefore fib(0)=1 and fib(1)=1. (2) This recursion will never terminate, so I'm assuming that fib(0)=0 in order that it produce a result. Note that the latter requires no knowledge of anything except programming. If you're going to claim programmers don't need to know how to spot a non-terminating recursion, I'm afraid I'm not going to agree.
Re: Brainbench perl test?
On 4 Sep 2012, at 13:48, Mr I cub4u...@gmail.com wrote: You do not want to be assessing their knowledge of mathematics. You want to be assessing their programming acumen And the fib() test, regardless of whether you know what the Fibonacci sequence is or are simply looking at the definition of the problem with a view to implementing it, does exactly that. Can't /you/ see that?
Re: Brainbench perl test?
Quoting Mr I cub4u...@gmail.com: Consider the example I gave. How will you approach that? I bet you'd approach completely differently if you KNEW vedic mathematics. Your example said: write a function ved(n, m) that implements the 16 sutras* and uses them to return the result That's not a usable specification. The original question was: Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language Can you not see the difference? It doesn't matter that it's a well-known mathematical sequence. The required behaviour has been specified in the question. It could be rewritten as: Given that blarg(n) is equal to blarg(n-1) + blarg(n-2) write a blarg function in any language And it would still be solvable. Your question isn't a specification. It can't be solved without guesswork. And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) Cheers, Dave... -- Perl School - http://perlschool.co.uk/
Re: Brainbench perl test?
On Tue, 04 Sep 2012 14:48:01 +0200, Mr I cub4u...@gmail.com wrote: You do not want to be assessing their knowledge of mathematics. You want to be assessing their programming acumen I'd argue that programming *is* mathematics, in some sense. -- Cosimo
Re: Brainbench perl test?
On 4 September 2012 14:17, Dave Cross d...@dave.org.uk wrote: Quoting Mr I cub4u...@gmail.com: Consider the example I gave. How will you approach that? I bet you'd approach completely differently if you KNEW vedic mathematics. Your example said: write a function ved(n, m) that implements the 16 sutras* and uses them to return the result That's not a usable specification. The original question was: Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language Can you not see the difference? It doesn't matter that it's a well-known mathematical sequence. The required behaviour has been specified in the question. It could be rewritten as: Given that blarg(n) is equal to blarg(n-1) + blarg(n-2) write a blarg function in any language Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Entirely defined within its own terms and less likely to have the smart programmer supply a non-recursive or iterative function involving the golden ratio. And it would still be solvable. Your question isn't a specification. It can't be solved without guesswork. What Dave said. And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I dunno. Think of the teaching opportunities :)
Re: Brainbench perl test?
I remember meeting someone who knew what the sequence was but forgot the name. Ended up calling it the Fettucini sequence. Bonus points. -- vish On 4 September 2012 14:12, Piers Cawley pdcawley-london.0dd...@bofh.org.ukwrote: On 4 September 2012 14:17, Dave Cross d...@dave.org.uk wrote: Quoting Mr I cub4u...@gmail.com: Consider the example I gave. How will you approach that? I bet you'd approach completely differently if you KNEW vedic mathematics. Your example said: write a function ved(n, m) that implements the 16 sutras* and uses them to return the result That's not a usable specification. The original question was: Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language Can you not see the difference? It doesn't matter that it's a well-known mathematical sequence. The required behaviour has been specified in the question. It could be rewritten as: Given that blarg(n) is equal to blarg(n-1) + blarg(n-2) write a blarg function in any language Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Entirely defined within its own terms and less likely to have the smart programmer supply a non-recursive or iterative function involving the golden ratio. And it would still be solvable. Your question isn't a specification. It can't be solved without guesswork. What Dave said. And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I dunno. Think of the teaching opportunities :)
Re: Brainbench perl test?
I agree with you. It is not to much to expect a question / answer like (2). Hopefully you'd reward such an answer with more than 'maintenance' work :) On Tue, Sep 4, 2012 at 1:44 PM, Roger Burton West ro...@firedrake.orgwrote: On Tue, Sep 04, 2012 at 01:26:46PM +0100, Mr I wrote: Again your assumptions are on knowing about the fibonacci sequence. So a candidate that does not know the fibonacci sequence but identifies a possible flaw in the question can only be a maintenance programmer? The question contains a specification of a function which, while technically complete, raises some questions. Someone who doesn't ask those questions isn't much use if he's going to be doing anything for himself rather than just executing someone else's instructions. If this is a non-interactive test, I want annotations on the code, and either of these broad classes would do: (1) I'm assuming from the name that this is a Fibonnaci sequence generator, and therefore fib(0)=1 and fib(1)=1. (2) This recursion will never terminate, so I'm assuming that fib(0)=0 in order that it produce a result. Note that the latter requires no knowledge of anything except programming. If you're going to claim programmers don't need to know how to spot a non-terminating recursion, I'm afraid I'm not going to agree. Udo
Re: Brainbench perl test?
On 4 September 2012 14:12, Piers Cawley pdcawley-london.0dd...@bofh.org.uk wrote: On 4 September 2012 14:17, Dave Cross d...@dave.org.uk wrote: Can you not see the difference? It doesn't matter that it's a well-known mathematical sequence. The required behaviour has been specified in the question. No, no it has not. Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Aha! A couple more bits of knowledge. Now my machine can stop dying when I run my program. The question as originally described is a starting point to deciding if someone can think logically, but it does not fully describe the problem. -- Jasper
Re: Brainbench perl test?
And besides, I don't think I'd really want to work with a programmer who didn't know what the Fibonacci sequence is :-) I dunno. Think of the teaching opportunities :) My concern would be, given that interviews are already a fairly stressful situation, that the developer familiar with Fibonacci is immediately put at ease. I know I can often rattle off the answer to something I know far more quickly and in a confident manner, than something I'm seeing for the first time. Am I a good enough interviewer to distinguish a good developer, and someone who's seen or coded the problem before ? No. For that reason, I would have thought there were other, better, recursion problems out there I could use. Matt
Re: Brainbench perl test?
On 4 September 2012 14:27, Jasper jaspermcc...@gmail.com wrote: On 4 September 2012 14:12, Piers Cawley pdcawley-london.0dd...@bofh.org.uk wrote: ... Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Aha! A couple more bits of knowledge. Now my machine can stop dying when I run my program. The question as originally described is a starting point to deciding if someone can think logically, but it does not fully describe the problem. The point most of us are trying to make is that a programmer who doesn't *ask* you for those bits of knowledge hasn't understood the question sufficiently :)
Re: Brainbench perl test?
On Tue, 2012-09-04 at 14:31 +0100, Matt Freake wrote: For that reason, I would have thought there were other, better, recursion problems out there I could use. Tower of Hanoi? :)
Re: Brainbench perl test?
On 4 Sep 2012, at 13:26, Mr I wrote: On Tue, Sep 4, 2012 at 1:13 PM, Roger Burton West ro...@firedrake.orgwrote: It's equivalent to asking you to write a function ved(n, m) that implements the 16 sutras* and uses them to return the result. A task that maybe easily done by many an Indian programmer yet many in this group would struggle with. Similarly, I'd expect the candidate to ask for more information. However under your above reasoning such questions may result in the candidate only being considered for 'maintenance programming' simply because the candidate does not know vedic mathematics. That's foolishness. Well in interviews you have the luxury of asking a range of questions, so even when the candidate is not strong on maths for example, it's interesting to see how they tackle the question and it's challenge. I've always appreciated it when the candidate will have a go on the whiteboard with something that maybe isn't their strong point. And when i've conducted interviews and also done training it can be rewarding to work together on a solution helping the candidate or trainee with the gaps in their knowledge and seeing how they use the clues. It's about seeing how people think, so if for example it wasn't fib but factorial (fac). Asking someone how their program would work for fac(-4). And then how would both_fact(n) = (fac(n) + fac(n*-1)) would behave for 1..m, etc. etc. While it's a bit computer science-ey, something like big O for bogosort is also interesting. The most important things are, 1) know what sort of skills you want to hire for the role, especially for the role as it stands in the next 6 or 12 months. 2) have a range of questions in different degree's of difficult for the skills required (Perl, UNIX, version control, SQL, etc). 3) treat it as a conversation where you are trying to help and work with them. G.
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 02:31:22PM +0100, Matt Freake wrote: My concern would be, given that interviews are already a fairly stressful situation, that the developer familiar with Fibonacci is immediately put at ease. You are aware, I trust, that the whole point of an interview is to be discriminatory? -- David Cantrell | London Perl Mongers Deputy Chief Heretic You are so cynical. And by cynical, of course, I mean correct. -- Kurt Starsinic
Re: Brainbench perl test?
On 4 September 2012 14:38, Will Crawford billcrawford1...@gmail.com wrote: On 4 September 2012 14:27, Jasper jaspermcc...@gmail.com wrote: On 4 September 2012 14:12, Piers Cawley pdcawley-london.0dd...@bofh.org.uk wrote: ... Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Aha! A couple more bits of knowledge. Now my machine can stop dying when I run my program. The question as originally described is a starting point to deciding if someone can think logically, but it does not fully describe the problem. The point most of us are trying to make is that a programmer who doesn't *ask* you for those bits of knowledge hasn't understood the question sufficiently :) I think that that is probably what most of us are thinking, but the wording that I quoted in my previous post made me wonder. If someone said to me in an interview this is the problem, that's all you need to know, then when I coded it and said I did exactly what you asked for but it obviously doesn't work and then they said oh, but of course you should have known this and you should have known that, go ahead and put those things in the program, too, I would say JHC this is exactly the same crap as the job I'm in, why would I want to come here? ;) -- Jasper
Re: Brainbench perl test?
On 4 September 2012 14:41, Dominic Humphries d...@thermeon.com wrote: On Tue, 2012-09-04 at 14:31 +0100, Matt Freake wrote: For that reason, I would have thought there were other, better, recursion problems out there I could use. Tower of Hanoi? :) Tower of Hanoi (with a proper description of what the problem _is_) is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Though I'm sure Abigail will be along with a regular expression that solves it through repeated substitution.
Re: Brainbench perl test?
Quoting Jasper jaspermcc...@gmail.com: On 4 September 2012 14:38, Will Crawford billcrawford1...@gmail.com wrote: On 4 September 2012 14:27, Jasper jaspermcc...@gmail.com wrote: On 4 September 2012 14:12, Piers Cawley pdcawley-london.0dd...@bofh.org.uk wrote: ... Or, in an attempt to really drive it home: blarg(n) is equal to blarg( n - 1 ) * 2 + blarg( n - 2 ) There you go. Not the Fibonacci sequence, but still a recursive definition, trivially implementable with a recursive condition given a couple more bits of knowledge (the values of blarg(0) and blarg(1)). Aha! A couple more bits of knowledge. Now my machine can stop dying when I run my program. The question as originally described is a starting point to deciding if someone can think logically, but it does not fully describe the problem. The point most of us are trying to make is that a programmer who doesn't *ask* you for those bits of knowledge hasn't understood the question sufficiently :) I think that that is probably what most of us are thinking, but the wording that I quoted in my previous post made me wonder. Well, when I said it was completely specified, I obviously meant that it was specified to about the level that you could expect in the real world :-) Dave...
Re: Brainbench perl test?
Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. What makes a good question depends to some extent on what you want the person you hire to do. One way of considering this is to think about existing (or previous) team members, and what distinguishes the better ones. It may be computer sciencey algorithm stuff and implementing things efficiently. Or it may be being sufficiently comfortable with Cpan, and gluing together other people's modules to get stuff done. Or carefully dealing with edge cases in awkward-shaped real-world problems. Or looking at a business spec and divining what is actually required here. Or ... Often these don't all come together, so I think it's worth putting some effort into making interview exercises test the kind of thing which makes people useful in your particular team, rather than skills which mark out a good software engineer in the abstract. That of course means that what some people may consider to be a poor interview question is a most splendid question for a different vacancy. Cheers Smylers -- New series of TV puzzle show 'Only Connect' (some questions by me) Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect
Re: Brainbench perl test?
On 04/09/2012 15:03, David Cantrell wrote: You are aware, I trust, that the whole point of an interview is to be discriminatory? Discrimination is probably too evocative a word :-) Also an good interview is a two way exchange on info. Jacqui
Re: Brainbench perl test?
On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code?
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 05:18:20PM +0100, David Hodgkinson wrote: When was the last time you recursed in day to day web type code? Within the last month.
Re: Brainbench perl test?
crawling ? xml parsing ? json printing of structures ? -- vish On 4 September 2012 17:18, David Hodgkinson daveh...@gmail.com wrote: On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code?
Re: Brainbench perl test?
On 09/04/2012 08:03 AM, Mr I wrote: I've literally had people who were Senior programmers (whatever that means) who, when given the instructions Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language didn't even get to the sub fib { my $n = shift; return fib($n-1)+fib($n-2); } IMHO this is a typical example of an awful question! It requires additional knowledge of the problem domain NOT asked by the interviewer.Your assumption is that the candidiate knows: a) the fibonacci sequence b) mathematically how to calculate (included recurrence) why do they need to know it? they are given the formula!! and they can do a linear version if they don't know recursion. and knowing recursion is a good coding test to filter out the wannabes from the serious coders. It's such a flawed question. You're not testing the candidates knowledge of maths you're testing their knowledge of programming. and how to code given an algorithm. very legit. The question does not allow you to assess whether the candidate is freezing due to their lack of knowledge in mathematics or in programming. what math? this is trivial math. if you are a coder with such a limited exposure to the world to not be able to handle this (and you are given the formula!!), then you are not worth hiring. also exposure to fib is very very wide. you have to be living under a rock to not have heard of it. It's equivalent to asking you to write a function ved(n, m) that implements the 16 sutras* and uses them to return the result. A task that maybe easily done by many an Indian programmer yet many in this group would struggle with. way off target. the fib solution is 2-3 lines in recursive and about the same in linear. not a lot of code or brain busting work. A good question should reference a closed problem domain with a clearly defined task (e.g. create a maze in a 6 by 6 grid, sort a pack of single faced cards, etc). That way you can assess the candidates reasoning, approach and coding (hopefully). and if they can't code fib given the formula, you think they can code a maze or a multikey sort?? wow. uri
Re: Brainbench perl test?
On 4 September 2012 17:18, David Hodgkinson daveh...@gmail.com wrote: On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code? The last time I walked an object tree to turn it into a bare hash of hashes for turning into JSON.
Re: Brainbench perl test?
On 09/04/2012 09:20 AM, Avishalom Shalit wrote: I remember meeting someone who knew what the sequence was but forgot the name. Ended up calling it the Fettucini sequence. Bonus points. told that to my wife and she just about snorted pasta out of her nose! she didn't know the name fibonacci but laughed as she got the issue. uri
Re: Brainbench perl test?
On 09/04/2012 09:41 AM, Dominic Humphries wrote: On Tue, 2012-09-04 at 14:31 +0100, Matt Freake wrote: For that reason, I would have thought there were other, better, recursion problems out there I could use. Tower of Hanoi? :) but at least 20 disks and it has run before the interview is over! uri
Re: Brainbench perl test?
On 4 Sep 2012, at 17:24, Roger Burton West ro...@firedrake.org wrote: On Tue, Sep 04, 2012 at 05:18:20PM +0100, David Hodgkinson wrote: When was the last time you recursed in day to day web type code? Within the last month. I meant normal people.
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 9:18 AM, David Hodgkinson daveh...@gmail.com wrote: When was the last time you recursed in day to day web type code? A few weeks ago. It's a flawed premise in any case. There's plenty of techniques and ideas professionals don't make routine use of but you'd be pretty unimpressed if they didn't know how to do it. Paul
Re: Brainbench perl test?
On 09/04/2012 12:05 PM, Jacqui Caren wrote: On 04/09/2012 15:03, David Cantrell wrote: You are aware, I trust, that the whole point of an interview is to be discriminatory? Discrimination is probably too evocative a word :-) Also an good interview is a two way exchange on info. i said that in another thread. i both run my interviews and tell others (both sides) that it should be a conversation, not an interrogation. both sides should be asking and answering questions and telling interesting, geeky and hopefully fun stories. that is what makes it work for both sides. telling a coding story well means you can communicate, understand the complexities in the tech part of the story, show empathy (need that for teamwork), have a sense of humor, etc. uri
Re: Brainbench perl test?
On 09/04/2012 12:18 PM, David Hodgkinson wrote: On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code? every day. i see bad code and i curse. then i curse again, and again and again! uri
Re: Brainbench perl test?
Piers Cawley pdcawley-london.0dd...@bofh.org.uk wrote On 4 September 2012 14:41, Dominic Humphries d...@thermeon.com wrote: On Tue, 2012-09-04 at 14:31 +0100, Matt Freake wrote: For that reason, I would have thought there were other, better, recursion problems out there I could use. Tower of Hanoi? :) Tower of Hanoi (with a proper description of what the problem _is_) is always a better example for solving with recursion than the fibobloodynacci sequence. Tower of Hanoi is one of those aha solutions that I would argue has little to do with day to day programming. If you've worked it out sometime in past or had it explained in a lecture then you're unlikely to forget - otherwise I don't think I've ever come across a problem with a comparable solution. Although I do have fond memories from my uni robotics course of having to program the robot arm to do it. In regards to Fibonacci: knowing about memo'izing (or even the performance issues around calculating Fibonacci) could arguably be effectively asking if you've read Higher Order Perl. It's an interesting book but I wouldn't suggest high up the list of books I would recommend people read about Perl unless they're doing something very specialised. I haven't yet had a problem which I felt was worthwhile of a memo-ized solution - but that might just be indicative of the sort of perl work I do. Similarly, discriminating against people on the basis of web programming versus perl experience - is a massive presupposition about what people use perl for. Probably 90% of the perl work I do has nothing to do with the web. If you haven't read up on web security issues, SQL injection is not immediately obvious and there are various legitimate reasons for avoiding bind variables. I think we can often treat interviews through the filter of our own experience - I went to one interview where my interviewer seemed to think it was incredibly important to know about closures. I think it is more important to broadly assess the competency of the candidate . Which is what a lot of posts in this thread seem to have been alluding to. Chris
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 9:59 AM, Chris Jack chris_j...@msn.com wrote: I haven't yet had a problem which I felt was worthwhile of a memo-ized solution - but that might just be indicative of the sort of perl work I do. While memoization is a perfect fit for this solution a) the ability to spot the need for a cache b) have a stab at implementing it, would be two things I'd be looking out for. Just adding, my %fib_cache; sub fib { my $n = shift; return $fib_cache{$n} if defined $fib_cache{$n}; # … $fib_cache{$n} = $answer; } would be a good start. If you're working in the web and haven't added memcached to something, that would strike me as surprising. If you haven't read up on web security issues, SQL injection is not immediately obvious and there are various legitimate reasons for avoiding bind variables. If you're working in the web and you haven't read up on web security issues, you need to go do that before applying for any jobs in web. If you haven't worked in the web, fair enough, ish. I do agree on pet subjects - I was amazed to be asked a bit fiddling question in an interview last year (not that I was complaining, having grown up on 8bit assembly…) Paul
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 05:05:21PM +0100, Jacqui Caren wrote: On 04/09/2012 15:03, David Cantrell wrote: You are aware, I trust, that the whole point of an interview is to be discriminatory? Discrimination is probably too evocative a word :-) Why d'you think I used it? :-) -- David Cantrell | top google result for topless karaoke murders Eye have a spelling chequer / It came with my pea sea It planely marques four my revue / Miss Steaks eye kin knot sea. Eye strike a quay and type a word / And weight for it to say Weather eye am wrong oar write / It shows me strait a weigh.
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 05:18:20PM +0100, David Hodgkinson wrote: On 4 Sep 2012, at 16:07, Smylers smyl...@stripey.com wrote: Piers Cawley writes: Tower of Hanoi is always a better example for solving with recursion than the fibobloodynacci sequence. If nothing else, the recursive solution isn't quite so immediately obvious from the problem, the terminating condition is obvious and an iterative solution isn't quite so hogwhimperingly more efficient. Yes, that's much better. When was the last time you recursed in day to day web type code? About 16:30 today. I did it yesterday too. Before that, there's a gap of about a week, but that's only because I was sitting at home feeling sorry for myself as I was full of lurgy. I probably write recursive code two or three times a week at work, and I *use* recursive code that I wrote at work every single day. -- David Cantrell | London Perl Mongers Deputy Chief Heretic On the bright side, if sendmail is tied up routing spam and pointless uknot posts, it's not waving its arse around saying root me! -- Peter Corlett, in uknot
Re: Brainbench perl test?
On Tue, Sep 04, 2012 at 10:22:47AM -0700, Paul Makepeace wrote: If you're working in the web and haven't added memcached to something, that would strike me as surprising. It is worryingly common to have not used it or anything like it, and to not even know that it exists. -- David Cantrell | Bourgeois reactionary pig Aluminum makes a nice hat. All paranoids will tell you that. But what most do not know Is reflections will show On the CIA's evil landsat.
Re: Brainbench perl test?
On 05/09/2012, at 2:40 AM, David Hodgkinson wrote: On 4 Sep 2012, at 17:24, Roger Burton West ro...@firedrake.org wrote: On Tue, Sep 04, 2012 at 05:18:20PM +0100, David Hodgkinson wrote: When was the last time you recursed in day to day web type code? Within the last month. I meant normal people. Me too. Actually a bug in some long standing code for a web based front end for a text analysis platform. Let's just say that recursion, Tree::Simple and Template Toolkit are an interesting combination. Code on somewhere on github (with the bug because I didn't push yet for obscure reasons).
Re: Brainbench perl test?
Simon Wistow writes: On Tue, Aug 28, 2012 at 10:15:27PM +0100, Dave Cantrell said: For perl hiring, we had what I think was a great test. And now that they no longer exist, I can tell you what it was! Yahoo! Europe's was variations on this http://thegestalt.org/simon/yahoo_questions.txt My experience of taking Yahoo!'s test in 2000 was: * Yahoo! e-mail me the test. * I reply with my answers within the allowed 48 hours. * After a while of not hearing anything, I mail to check they received it. * Yahoo! confirm that they did, and they'll be getting in touch about it. * Somebody else offers me a job, which I accept without having heard back from Yahoo! The last communication between us stands at Yahoo! saying they'll let me know how I did on my test. I'm reasonably confident that I answered enough questions correctly to be worth interviewing. After 12 years I'm not holding out hope. A year or so goes by, then: * The company I work for runs Perl courses, and Yahoo! books one. I end up turning up to Yahoo!'s offices and training some of their Perl team, I think the team I applied to work for. Smylers -- http://twitter.com/Smylers2
Re: Brainbench perl test?
Uri Guttman writes: that is my primary filtering technique. i review their sample code and talk about its strengths and weaknesses, ways i would like to see it improved, etc. HOW they react to that is a critical part of my review. a couple have been so pissed they almost hung up on me. how dare i tell them how to improve their code!! but most are very open to getting reviews and we end up in good conversations about reasons why i said that and other ways to do things, etc. a collegial attitude where they can learn. I've found that too. And also that, in some ways, experience counts negatively: When a job requires a certain number of years experience, the hirers are generally using experience as a proxy for ability. But with programming it's possible to look at an applicant's code and get a better idea of her ability directly. Once I interviewed two applicants on the same day, with a programming task. Both applicants turned out similar mediocre solutions, both with SQL injection errors in their solutions. The morning applicant claimed 8 years' Perl experience. The afternoon one had downloaded Perl 1½ years previously, cos he'd heard it might be useful for his job; nobody else in the organization was using Perl, he had no support network, and initially he'd just been dabbling with it a little in-between continuing to do his job the previous way, gradually building up his Perl experience in that time. So we hired the afternoon applicant, the one with the _least_ experience. Somebody who'd spent 8 years as a Perl programmer and was still churning out code like that didn't seem likely to improve, and gave the impression he thought what he'd written was decent Perl code. Whereas for the relative newbie to've already got to that point in the circumstances he'd been demonstrated somebody striving to improve and willing to learn. The attitude Uri mentions appeared when I pointed out the SQL injection problem (What would happen if somebody called O'Reilly fills in that form?), and then introduced them to the concept of DBI placeholder variables -- which neither had seen before. The morning applicant was defensive over interpolating into SQL directly, saying it's the way he's always done it and he's never had any problems with it. The afternoon applicant was clearly keen to learn how he could avoid such SQL injection issues, and enthusiastically grasped the concept and advantages of placeholders. So I think the actual code an applicant writes is much less important than their replies and attitude when you ask them about that code. And that's something which can't be automated away to an online test. Cheers Smylers -- http://twitter.com/Smylers2
Re: Brainbench perl test?
On 28 Aug 2012, at 14:09, Dave Hodgkinson daveh...@gmail.com wrote: Anyone done this lately? Still as useful as it used to be? Thanks for all the comments. In response: 1. Yes, I think it's an idiot filter 2. Joel, you're wrong. How do people who don't know perl, get the beginnings of a benchmark? 3. And yes, it gives no clue how someone knows the whole stack, their problem solving ability, their knowledge of important scaffold (CI, testing c) 4. Apparently they also want a verbal reasoning test so I suspect they've been burned by some people who can't code *or* communicate in the past 5. Uri, they's why they pay you the big bucks 6. I still don't know why there isn't a supply-side agency, aside from Linkedin, so we can cut out salesmen
Re: Brainbench perl test?
On 28 Aug 2012, at 14:09, Dave Hodgkinson daveh...@gmail.com wrote: Anyone done this lately? Still as useful as it used to be? In the event, I ended up doing 5 test: perl, c++ (ack! thpffft!), verbal reasoning, numerical reasoning and programming concepts. Need nap now.
Re: Brainbench perl test?
Quoting Dave Hodgkinson daveh...@gmail.com: Anyone done this lately? Still as useful as it used to be? I've just got an email from Brainbench offering 50% off tests and subscriptions. Use discount code Cert50. Cheers, Dave...
Brainbench perl test?
Anyone done this lately? Still as useful as it used to be?
Re: Brainbench perl test?
...and I was JUST looking for something like this! On Tue, Aug 28, 2012 at 10:09 AM, Dave Hodgkinson daveh...@gmail.comwrote: Anyone done this lately? Still as useful as it used to be? -- Guido Barosio TEDxResistencia, 2012 http://www.tedxresistencia.org/ http://www.ted.com/tedx
Re: Brainbench perl test?
On Tue, Aug 28, 2012 at 3:09 PM, Dave Hodgkinson daveh...@gmail.com wrote: Anyone done this lately? Still as useful as it used to be? I did it I think 10 years ago, so not really recently, but I am disappointed that I cannot find my certificate at their website now (I still have the paper one). By the way there is also codility.com that does Perl tests - but it is kind of different niche. -- Zbigniew Lukasiak http://brudnopis.blogspot.com/ http://perlalchemy.blogspot.com/
Re: Brainbench perl test?
On 08/28/2012 01:49 PM, Zbigniew Łukasiak wrote: On Tue, Aug 28, 2012 at 3:09 PM, Dave Hodgkinson daveh...@gmail.com wrote: Anyone done this lately? Still as useful as it used to be? I did it I think 10 years ago, so not really recently, but I am disappointed that I cannot find my certificate at their website now (I still have the paper one). i also did it way back and didn't like it then. multiple choice tests in general suck for actual testing of real world skills and programming ones suck even more. no candidate i have reviewed in ages has ever mentioned brainbench nor has any client. so in my world it is a non-entity. i know of several take home tests from clients that i review or see the answers and they tell me much more than any 'cert' could do. so does reviewing of existing code samples. there is no reason to even consider a timed multiple choice test. uri
Re: Brainbench perl test?
On 28 August 2012 15:09, Dave Hodgkinson daveh...@gmail.com wrote: Anyone done this lately? Still as useful as it used to be? Not recently but unless it's been completely replaced it's a useless and in places wrong multiple choice test of some random trivia. Nothing you couldn't solve with perldoc inside the time allowed, but I don't see how that helps anyway. It's a red flag of lack of clue if a prospective employer tries to use this to weed out candidates. Basically, it's the sort of thing that people who don't know anything about the subject use to try to pretend they can gauge someone's knowledge. /joel
Re: Brainbench perl test?
On Tue, Aug 28, 2012 at 11:09 AM, Uri Guttman u...@stemsystems.com wrote: i also did it way back and didn't like it then. multiple choice tests in general suck for actual testing of real world skills and programming ones suck even more. no candidate i have reviewed in ages has ever mentioned brainbench nor has any client. so in my world it is a non-entity. i know of several take home tests from clients that i review or see the answers and they tell me much more than any 'cert' could do. so does reviewing of existing code samples. there is no reason to even consider a timed multiple choice test. When I interviewed at the BBC they had me do Brainbench. It seemed like a fair, reasonably challenging test. The BBC is a pretty decent employer so I'd consider that a reason to do a timed multiple choice test ;-) From an employer's side - it's practically no cost to them on top of their existing recruitment efforts, and has a bunch of benefits associated with involving an unconnected third party. Paul
Re: Brainbench perl test?
On 08/28/2012 02:46 PM, Paul Makepeace wrote: On Tue, Aug 28, 2012 at 11:09 AM, Uri Guttman u...@stemsystems.com wrote: i also did it way back and didn't like it then. multiple choice tests in general suck for actual testing of real world skills and programming ones suck even more. no candidate i have reviewed in ages has ever mentioned brainbench nor has any client. so in my world it is a non-entity. i know of several take home tests from clients that i review or see the answers and they tell me much more than any 'cert' could do. so does reviewing of existing code samples. there is no reason to even consider a timed multiple choice test. When I interviewed at the BBC they had me do Brainbench. It seemed like a fair, reasonably challenging test. The BBC is a pretty decent employer so I'd consider that a reason to do a timed multiple choice test ;-) it can be used as a very basic filter to remove the idiots (there are plenty of them). clients hate having to do that level of filtering themselves so they may buy brainbench uses. i don't need them as my idiot filter is on a hair trigger all the time. :) From an employer's side - it's practically no cost to them on top of their existing recruitment efforts, and has a bunch of benefits associated with involving an unconnected third party. considering the dozens of clients i have dealt with and none have ever mentioned brainbench, i stand ny my view that it is a non-entity. if you can't pass brainbench, you are a non-starter. if you can pass it you would still need to be properly vetted by me or by coding tests. so it doesn't gain much in my view. thanx, uri
Re: Brainbench perl test?
On Tue, Aug 28, 2012 at 08:41:14PM +0200, Joel Bernstein said: It's a red flag of lack of clue if a prospective employer tries to use this to weed out candidates. It's very possible that you're right but I'm going to wade in anyway and put forward a contrary view. Hiring is really expensive. It was one of the things that most shocked me when I started getting involved on that side of things. Not only that the quality of people you get through the pipeline is really crappy - even with phone screens and and checking peoples' open source contributions. I've literally had people who were Senior programmers (whatever that means) who, when given the instructions Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language didn't even get to the sub fib { my $n = shift; return fib($n-1)+fib($n-2); } let alone dealing with base cases or turning it into an iterative method or memoizing or ... Now it's possible they just got really nervous (perhaps be idly sharpening a Marine issue K-Bar knife whilst they coded was a little intimidating) but either way giving someone a quick test, even if good programmers find it trivial and inane is going to be cheaper than having them come in. I believe last time I heard about the test it was about $25 (back in 2001). Let's assume they have now quadrupled, or even octupled, in price then that's *still* worth to me as an employer if it weeds anyone out. Simon
Re: Brainbench perl test?
On 28/08/2012 21:50, Simon Wistow wrote: On Tue, Aug 28, 2012 at 08:41:14PM +0200, Joel Bernstein said: It's a red flag of lack of clue if a prospective employer tries to use this to weed out candidates. It's possibly a red flag that some numpty in HR is trying to show how important they are. If you were to just reject all companies that have HR numpties then you'd reject lots of good employers and would miss out on lots of interesting projects. I've literally had people who were Senior programmers (whatever that means) who, when given the instructions Given that fib(n) is equal to fib(n-1) + fib(n-2) write a fib function in any language didn't even get to the sub fib { my $n = shift; return fib($n-1)+fib($n-2); } At $employer[-3] we had Java programmers with years of experience on their CV come for interview, which included an open book programming test with access to t'interweb and plenty of time, who didn't manage to open and read a file. It is now over a decade since I last wrote any Java and I can't remember how to do it. But it took me *15 seconds* to find sample code online. For perl hiring, we had what I think was a great test. And now that they no longer exist, I can tell you what it was! * write a HTML pretty printer that will take an HTML document and format it all nicely indented. It should gracefully handle malformed input documents, eg missing end tags, badly nested tags etc. * for bonus points, have it apply [list of transformations] if requested via command line arguments because of the, umm, creatively fucked-up world that is HTML, this is very much an open-ended problem, and you can see how good someone is simply by how far they get. We would, of course, then go through candidates' code with them, talking about how they might improve it given more time, what other approaches they considered and so on. Apparently my solution fucked with peoples' heads. I blame MJD, because IIRC I'd just recently inhaled HOP. -- David Cantrell | Minister for Arbitrary Justice Longum iter est per praecepta, breve et efficax per exempla.
Re: Brainbench perl test?
Joel == Joel Bernstein j...@fysh.org writes: Joel Not recently but unless it's been completely replaced it's a useless Joel and in places wrong multiple choice test of some random trivia. Joel Nothing you couldn't solve with perldoc inside the time allowed, but I Joel don't see how that helps anyway. It's a red flag of lack of clue if a Joel prospective employer tries to use this to weed out candidates. Joel Basically, it's the sort of thing that people who don't know anything Joel about the subject use to try to pretend they can gauge someone's Joel knowledge. Hear hear. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion
Re: Brainbench perl test?
David == David Cantrell da...@cantrell.org.uk writes: David * write a HTML pretty printer that will take an HTML document and David format it all nicely indented. It should gracefully handle malformed David input documents, eg missing end tags, badly nested tags etc. David * for bonus points, have it apply [list of transformations] if requested David via command line arguments Parsing HTML with XML::LibXML in http://www.stonehenge.com/merlyn/LinuxMag/col49.html would have been a good starting point for that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion
Re: Brainbench perl test?
On Tue, Aug 28, 2012 at 10:15:27PM +0100, Dave Cantrell said: For perl hiring, we had what I think was a great test. And now that they no longer exist, I can tell you what it was! Yahoo! Europe's was variations on this http://thegestalt.org/simon/yahoo_questions.txt my response for this Q19: Imagine you have all the resources necessary: what would you do in order to hack Yahoo!? By hack we mean somehow change http://www.yahoo.de Was I'd get a job there.
Re: Brainbench perl test?
On 08/28/2012 05:15 PM, David Cantrell wrote: We would, of course, then go through candidates' code with them, talking about how they might improve it given more time, what other approaches they considered and so on. Apparently my solution fucked with peoples' heads. I blame MJD, because IIRC I'd just recently inhaled HOP. that is my primary filtering technique. i review their sample code and talk about its strengths and weaknesses, ways i would like to see it improved, etc. HOW they react to that is a critical part of my review. a couple have been so pissed they almost hung up on me. how dare i tell them how to improve their code!! but most are very open to getting reviews and we end up in good conversations about reasons why i said that and other ways to do things, etc. a collegial attitude where they can learn. even with a lower level coder, that attitude is a big win as i can place them in the right slot knowing they will grow. also this tells me how they think as they will explain why they did some coding thing. most are very appreciative as they get a free review and hopefully integrate my comments into their perl skills. after such an in depth chat (30-60 mins or more), i usually know their perl skills well enough to accurate convey that to my clients. this is why my candidates and clients like my service. old fashioned matchmaking without automated crap in the way. :) thanx, uri