4 ms·
We set our in-house recruiter up with a coderpad question that screens candidates with a simple question: "Write a function that counts the number of vowels in
by spamizbad 9y ago
We set our in-house recruiter up with a coderpad question that screens candidates with a simple question:
"Write a function that counts the number of vowels in a string"
Candidates are allowed to run it multiple times and just have to produce a correct result within 10 minutes. It's not a trick question -- the test case in place makes sure you pay attention to case.
Success rate for mid to senior devs? Only 60%.
- notyourloops 9y agoWhat's your process like after that screening measure? Because to me, that's honestly trivial, and a lot nicer than dealing with an extended (8+ hours) homework problem as an introduction to a company's hiring process.
- spamizbad 9y agoA ~4 hour on-site (or google hangout) technical interview and discussion. The first 30-45 minutes is usually us selling you on the company, followed by 2-3 hours of technical stuff. We do throw a few more coding questions at you (ones that are technically trivial, but made more difficult with interview jitters etc), but go beyond that and ask how would you design an API, how would you think about the technical requirements about business problem etc. After that, Q&A, and more selling you on the company.
- notyourloops 9y agoThat sounds like a nice process. I don't know anything about your company, but I'm thankful that you keep it sane and reasonable for prospective developers.
- hfdgiutdryg 9y agoIs Y (Greek I) a vowel?
- spamizbad 9y agoFor this problem, we explicitly say no in the description.
- walshemj 9y agoThat's surprising - ill have to give that a go later this evening as I have been thinking about going back to development form a consultant non coding role. Took me less than 10 seconds to come up with an approach that would work oh just though of a more efficient one but that would use a regex :-)
- deleted 9y ago[deleted]
- twodave 9y agoThis isn't bad. I've used one similar: "Write a function that reverses the words in a (string) sentence" i.e. (x) => x.split(' ').reverse().join(' ');
- bmomb 9y agoJust a little trivia; The fastest way to reverse a string is in JS is: function reverse(s) { var o = []; for (var i = 0, len = s.length; i <= len; i++) o.push(s.charAt(len - i)); return o.join(''); }
- deleted 9y ago[deleted]
- logfromblammo 9y agoIn C#, the string object has some convenience in it: return inputString.Count( "eaoiuAIEOU".Contains ); Or if you want to solve two problems: static Regex VowelMatcher = new Regex( "[aeiou]", RegexOptions.Compiled | RegexOptions.IgnoreCase ); ... return VowelMatcher.Matches( inputString ).Count; And if you want to be clever and snarky: return 2; // number of vowels in "a string"
- taco_emoji 9y agoThe Count and Contains methods are not on string, they're both extension methods on IEnumerable<T>, which string gets for free by implementing IEnumerable<char>.
- 1812Overture 9y agoI applied for an analytics position that unexpectedly had me take a Python coding test like this (I know a bit of PHP and Java but no Python) and I was able to google everything I needed to pass the test in the time limit. Apparently I got one of the higher scores too. Got the job. It has not required me to write a single line of Python, lol.
- rajacombinator 9y agoGoogling stuff to copy is one of the most important skills for programmers. I was appalled when a middle aged senior programmer at my first internship told me this, thinking he was lazy and unethical... (people are paying you after all!)... how naive I was!
- mywittyname 9y agoScrew it, everyone else is posting code examples: def vc(s): return len([c for c in s if c in ['a','e','i','o','u']])
- noahc 9y agoAs an experiment, I was able to do this in under 3 minutes with ruby. I'd say I'm an average programmer.