News for hackers. Stuff that matters.
Re:Why I won't do coding tests by orblivion on Monday April 04, 2016 @06:23AM (#11420693)
Try hiring and getting flooded by applicants who can hardly implement `min`. It would be a waste of the company's time to bring all those applicants in. So long as they're not asking for a ton of my time, I don't mind doing a simple screening.
Re:Why I won't do coding tests by kitd on Monday April 04, 2016 @07:35AM (#11421009)
Pfft. I just use the 'min' package on NPM.
Re:Why I won't do coding tests by ape4 on Monday April 04, 2016 @07:10AM (#11420878)
Oh that's easy (joke)...

    int min(int a, int b) {
       ArrayList<Integer> numbers = new ArrayList<Integer>();
       numbers.add(a);
       numbers.add(b);
       Collections.sort(numbers);
       return numbers.get(0);
    }
Re:Why I won't do coding tests by arethuza on Monday April 04, 2016 @07:47AM (#11421086)
Can I suggest that you write your values to SQL and then use SQL MIN - don't want to reinvent the wheel.

Alternatively, maybe you want a big data min with Hadoop? How many things were we working with anyway, are they definitely numbers?

Re:Why I won't do coding tests by petetnt on Monday April 04, 2016 @07:22AM (#11420942)
Why don't you put it up in your job posting? "MinCorp is looking for developers with 5+ years of min-implementing experience. Must haves: - Must be able to implement min in 2 different languages."

It would save you tons of trouble, time AND money.

Re:Why I won't do coding tests by rietta on Monday April 04, 2016 @07:50AM (#11421106)
Just be ready for copy+paste from Stockoverflow.
Re:Why I won't do coding tests by petetnt on Monday April 04, 2016 @08:51AM (#11421446)
See, now you know that the applicant knows the basic skill set AND is a quick learner.
Re:Why I won't do coding tests by talideon on Monday April 04, 2016 @07:14AM (#11420895)
Yup. My test for this kind of thing is to ask people to write a function that can sum the numbers between two numbers. It's simple, touches on enough to show if the dev is at least minimally competent, and it's a bonus is they give the O(1) solution.

It's surprising how many timewasters even a simple test like that can weed out.

Re:Why I won't do coding tests by dropit_sphere on Monday April 04, 2016 @07:56AM (#11421141)
Make sure you ask for the O(1) solution, because if someone's production instincts are to write

    (fn [l h]
      (* (dec (- h l))
         (/ (+ h l) 2)))
whenever they need to sum between two numbers, then I'd argue they're a worse programmer than someone who just writes `(reduce + (range (inc l) h))`. Programmer time is expensive, and linear time is, for 99% of ranges most devs will encounter, just fine.
Re:Why I won't do coding tests by talideon on Monday April 04, 2016 @02:08PM (#11423966)
That is very much dependent on the circumstances. Besides, this is pre-interview weeding question, and if they give the O(1) answer, that gives use something to talk about in the interview.
Re:Why I won't do coding tests by curryhowardiso on Monday April 04, 2016 @07:46AM (#11421082)
If and when people ask me this (exact) question I like to tell them that although I can implement the O(1) solution, I just copied it off of a 14 year old.
Re:Why I won't do coding tests by rietta on Monday April 04, 2016 @07:59AM (#11421154)
Seperates those who remember their math from those who don't! Brilliant. I love the Gauss equation for this (had to look it up, I need to review math more).
Re:Why I won't do coding tests by talideon on Monday April 04, 2016 @02:08PM (#11423968)
A totally acceptable answer. :-)