TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Dear Startups: stop asking me math puzzles to figure out if I can code

872 pointsby brryantover 11 years ago

60 comments

tommorrisover 11 years ago
Here&#x27;s the test I&#x27;ve used in the past:<p>Before the interview, I ask them to write some code to access an HTTP endpoint that contains exchange rate data (USD, EUR, GBP, JPY etc.) in XML and to parse and load said data into a relational database. Then to build a very simple HTML form based front-end that lets you input a currency and convert it into another currency.<p>I ask them to send me either a link to a repository (Git, SVN etc.) or a zipball&#x2F;tarball. If the job specifies a particular language, then I obviously expect it to be in that language. If not, so long as it isn&#x27;t in something crazy like Brainfuck, they have free range.<p>If the code works and is basically sane, that goes a long way to get them shortlisted.<p>During the interview, I&#x27;ll pull the code they sent up on a projector and ask them to self-review it. If they can figure out things that need improving in their code, that weighs heavily in their favour. Usually this is things like comments&#x2F;documentation, tests, improving the structure or reusability. If it&#x27;s really good, I&#x27;ll throw a hypothetical idea for refactoring at them and see how they think.<p>The reason this works is that, despite Hacker News&#x2F;Paul Graham dogma to the contrary, &quot;smartness&quot; isn&#x27;t the only thing that matters in programmers. It&#x27;s actually fairly low down the list. When hiring programmers, I want people who are actually able to do the daily practical job of writing code, modest and self-critical enough to spot their own mistakes, and socially capable to actually communicate their decisions and mistakes to the people they work with.<p>I interviewed a guy who was intellectually very smart and understood a lot about CS theory. I asked him why the PHP code he sent me didn&#x27;t have any comments. &quot;I don&#x27;t believe in comments because they slow the PHP interpreter down.&quot; Sorry, he can be smarter than Einstein but I ain&#x27;t letting him near production code.
评论 #6585251 未加载
评论 #6585164 未加载
评论 #6585443 未加载
评论 #6584759 未加载
评论 #6584637 未加载
评论 #6586052 未加载
评论 #6585239 未加载
评论 #6584662 未加载
评论 #6584619 未加载
评论 #6588021 未加载
评论 #6584733 未加载
评论 #6588401 未加载
评论 #6611811 未加载
评论 #6590078 未加载
评论 #6586636 未加载
评论 #6584584 未加载
rdtscover 11 years ago
Two possible reasons:<p>1) I think a lot of start-ups want to hire &quot;smart&quot; people. Because they expect the new person to eventually wear many hats. Objective-C, Java, Android, CSS, server side concurrency, monitoring. An we&#x27;ve all seen Hunter and Schmidt reference that tokenadult usually posts when talk about interviewing comes around and it does seem that a general mental ability test (like an IQ test) combined with a work samples seem to predict future performance of that employee. Well except that one can&#x27;t just straight up give IQ test to job applicants (there is a court case about that). So we are left with a job sample (which many forget to give, as is the point of the author). But instead many focus on the GMA and create proxies for it -- cute little puzzles about blenders, round manhole covers, and other such silly things.<p>2) Those interviewing don&#x27;t know the technical stuff and are afraid you&#x27;d out-bullshit them. &quot;How does an Ajax request work&quot; well if the interviewer themselves doesn&#x27;t quite know the details the might not be able to evaluate it properly. They could have it written down but well, some technical questions have many different levels of depth that a candidate might descent to. So a quick written answer to the question might seem wrong but it is really because the candidate is more advanced. So puzzles seems to be a generic and &quot;easier&quot; to handle.
评论 #6584455 未加载
评论 #6583707 未加载
评论 #6583722 未加载
ekover 11 years ago
&gt; Spoiler alert: to solve this problem, you need to know how to enumerate the rationals.<p>This problem was addressed nicely in this functional pearl by Jeremy Gibbons, et al.: <a href="http://www.cs.ox.ac.uk/jeremy.gibbons/publications/rationals.pdf" rel="nofollow">http:&#x2F;&#x2F;www.cs.ox.ac.uk&#x2F;jeremy.gibbons&#x2F;publications&#x2F;rationals...</a> . As interesting as the result is, however, it&#x27;s a pretty well-made point that research-level ideas from the programming languages community are not really software engineering interview material in the vast majority of cases.<p>This is yet another example of &quot;rockstar developer&quot;-itis, wherein startups are given to believe that they need the best of the best when in fact they do not. This particular example is entirely egregious because they asked her about something that requires enumerating the rationals when what they really wanted was an iOS code monkey. Then they fired her, based on their own shoddy interview.
评论 #6586263 未加载
评论 #6586328 未加载
Xylakantover 11 years ago
I actually like asking math questions on interviews. It shows how people approach a problem. Asking code questions in an arbitrary interview setting shows just about nothing - no access to a reference doc, somebody peering over your shoulder. Heck, I couldn&#x27;t code my way out of a wet paperback in that setting.<p>Certainly, asking <i>only</i> math questions is stupid as well, people should know at least a little about the stuff they&#x27;re supposed to work with, but teaching an actual language to a smart person eager to learn is a breeze compared to teaching problem solving to someone who memorized the reference manual.
评论 #6585750 未加载
评论 #6583940 未加载
评论 #6583767 未加载
评论 #6586487 未加载
评论 #6583744 未加载
mcphilipover 11 years ago
After much experimentation giving interviews for server side positions, I&#x27;ve come to favor questions that involve routine real world problems that can be handled in increasingly sophisticated ways.<p>One example I use is getting the candidate to write crud, list, and search controller actions for a simple category data structure. Given a basic category data model (e.g. Name, Parent), the candidate starts with the crud actions.<p>Crud actions aren&#x27;t meant to be difficult to solve and serve as a basic screener to verify the candidate has working knowledge of the basics. The only edge case I look for the candidate to ask about is if orphaning child nodes is allowed (I.e updating parent node, deleting a node with children)<p>List action(s) start getting more interesting since recursion comes into play. A basic implementation of an action that can load the tree given an arbitrary category as a starting point is expected. If the candidate has some prior experience, a discussion of what performance concerns they may have with loading the category tree is a follow up question. The tree loading algorithm is then expected to be revised to handle an optional max depth parameter. An edge case I look to be considered is how to signify in the action response that a category has one or more child nodes that weren&#x27;t loaded due to a depth restriction.<p>The search action implementation has a degree of difficulty scaled to the candidates experience level. All candidates have to write an action that returns a collection of categories matching a search string. Those with previous experience are asked about a paging solution. Senior level candidates are asked to return matching categories in a format that indicates all ancestors ( for instance: &quot;Category 1 -&gt; Category 1.1 -&gt; Category 1.1.1&quot; result for search string &quot;1.1.1&quot;)<p>For an added degree of difficulty, candidates can be asked to recommend data model tweaks and algorithms supporting tree versioning requirements necessary to allow for loading the category tree&#x27;s state at a given point in time.<p>The candidate&#x27;s performance to this exercise seems to give some insight into their level of experience and ability to implement algorithms from a common real world example without having to ask much trivia or logic problems.
评论 #6584500 未加载
评论 #6587336 未加载
dpiersover 11 years ago
Hiring engineers is hard, and companies haven&#x27;t really figured it out yet. Even the best companies rely on puzzles and gimmicks that often have little to do with day-to-day programming.<p>At one company I interviewed with, I was asked to implement a queue using two stacks. At that time in my programming career, I had worked with C, C++, Obj-C, Lua, Python, JavaScript, SQL, and a handful of DSLs developing games, game development tools, and web applications. Want to know what I had never done? Written a queue using two stacks. My immediate response to the question was, &quot;Why would you want to do that?&quot;<p>If you really want to know if someone has the capacity to pull their weight as an engineer, ask them about what they&#x27;ve built. Even if they are fresh out of college, the best engineers will have projects they can talk about and explain. Ask how they approached&#x2F;solved specific problems. Ask what they&#x27;re most proud of building. Ask what was most frustrating.<p>Those are the kind of questions that will provide insight into a person&#x27;s problem solving capabilities and offer a decent picture of what they&#x27;re capable of doing.
评论 #6583939 未加载
评论 #6583854 未加载
评论 #6583824 未加载
评论 #6583831 未加载
评论 #6585043 未加载
x0054over 11 years ago
Here is an interesting idea that I had reading this. As a startup, what if you were to create a simple computer language that looked different from most other computer languages, at least somewhat different. Alternatively, just use one of the many really obscure programming languages out there, just make sure the applicant does not know it ahead of time. Give the applicant a 10-20 page reference manual for the language and ask them to make a simple program of some sort. Have them read the manual and write the program, hopefully while not looking over their shoulder, so they can relax. In the manual you give them omit one critical function or API reference, but make sure that info is available online (make it available if you made up the language). Then see what happens.<p>This would test programmers ability to learn a new language.
评论 #6583949 未加载
评论 #6583897 未加载
评论 #6584111 未加载
morganteover 11 years ago
It is rather unfortunate how little correlation most tech interviews have with their respective jobs. It&#x27;s largely a lose-lose situation for everyone. Developers who could easily build great systems but aren&#x27;t experts in graph theory get passed over while brilliant mathematicians who can&#x27;t necessarily code get hired. Result? Companies simultaneously having to fire employees while facing a supposed talent crunch. Given that this hurts everyone, how did we even get into this situation?<p>Probably because the only person who doesn&#x27;t lose from this is the interviewer: they get to have fun. Honestly, when you spend all day buried in code, it&#x27;s <i>fun</i> to play with puzzles for a change.<p>Perhaps it&#x27;s time we started optimizing interviews for hiring success rather than interviewer happiness.
评论 #6583754 未加载
Beltirasover 11 years ago
Funny. Just made a hire and this story made me think of it.<p>The position I was filling is a part-time position for a CS major, sort of like an internship. I devote time to develop his&#x2F;her skills, s&#x2F;he would get real-world experience, and a little money to help with cost of living. If everything works out, a position could open up for full employment.<p>I had a pretty good idea what I was looking for. Someone that had good grasp on theory but had no experience coding. Preferably enrolled in Uni. I had 5 applicants but the only candidate I interviewed is enrolled in Math-CS.<p>I basically tried to gauge if he had deep interests and asked him to code a bit, solve a simple control (find me the article with the highest hitcount from the day a week ago, gave him 10 minutes).<p>He failed the coding test but I made the hire regardless. Reason why was 2 things out of the 4 hours we spent together: When I asked him who he considered the father of CS he rattled off von Neuman, Djikstra and Knuth. Yeah, you can make that argument I suppose, but he knew who the influential people were. The other thing was: even if he failed the coding test he failed it by not reading the code examples quite right, he was using my code to try to help himself solve the problem. I&#x27;m sure he&#x27;ll work out.<p>We as a field should employ internships a lot more than we do, get the college kids and undergrads working on real-world problems a lot more than we do.
lotsofcowsover 11 years ago
I agree. But for a different reason: I&#x27;m shit at maths puzzles.<p>I just don&#x27;t have the experience or tools or interest for them.<p>And yet, somehow, in 20 years of business geekery I&#x27;ve never come across a problem I can&#x27;t solve.<p>Maybe when writing Tetris for J2ME I would have saved myself 10 minutes googling if I&#x27;d had the experience to realise that right angle based matrix translations don&#x27;t require fp maths and maybe when writing financial indicators, I&#x27;d have saved myself half a day if I hadn&#x27;t had to look up integrals but this sort of stuff is definitely in the minority as far as my experience goes.
评论 #6584018 未加载
jphover 11 years ago
&gt; Breadth-first search from both ends.<p>I believe this is deeply valuable. For some roles, I would <i>much</i> prefer to hire someone who can quickly see the value of breadth-first search from both ends.<p>If he&#x2F;she doesn&#x27;t happen to know the syntax of Ruby, or Java, etc. it&#x27;s less important to me.
评论 #6583770 未加载
评论 #6583768 未加载
评论 #6583989 未加载
评论 #6584300 未加载
jroseattleover 11 years ago
I&#x27;m dealing with this now, having been interviewing for different engineering roles over the past two months. It hasn&#x27;t been as bad as straight-up conceptual math problems, but there have been plenty of questions that I have questioned for validity.<p>Interviewer: &quot;How can we optimize the character replacement in a string such that we use no extra memory?&quot; Me: &quot;We do this and that and this. But, should we consider what situations we would need this optimization?&quot; Interviewer: &quot;What? Why?&quot;<p>I can now use this as a filter as I interview organizations. Optimizing algorithms by creating your own core data structure classes (instead of using the built-in ones) is great in certain circumstances, but an absolute waste of time in many others. And if you&#x27;re <i>not</i> going to ask me about those times when making those improvements is important, then you&#x27;re not asking questions for a programmer -- you&#x27;re asking them for a theoretician who can recall syntax.<p>It&#x27;s poor practice, and I&#x27;ve seen it everywhere.
tokenadultover 11 years ago
There are many discussions here on HN about company hiring procedures. Company hiring procedures and their effectiveness is a heavily researched topic, but most hiring managers and most job applicants haven&#x27;t looked up much of the research. After reading the blog post kindly submitted here and some of its comments, and then reading most of the comments here on HN that came in while I was asleep in my time zone, it looks like it&#x27;s time to recycle some electrons from a FAQ I&#x27;m building about company hiring procedures.<p>The review article by Frank L. Schmidt and John E. Hunter, &quot;The Validity and Utility of Selection Models in Personnel Psychology: Practical and Theoretical Implications of 85 Years of Research Findings,&quot;[1] Psychological Bulletin, Vol. 124, No. 2, 262-274 sums up, current to 1998, a meta-analysis of much of the <i>huge</i> peer-reviewed professional literature on the industrial and organizational psychology devoted to business hiring procedures. There are many kinds of hiring criteria, such as in-person interviews, telephone interviews, resume reviews for job experience, checks for academic credentials, personality tests, and so on. There is much published study research on how job applicants perform after they are hired in a wide variety of occupations.[2]<p>EXECUTIVE SUMMARY: If you are hiring for any kind of job in the United States, with its legal rules about hiring, prefer a work-sample test as your hiring procedure. If you are hiring in most other parts of the world, use a work-sample test in combination with a general mental ability test.<p>The overall summary of the industrial psychology research in reliable secondary sources is that two kinds of job screening procedures work reasonably well. One is a general mental ability (GMA) test (an IQ-like test, such as the Wonderlic personnel screening test). Another is a work-sample test, where the applicant does an actual task or group of tasks like what the applicant will do on the job if hired. (But the calculated validity of each of the two best kinds of procedures, standing alone, is only 0.54 for work sample tests and 0.51 for general mental ability tests.) Each of these kinds of tests has about the same validity in screening applicants for jobs, with the general mental ability test better predicting success for applicants who will be trained into a new job. Neither is perfect (both miss some good performers on the job, and select some bad performers on the job), but both are better than any other single-factor hiring procedure that has been tested in rigorous research, across a wide variety of occupations. So if you are hiring for your company, it&#x27;s a good idea to think about how to build a work-sample test into all of your hiring processes.<p>Because of a Supreme Court decision in the United States (the decision does not apply in other countries, which have different statutes about employment), it is legally risky to give job applicants general mental ability tests such as a straight-up IQ test (as was commonplace in my parents&#x27; generation) as a routine part of hiring procedures. The Griggs v. Duke Power, 401 U.S. 424 (1971) case[3] interpreted a federal statute about employment discrimination and held that a general intelligence test used in hiring that could have a &quot;disparate impact&quot; on applicants of some protected classes must &quot;bear a demonstrable relationship to successful performance of the jobs for which it was used.&quot; In other words, a company that wants to use a test like the Wonderlic, or like the SAT, or like the current WAIS or Stanford-Binet IQ tests, in a hiring procedure had best conduct a specific validation study of the test related to performance on the job in question. Some companies do the validation study, and use IQ-like tests in hiring. Other companies use IQ-like tests in hiring and hope that no one sues (which is not what I would advise any company). Note that a brain-teaser-type test used in a hiring procedure could be challenged as illegal if it can be shown to have disparate impact on some job applicants. A company defending a brain-teaser test for hiring would have to defend it by showing it is supported by a validation study demonstrating that the test is related to successful performance on the job. Such validation studies can be quite expensive. (Companies outside the United States are regulated by different laws. One other big difference between the United States and other countries is the relative ease with which workers may be fired in the United States, allowing companies to correct hiring mistakes by terminating the employment of the workers they hired mistakenly. The more legal protections a worker has from being fired, the more reluctant companies will be about hiring in the first place.)<p>The social background to the legal environment in the United States is explained in various books about hiring procedures,[4] and some of the social background appears to be changing in the most recent few decades, with the prospect for further changes.[5]<p>Previous discussion on HN pointed out that the Schmidt &amp; Hunter (1998) article showed that multi-factor procedures work better than single-factor procedures, a summary of that article we can find in the current professional literature, for example &quot;Reasons for being selective when choosing personnel selection procedures&quot;[6] (2010) by Cornelius J. König, Ute-Christine Klehe, Matthias Berchtold, and Martin Kleinmann:<p>&quot;Choosing personnel selection procedures could be so simple: Grab your copy of Schmidt and Hunter (1998) and read their Table 1 (again). This should remind you to use a general mental ability (GMA) test in combination with an integrity test, a structured interview, a work sample test, and&#x2F;or a conscientiousness measure.&quot;<p>But the 2010 article notes, looking at actual practice of companies around the world, &quot;However, this idea does not seem to capture what is actually happening in organizations, as practitioners worldwide often use procedures with low predictive validity and regularly ignore procedures that are more valid (e.g., Di Milia, 2004; Lievens &amp; De Paepe, 2004; Ryan, McFarland, Baron, &amp; Page, 1999; Scholarios &amp; Lockyer, 1999; Schuler, Hell, Trapmann, Schaar, &amp; Boramir, 2007; Taylor, Keelty, &amp; McDonnell, 2002). For example, the highly valid work sample tests are hardly used in the US, and the potentially rather useless procedure of graphology (Dean, 1992; Neter &amp; Ben-Shakhar, 1989) is applied somewhere between occasionally and often in France (Ryan et al., 1999). In Germany, the use of GMA tests is reported to be low and to be decreasing (i.e., only 30% of the companies surveyed by Schuler et al., 2007, now use them).&quot;<p>[1]<p><a href="http://mavweb.mnsu.edu/howard/Schmidt%20and%20Hunter%201998%20Validity%20and%20Utility%20Psychological%20Bulletin.pdf" rel="nofollow">http:&#x2F;&#x2F;mavweb.mnsu.edu&#x2F;howard&#x2F;Schmidt%20and%20Hunter%201998%...</a><p>[2]<p><a href="http://www.siop.org/workplace/employment%20testing/testtypes.aspx" rel="nofollow">http:&#x2F;&#x2F;www.siop.org&#x2F;workplace&#x2F;employment%20testing&#x2F;testtypes...</a><p>[3]<p><a href="http://scholar.google.com/scholar_case?case=8655598674229196978&amp;q=Griggs+Duke+Power&amp;hl=en&amp;as_sdt=2,24" rel="nofollow">http:&#x2F;&#x2F;scholar.google.com&#x2F;scholar_case?case=8655598674229196...</a><p>[4]<p><a href="http://books.google.com/books?hl=en&amp;lr=&amp;id=SRv-GZkw6TEC" rel="nofollow">http:&#x2F;&#x2F;books.google.com&#x2F;books?hl=en&amp;lr=&amp;id=SRv-GZkw6TEC</a><p>[5]<p><a href="http://intl-pss.sagepub.com/content/17/10/913.full" rel="nofollow">http:&#x2F;&#x2F;intl-pss.sagepub.com&#x2F;content&#x2F;17&#x2F;10&#x2F;913.full</a><p><a href="http://www.economics.harvard.edu/faculty/fryer/files/Fryer_Racial_Inequality.pdf" rel="nofollow">http:&#x2F;&#x2F;www.economics.harvard.edu&#x2F;faculty&#x2F;fryer&#x2F;files&#x2F;Fryer_R...</a><p>[6]<p><a href="http://geb.uni-giessen.de/geb/volltexte/2012/8532/pdf/preprint_j.1468_2389.2010.00485.x.pdf" rel="nofollow">http:&#x2F;&#x2F;geb.uni-giessen.de&#x2F;geb&#x2F;volltexte&#x2F;2012&#x2F;8532&#x2F;pdf&#x2F;prepri...</a>
评论 #6586110 未加载
评论 #6586560 未加载
评论 #6585173 未加载
评论 #6586406 未加载
评论 #6585315 未加载
评论 #6585463 未加载
评论 #6589804 未加载
评论 #6590709 未加载
评论 #6588166 未加载
DigitalSeaover 11 years ago
I failed mathematics in school, for the life of me I can&#x27;t grasp them beyond the basics, but give me laptop and a copy of Sublime and I&#x27;ll code anything you want. I can code, but I would fail any mathematical test given to me. This kind of approach has always bothered me, there are a lot of good developers out there bad at maths but posses strong problem-solving and highly analytical skills.<p>Being a developer is 80% Google and 20% actual coding knowledge. We are hackers at the end of the day, not miniature Einstein&#x27;s with encyclopaedias for brains.
评论 #6586395 未加载
评论 #6587141 未加载
mrcactu5over 11 years ago
It looks like Emma&#x27;s math prowess is working against her. It&#x27;s ironic the app developers - who need her help the most - are pushing her away.<p>OK, so there is a difference between computer science and programming. that&#x27;s why there are two different stack-exchanges:<p><pre><code> cs.stackexchange.com stackoverflow.com </code></pre> And we can make even finer distinctions if we wanted to.<p>it&#x27;s actually really fucking INCREDIBLE that<p>* you can know tons of CS without being able to build a decent app * you can a decent facebook clone without having any idea how it works<p>I feel really bad for Emma. I was a math major, but app developers won&#x27;t even look at me b&#x2F;c I&#x27;m not a full-stack whatever. So now I&#x27;m a Data Scientist at an advertising firm in Puerto Rico.
评论 #6586507 未加载
michaelpintoover 11 years ago
After reading this I have a dumb question: The person behind the post is a CS major but only played a little bit with the C programming language in college — is this pretty common these days?
评论 #6583848 未加载
评论 #6584060 未加载
评论 #6583781 未加载
评论 #6583845 未加载
评论 #6584609 未加载
评论 #6583792 未加载
评论 #6584901 未加载
评论 #6584259 未加载
lucasnemethover 11 years ago
I believe there is some kind of inferiority complex, we don&#x27;t believe software engineering is actually worth it. Probably, it is the result of an academic mindset that is taught at colleges, where the applied fields are seen as less important than the &quot;pure&quot; ones. But good software engineering, that is, writing complex systems, with a lot of requirements, maintainable, scalable, nice APIs, etc. it&#x27;s very, very hard. And we know it! If we applied our hiring methods to writers, we would be asking them to improvise a rap rhyme, when we wanted to hire a novelist.
deluxaranover 11 years ago
My opinion on this is that most of the interview processes is pretty old(over 20-30 years) and back then a good programmer was also a pretty good mathematician, and now most of the people that do interviews just use the same old patterns because, maybe, some of them don&#x27;t know any better or because that is what they found in some books they have read.<p>I tend to hate the interviews that ask me to solve math and logic brainteasers because I don&#x27;t see the value in them regarding my knowledge of programming.
biotover 11 years ago
Math puzzles are great if the problem is easily understood, the solution achievable without a math degree, and you ask them to solve it by writing code.<p>For example: &quot;This database contains 100,000 problems with standardized parameters. The problem definition is defined in the file spec.txt which you can grab from our code repository. Write the code to solve these problems efficiently, passing each solution to a remote service via POSTing to a REST API, the documentation for which you can find here. Bonus points for parallel execution. Feel free to use any editor&#x2F;IDE and reference online documentation, Stack Overflow, etc. that you want. If anything&#x27;s not clear or you need a hand with something, just ask as you would if you were an employee already. Ready to get started?&quot;<p>The great thing is that once you&#x27;ve identified a candidate, you can do remote screen sharing and have them write code before they even have to come into the office. I&#x27;ve interviewed a fair number of remote people this way and it&#x27;s excellent for weeding out the people who can talk the talk but can&#x27;t program worth a damn. And it limits bias because you don&#x27;t care about much beyond their communication ability plus their technical ability.
keithgabryelskiover 11 years ago
My observation is that a lot of interviews come down to &quot;stump the chump&quot; questions; a question that is meant to show a single issue the interviewee has under their belt and is used to gauge the entirety of the interviewer&#x27;s ability. Math puzzles&#x2F;logic puzzles are in the same category: they require domain knowledge that probably doesn&#x27;t translate to any job I&#x27;ve ever worked on.<p>That aside, one must have a way to measure the abilities of a candidate -- and asking the same set of questions to many people allows you to compare the answers as apples to apples.<p>I generally don&#x27;t restrict my people from asking any particular question, but I will ask them to consider what a failed answer really means for the specific job (questions are generally adjusted then).<p>As an aside, some questions of mine that aren&#x27;t specifically about coding:<p>* do you code outside of work (a love of coding translates to good coders)<p>* send me a link to some code you&#x27;ve written that you are proud of (let see what you got)<p>* tell me about a problem you had where your solution wasn&#x27;t correct (how have you dealt with failure).
mariozivicover 11 years ago
IMHO, the post is more about the interviewers not understanding what is important for success in the job they are interviewing for than about anything else. If you need a person that will have to switch technologies, languages and paradigms, you have to test for that, make sure a candidate has done it before or is capable of doing it in expected time with expected depth.<p>If one is good and quick in problem solving or has high GMA, that does indicate that he has the capacity to handle new and difficult things in general, but says nothing about the speed with which he can handle a particular new thing. Author&#x27;s example with JavaScript is very good illustration how difficult can it be to learn a new paradigm for the first&#x2F;second time.
cicatrizover 11 years ago
Here&#x27;s a writeup about a recent study that showed interviewers couldn&#x27;t predict GPA any better when the interviewees answers were accurate versus random: <a href="http://www.danielwillingham.com/1/post/2013/10/why-job-interviews-dont-work.html" rel="nofollow">http:&#x2F;&#x2F;www.danielwillingham.com&#x2F;1&#x2F;post&#x2F;2013&#x2F;10&#x2F;why-job-inter...</a><p>Anyone who supports math puzzles (or whatever else) in an interview would have to argue that their perception of the candidates performance offers a clear enough data point that it doesn&#x27;t dilute other information available to them. Given Google&#x27;s study finding data otherwise, they certainly have the burden of proof.
10098over 11 years ago
Dear god, what kind of startup hires a person with only basic Java and Python knowledge, then hands them K&amp;R and expects them to churn out production-quality code?! That&#x27;s unfair.
评论 #6584829 未加载
eaxitectover 11 years ago
Totally agree, asking math puzzles (sometimes really hard ones) to develop a copycat iphone app? Interviewing like this is really off the rails.<p>I really understand that a startup with scarce resource would like to do its best shot. However as discussed long ago (<a href="https://news.ycombinator.com/item?id=2385424" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2385424</a>), it is really frustrating that asking math puzzles are assumed as the best way to hire the best for the job.
Tyrannosaursover 11 years ago
On one hand I completely agree, on the other my experience of most CS graduates is that you can&#x27;t code, at least not in the way that anyone codes in the real world so it&#x27;s not a great thing to spend too much time on. That&#x27;s not the fault of most graduates, it&#x27;s what and how they&#x27;re taught. Most people coming out of university know a little bit about a lot of languages and theories. That&#x27;s good for giving them an overview but not great when it comes to having actual usable skills on day one.<p>Because of this I&#x27;ve pretty much given up on hiring graduates based on their technical skills so instead I&#x27;m looking for someone smart, who gets that they&#x27;ve got a lot to learn, who is interested in technology and can get on with the other people in the team.<p>I don&#x27;t think asking people math questions per se is a great idea, but if you&#x27;ve studied a maths degree it&#x27;s a good way of working out if you&#x27;re smart and if you were paying any attention at all during university.<p>(Incidentally this may be different in other countries (I&#x27;m in the UK) or in a company where you&#x27;re able to attract the very best who have picked up really solid skills, but for most organisations that&#x27;s not the case as most graduates spent more of their own time in the bar than coding.)
mcgwizover 11 years ago
Dear poster, don&#x27;t imply all startups are equal.<p>If a startup asks you to solve math puzzles, it&#x27;s possible that the work you will be doing heavily involves the creative use of math or information analysis. (This is more broadly valuable than many people recognize.)<p>Also, it&#x27;s also possible that that particular startup doesn&#x27;t know how to effectively interview.<p>It doesn&#x27;t sensationalisticly mean all Startups (capitalization yours) don&#x27;t know how to effectively interview.<p>Also, rather than focus on your ability to learn, I would humbly recommend you reconsider the basic nature of employment. An interview should be considered a two-way conversation. You&#x27;re not selling yourself as a slave, you&#x27;re entering into a mutually-beneficial, private, voluntary arrangement. Thus, even someone who goes into an interview willing to accept anything and everything they offer could be expected to ask simply, &quot;And what exactly will I be doing?&quot; But better yet, grill them about every nitty-gritty detail you can think of. Although some insecure interviewers may be taken aback (I&#x27;m guilty of asserting the interviewer was wrong on more than one occasion, both times still receiving an offer), I for one am impressed when a candidate demonstrates a sharp, critical and skeptical mind in this way.
theanirudhover 11 years ago
Even after reading Jeff Atwood&#x27;s post[1], it still amazes me how many programmers fail the fizz buzz test. We dont even get the chance to ask tough programming qustions. Simple questions like fizz buzz, loops and recursion were good enough to filter out a lot of applicants.<p>[1] <a href="http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html" rel="nofollow">http:&#x2F;&#x2F;www.codinghorror.com&#x2F;blog&#x2F;2007&#x2F;02&#x2F;why-cant-programmer...</a>
评论 #6584799 未加载
评论 #6597205 未加载
eksithover 11 years ago
This may be another reason people are eager to start their own company in lieu of working for someone else. If the questions are rubbish and completely unrelated to the actual job, then there&#x27;s a huge disconnect between the interviewer (or HR company, as a lot of places outsource that) and where the actual work is to take place. I blame both.<p>The irony is that, in an effort to hire the &quot;smartest&quot; people, they leave out the wisest. Which is arguably more useful.
评论 #6583728 未加载
codecrusadeover 11 years ago
1. Most IQ tests are Bullshit 2. We all know what happened to the company famous for &quot; Who moved mount fuji&quot; 3. Math Puzzles are good if they are of the IMO level- but these things need a lot of concentration and joy to solve- Not under stress interview conditions. 4. Expecting someone to show brilliance by solving a math puzzle in under ten twenty minutes is a lot like a public willy wagging competition 5.Even more disgusting is the semi dumb questions at Mckinsey inerviews like - &quot;Estimate the number of mineral water bottles in London&quot; 6. 7.In &#x27;Jobs&#x27;, Walter Issacson says Steve was never into much of these puzzles- I can understand the reason. 8. &#x27; I think a lot of what people call intelligence just boils down to curiosity&#x27;-(great quote from an inspirational friend-<a href="http://www.flickr.com/photos/elizabethbw/8373942339/" rel="nofollow">http:&#x2F;&#x2F;www.flickr.com&#x2F;photos&#x2F;elizabethbw&#x2F;8373942339&#x2F;</a>) 9. People who ask these kind of puzzles end up creating a lot of CPU without any GPU. Very Little beauty. Very Little love. Disclosure- Im a member of Mensa Inernational. No Offense meant.
tbassettoover 11 years ago
Our current hiring process at my startup:<p>- After a first non-technical call, we ask the candidate to create a very small project based on our SDK. We send him the documentation and a very small sample. He can almost use every tools he wants to create that small project and, of course, we do not set any deadlines. It allows us to see how the candidate architecture his applications and it gives us a project to discuss during the following call. - If all goes well, we invite the candidate on site to present our code&#x2F;project and eventually brainstorm together. So that both parties can see if they can work together and the candidate has an insight about how we work, how our code looks like.<p>Clearly, it&#x27;s far from perfect and we are often considering changing it. Imagine if every company where you are applying would ask you to create an app from scratch with their SDK? We may lose some candidates, but at least we hire only people that fit the company&#x27;s culture.
评论 #6584046 未加载
gregjorover 11 years ago
This is sadly common in a community keen on logic, evidence, and avoiding fallacies in thinking. Worse than puzzles are pointless faux psychological screening questions like &quot;Tell me about something painful that has happened to you and how you dealt with it.&quot;<p>I would (and have) asked if the interviewer or organization has any evidence to show that interview puzzle performance (or shit like Myers-Brigg) predicts job performance. No? Not surprising. Google did look into it and found no relationship. (<a href="http://www.businessinsider.com/how-google-hires-2013-6" rel="nofollow">http:&#x2F;&#x2F;www.businessinsider.com&#x2F;how-google-hires-2013-6</a>)<p>Programmer interviews are so crazy and sometimes sadistic that I catalogued some of the more common interview patterns:<p><a href="http://typicalprogrammer.com/thirteen-patterns-of-programmer-interviews/" rel="nofollow">http:&#x2F;&#x2F;typicalprogrammer.com&#x2F;thirteen-patterns-of-programmer...</a>
czarpinoover 11 years ago
While I agree that puzzles and mind games are silly ways to appraise coding skills, they do give an insight about a person&#x27;s raw intelligence, or knowledge, or <i>potential</i>. As CS is an application of math and programming is an application of CS, being good in math does not necessarily mean proficiency in it&#x27;s application; same goes for CS. IMO, a good programmer must, at least, have:<p>+ <i></i>knowledge<i></i> - generally mastery of math&#x2F;CS concepts and can be thought of as <i>the</i> potential<p>+ <i></i>application skills<i></i> - modeling a real world problem into a theoretical, computable, and (ultimately) programmable form<p>+ <i></i>execution skills<i></i> - implementation (coding) of a solution including the ability to utilize requisite tools&#x2F;technologies such programming languages, DBs, OS, and so on<p>That said, hiring process should cover each of these areas and programmers should work on all these as well.
swelly127over 11 years ago
I have the exact same problem as OP. Getting tons of job offers because I&#x27;ve been doing competitive math and algorithms since grade school but really have hard time understand technology. I&#x27;m pretty ambitious and I want to join a small, high growth startup and have the excitement of being part of a founding team but I&#x27;m afraid of letting people down.<p>I could learn heroku&#x2F;RoR&#x2F;whatever other technology but news things are always coming out and some people keep up with it so easily. I&#x27;m not sure being a dev is right for me if I take so long to understand such basic stuff. But I love coding and algos! I write python scripts to do all my homework... and then run them in codecademy labs because doing it in unix makes me so confused.<p>If anyone has had the same problem please let me know how you got over this hurdle. Thanks.<p>background; sophomore, cs major, cornell
评论 #6588882 未加载
jpgvmover 11 years ago
When I hire programmers I try to favour ingenuity, knowledge and as best as I can gauge it, work ethic. For instance I might ask them about a theoretical task, possibly something like a scheduler or packet filter etc and give them domain specific data about how it will be used and ask them if there are any optimization they could make if they had this data about the systems use case.<p>Or I might ask them to describe how an event loop works.. or what the I&#x2F;O path between their program and the disk looks like in as much detail as they can.<p>Someone that loves the field is going to have a decent idea about these things even if they never had to build one before.<p>caveat: these examples are very system level but you can substitute them with appropriate web, financial etc domain specific knowledge.
CmonDevover 11 years ago
Start-ups can afford asking candidates puzzles? I thought everyone was struggling to find developers.
评论 #6584448 未加载
fayyazklover 11 years ago
Finally some one pointed out the importance of the ability to actually code and produce something that works. Algorithmic problem solving ability is far less utilized in actual every day job compared to being able to code. Just imagine how much of your math skills did you actually need going well through all those bad experiences? Would you still be considered slow learner and fired if you knew how to code pretty well but just wasn’t so good at figuring out shortest path in a graph. Isn’t it possible to know the CS basics well i.e. familiar with complexity, big Os, basic data structures and sorting and being able to learn any advanced standard algo when needed by looking it up? Just wondering….
jsunover 11 years ago
I think a lot of companies use brain teasers or math problems to test general mental aptitude, whether it works or not is under serious debate, but in my opinion that&#x27;s the right thing to test for (if it&#x27;s even possible).<p>The reason is smart people can figure out git, or databases, or objective-c, or whatever, in a fairly short amount of time.<p>For example, my co-founder learned objective C off free online video tutorials and built an iOS app (talking an app with serious firepower and back-end transaction logic) from start to end by himself in less than 3 weeks.<p>That&#x27;s why we&#x27;re not as concerned about what you know right now as what it&#x27;s possible for you to learn in 3 more week.
conductrover 11 years ago
I can relate on the opposite. I am not great at those complex math problems. But, I have been coding for 15 years at &gt;20 hours a week average. Mostly web stuff. I&#x27;ve built dozens of full products, that we&#x27;re complex, and I generally feel like I could build anything I wanted. Every time I use a new site I can visualize how I would have built it, usually not a question of if I could; time permitting.<p>Yet, I have never had the balls to pursue it professionally. I build stuff and usually never launch it. I have learned several times over that marketing is not my strong suit.<p>That said, I&#x27;d actually like to work for a startup. Hit me up if anyone wants to talk.
rexreedover 11 years ago
If you&#x27;re running a startup, the most important thing to hire for is fit. Do they fit in your culture? Do they fit a need that will help you achieve your milestones? Do they fit in the overall growth trajectory of your company? Do they have competency in the specific area you are hiring for and&#x2F;or where your startup is building overall competency? Can they manage themselves and their time well?<p>The likelihood of failure of a startup approaches 100%, so you should optimize for likelihood of survival, not for IQ.<p>If you&#x27;re not a startup, then the top ranked comment applies. But it doesn&#x27;t really otherwise.
评论 #6585497 未加载
jaseyover 11 years ago
The interview is a 2 way street. While the company makes you jump through hoops to see if your good enough, you also have a opportunity to determine if you want to work for them.<p>I like to ask &quot;what will I be working on in the next 6 months&quot; that way you don&#x27;t rock up and than the second day they through you in the deep end of building a iPhone app.<p>Granted, startups only have a vague idea of what they will be programming with short periods but it helps.<p>Also ask &quot;what will be my performance indicators&quot;. If they don&#x27;t include &quot;being able to very quickly learn new technologies&quot; its hardly your fault.
Xyikover 11 years ago
In my experience, only the really big companies focus heavily on algorithms and math puzzles. That&#x27;s because they don&#x27;t really need to hire anymore people, they just want to steal &#x27;smart&#x27; people, and they don&#x27;t need to iterate as quicky. Start-ups and smaller companies have in my experience, typically asked full-stack type of questions that dive into things like networking protocols, databases, scalability, and so on. And I believe thats the way it should be. Start-ups that focus heavily on math puzzles and algorithms are doing it wrong.
Jugurthaover 11 years ago
The &quot;Kevin Bacon&quot; stuff was about degrees of separation (Does the expression &quot;Six degrees of separation&quot; ring a bell ?).<p>Not long ago, Facebook made that 4.74 degrees of separation on its networks. Meaning a maximum of only 4.74 persons are necessary to connect any two random persons on the network.<p><a href="https://www.facebook.com/notes/facebook-data-team/anatomy-of-facebook/10150388519243859" rel="nofollow">https:&#x2F;&#x2F;www.facebook.com&#x2F;notes&#x2F;facebook-data-team&#x2F;anatomy-of...</a><p>You can also find an article on Wikipedia about the &quot;Kevin Bacon&quot; reference.
fnbrover 11 years ago
I found that Facebook was really bad for this. I&#x27;m a math undergrad, and I applied for a bunch of data analysis positions with them.<p>I was asked, as part of my application, to take a programming quiz. The quiz consisted of a graph theory problem. I did pretty poorly on it, given that I have no real knowledge of graph theory.<p>Had they asked me a question about statistics (or something similarly related to data analysis), I think I would have actually been able to answer, or at least been at a point where my programming knowledge- not my math knowledge- was what was holding me back.
joeblauover 11 years ago
I would say that you should keep at it. There are strong parallels between math and programming, but interviewers should definitely be asking you to write pseudo-code on a whiteboard and do a paired programming session. That would probably be a good way to relieve the awkwardness later when they realize that your programming skills aren&#x27;t as strong as you&#x27;d like them to be. Definitely keep at it, soon you&#x27;ll be able to think of a Markov chain as a for loop multiplying two arrays and not only as a matrix multiplication.
anurajover 11 years ago
It is a good strategy, if the company is interviewing freshers as programming is teachable and the assumption is that new inductee will take few months to become productive. If you can&#x27;t wait, the best strategy is to give a live coding problem and test the person&#x27;s proficiency in the required language&#x2F;technology. I invariably do the latter as my requirements are always very specific. Most start ups I suppose, are themselves undecided on product&#x2F;market&#x2F;technology choice and thus the former strategy.
rehackover 11 years ago
This is a great post. And also from the other side of the fence. As typically we see, these kind of posts, from people who did not like Math puzzles, and as a result suffered in the interview rounds.<p>But this one talks about getting inadvertent benefit of being good in Maths to get selected for programming, and suffering the consequences later on.<p>Also, it highlights the importance of what is mostly taken for granted and thought of as mundane stuff, of programming - the idiosyncrasies, jargon, and best practices of various languages and OS environs.
etlerover 11 years ago
Some reasons why math puzzles might be popular:<p>* CS majors take math in college, but there&#x27;s lots of other stuff going on with their CS classes so it&#x27;s hard to remember math class. If you can actually remember anything from math class, you must be smart!<p>* Programmers like math, even though it&#x27;s not their job, so interviewing is the only opportunity to have fun with it!<p>* We had to deal with this crap when we were interviewing so now it&#x27;s time to make someone else suffer! &gt;:)
taudeover 11 years ago
While we&#x27;re at it, can we stop treating and thinking of web development (which seems to be a lot of dev positions these days) like it&#x27;s rocket science?
sudomalover 11 years ago
I am willing to bet that tests give an advantage to applicants with no commercial experience, as well as those that have no life outside of technology. If that&#x27;s what you want in employees then sure, it&#x27;s a good way to find them, otherwise just look at their code samples and give them a trial.<p>Programming isn&#x27;t difficult and you don&#x27;t need to know complex maths or be able to solve mind bending puzzles to be a great developer.
mindworkover 11 years ago
I am stopping to talk with people who ask for such a bs.<p>Check out the last technical interview task that I got ``` Objective: Write a program that prints out a multiplication table of the first 10 prime numbers. The program must run from the command line and print to screen one table.<p>Notes: - DO NOT use a library method for Prime (write your own) - Use Tests. TDD&#x2F;BDD - IMPRESS US. ```<p>I mean I can impress you but how will this correlate with production code?
VLMover 11 years ago
Something I&#x27;ve always wanted to ask, are contractors hired the same way? I&#x27;ve never contracted although my father did in his retirement years. I&#x27;m curious if modern contractors have to put up with this kind of behavior at interviews, or if its a more professional atmosphere oriented around the actual job requirements.
Killswitchover 11 years ago
I&#x27;m absolutely horrible at math... I think I graduated high school (my only schooling) with the equivalent of just above grade school in math... I can code no problem though. I&#x27;m very good at it. Anybody asks me math puzzles I say thanks for your time, but I am done with the interview.
yeukhonover 11 years ago
I just saw this on HN... <a href="http://www.datagenetics.com/blog/october12013/index.html" rel="nofollow">http:&#x2F;&#x2F;www.datagenetics.com&#x2F;blog&#x2F;october12013&#x2F;index.html</a><p>This is like solving your submarine problem. Jeese.
meshkoover 11 years ago
I don&#x27;t get it. He got hired? He learned how to do his stuff? If we require people to know how to work right out of college, no fresh grad would ever got a job.
enterxover 11 years ago
You speak wise, my friend.<p>Isn&#x27;t XY years of records in the same field of interest working for a successful companies a good sign that I can code?!<p>Ask me theory - pay me to code.
评论 #6585013 未加载
trendspotterover 11 years ago
tl;dr<p>Stop asking this fine young lady math puzzles to determine her programming abilities. She is good at solving your seemingly pointless math puzzle, because she was practicing problem-solving since she was ten. But she is not anywhere near as good at programming, yet - which caused her problems at the actual jobs she had to do after she was hired.
shurcooLover 11 years ago
Why not just look at the person&#x27;s recent commits?
评论 #6590184 未加载
shindevijaykrover 11 years ago
really true
dschiptsovover 11 years ago
So it boils down to &quot;show me your code&quot; and then &quot;please write a few test examples&quot;. To staff up a cheap coding sweatshop this method is good-enough.<p>In <i>most</i> cases an applicant must be able to read English (to google some code to copy-paste and occasionally search through documentation) and able to install and run Eclipse.<p>The real problem with hiring is that a HR middleman is ignorant and can&#x27;t tell a good code form a restaurant menu. So he must give a very few simple exercises from common text-books with known answers.<p>The even bigger problem is that almost no one needs <i>coders</i>, everyone wants <i>programmers</i> which is a complete different set of <i>analytical and engineering</i> skills.<p>Coding is just a process of translation of a ready-made by someone else, poorly understood (if at all) specifications into a spaghetti [Java] code by calling poorly understood methods of ready-made classes, coded by someone else.<p>Programming is a process of understanding and describing reality (in terms of design documents, protocol specifications, and then, least importantly, source code in a several languages).<p>The criteria of success for a coder, btw, is when it just compiles (unit-tests? what unit-tests?) by the industry-strength most advanced compiler of the most sophisticated industry standard static-typing language (static typing is a guarantee from stupid errors, everyone knows) which is even <i>verified</i> to run correctly on the most advanced VM which incorporates millions of man-hours of optimizations, unless.. Never mind.<p>Success of a programmer is when it, like nginx or Plan9 or OpenBSD, is good-enough.)
progxover 11 years ago
Because they don&#x27;t know you, you don&#x27;t have a well known name, they don&#x27;t know what you can and if it is true.<p>E.g. if somebody hire John Carmack (ID Software), nobody will let him do some math test or ask him trivial programming questions.<p>But you are not John Carmack ;-)<p>It is like in every other job: if you are not a rockstar you are nobody.
评论 #6585758 未加载
评论 #6585155 未加载
评论 #6584640 未加载