TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Favorite alternative to fizzbuzz for a quick test?

8 点作者 RichardHeart将近 4 年前

9 条评论

mindcrime将近 4 年前
At a previous employer, our approach was to give candidates 5 options and ask them to select 3 to complete. One was fizzbuzz, another was &quot;reverse a string&quot;, and I forget what the others were. But they were all around the same basic level of complexity... basically just trying to ascertain &quot;can this person fundamentally code something&quot;.<p>We gave them as much of a headstart as we could too: a dedicated laptop with an IDE already running, a &quot;skeleton&quot; program for each of the five options already in place, etc. All they had to do was finish the program in order to produce the correct output. The only thing we didn&#x27;t really allow was using the Internet to look up answers (the machine in question had its network connection intentionally disabled). I think we usually gave about 30 minutes for this, but even that wasn&#x27;t a hard cutoff that was strictly enforced.<p>Despite that, it was sad how many people not only couldn&#x27;t complete this test, but frankly didn&#x27;t even come close.<p>Note that the &quot;skeleton&quot; code was in Java, but this was for positions that were specifically advertised as expecting Java experience. IIRC, we also later added a Python version. And frankly, if somebody had come in and said &quot;I can do this, but can I use (R|C++|COBOL|Brainfuck|Whatever)?&quot; I&#x27;m pretty sure we would have said &quot;Yeah, sure, have at it. We just want to see if you can code.&quot;
评论 #27933031 未加载
massung将近 4 年前
After many years (coming up on 20 now) of interviewing candidates and being interviewed, I&#x27;ve found that programming tests are not indicative at all of candidate success in the job. The only reason to use them is a quick weed-out of resumes, before someone takes time out of their day to do a phone chat. Even then, only for very green&#x2F;junior candidates.<p>My absolute favorite thing to do is go over the candidate&#x27;s work history (or classes&#x2F;personal projects if a recent grad):<p>* What project did they enjoy the most?<p>* What did they work on specifically?<p>* What trade-offs did they make?<p>* What were the major risks early on?<p>* How were those risks mitigated?<p>* Were there any unmet goals?<p>* What would they change in hindsight after seeing the project through to completion?<p>* What parts of the project were the most frustrating (non-technical answers here are great, like frustrations with deadlines, other team members, management, constantly changing goals)?<p>* What did they walk away having learned?<p>* How have they applied what they learned to future companies&#x2F;projects?<p>It takes a bit longer, but it&#x27;s so worth it. If you get a good programmer talking about a project they are proud of, you can end up talking for 30-60 minutes easy about every detail, have fun doing it, and learn a lot about them: how they think, how they work, how they work with others, how they work under pressure&#x2F;deadlines, do they communicate well about problems, whether they&#x27;ll be a good fit culturally, etc.
jstx1将近 4 年前
As a side note, FizzBuzz is mostly a meme, right?<p>I don&#x27;t get how it&#x27;s a real interview question considering that it requires hardly any thinking at all. You&#x27;re almost directly writing the description of the problem in code instead of having to think about algorithms, complexity, data structures or edge cases, like in most other problems. Is a test of if-statements and remainders that useful of a filter&#x2F;signal?<p>I know that some companies give it because I&#x27;ve had to do it myself but I still find it bizzare to give such an easy test. Maybe it&#x27;s fine as warm-up in a series of questions and it&#x27;s used to make the candidate comfortable?
评论 #27968303 未加载
评论 #27938443 未加载
评论 #27934127 未加载
matt_s将近 4 年前
How about not doing quick tests?<p>Throw some code up on a screen and ask a candidate to tell you what it does, what they think about it, what they might do different. We all have that piece of code that is the skeleton in the proverbial closet.
评论 #27936843 未加载
bguebert将近 4 年前
I usually go to the Euler project and copy one of their questions. Then I modify the input to try and avoid them copy-pasting the question to find the answer.<p><a href="https:&#x2F;&#x2F;projecteuler.net&#x2F;archives" rel="nofollow">https:&#x2F;&#x2F;projecteuler.net&#x2F;archives</a>
评论 #27940377 未加载
pjacotg将近 4 年前
I normally ask candidates to produce a frequency count of the elements in a list. My ideal solution is that they use a dictionary to do it in O(n) time.
bekantan将近 4 年前
“Merge two sorted arrays” is a good one
d--b将近 4 年前
I had “write a C function that swaps the contents of 2 pointers”.
mam3将近 4 年前
the pancakes !
评论 #27932553 未加载