21 ms·
I cheated on my Microsoft interview (2019)
- Blackstrat 4y agoIt's cheating if and only if he couldn't perform after he was hired. If the interview was his "peak" contribution then yes, one could consider it cheating. However, as long as he performed competitively subsequently, it's just good luck and good preparation.
- 737min 4y agoMany interviewers would expect the author to own ip to having seen the exact question before. I certainly would prefer to work with people who would say so.
- fearface 4y agoThat’s not cheating, that’s not a problem at all. Neither ethical nor otherwise. You happened to know a working solution, this was by chance, but you also managed to sell it, explain it and it’s a solution you developped.
- ptero 4y agoAnd the fact that the poster did well on the full-day follow up at Redmond and was invited to join either of the teams he interviewed with means that he was certainly qualified to pass the on-campus interview.
- misslibby 4y agoThey could easily have asked him another question if they felt he was too quick with the solution for the first one. All good.
- yur3i__ 4y agoI wouldn't even call this cheating to be honest, people practice interview programming questions all the time, he just practiced the right one for the day.
- bloodyplonker22 4y agoHe cheated more on writing a clickbait title than actually "cheating" on the interview. This is the same thing as when a kid in class thought studying was a way to cheat.
- benjaminwootton 4y agoThis guy is one of those LinkedIn thought leader types prone to oversharing for attention.
- rsweeney21 4y agolol thanks! I actually hate the attention, in part because of comments like this one. Though this one was comparatively mild. I do it to generate sales leads for my startup. We're bootstrapped so being able to generate leads without any ad spend or outbound sales means we don't have to raise money to grow. I used to write blog posts but they take so much longer. Hence no new posts on the blog since 2019. Now I focus on LinkedIn. A single viral post on LinkedIn can get 2M-5M views on average. It will generate $1M-$2M in potential business for us. This way I can spend 50% of my time writing code, 45% doing CEO stuff, and 5% doing marketing.
- ignoramous 4y agoThat's harsh because TFA does mention that they feel outright uncomfortable (even after 18 years!) how big a role luck played in them clearing that fizzbuzz interview question: > I've struggled with this a lot over the years, but I finally decided to share my story. I don’t think I would have made it past the first round of interviews at Microsoft if I hadn’t gotten so lucky. So pretty much, my entire career is built on one amazing stroke of luck. ...which explains why they felt like they "cheated".
- buran77 4y agoOut of pretty much all the people I know, I can't think of any successful career not pivoting on one such fateful moment of "luck". One lucky question/answer, one fortunate encounter, one near miss. Of course we'll never know how the road not taken looks like. Any moment could actually be a pivotal one but most are very unassuming and only the memorable ones stick with us, making them feel more important. Also, as someone who's been tested with this kind of questions (in the math and physics fields at least), I realized many times you aren't evaluated for knowing the answer but for how you go about trying to find it even if you fail. This particular question is close to my heart as I was tested with it as a pupil in school. The teacher wrote this on the blackboard and asked me to come over and solve it (not having any prior knowledge). After a bit of fidgeting with the chalk I stared writing on consecutive lines 1, 1+1, 1+1+1 and after a few lines it dawned on me it looks like the "lower" half of a square of side n as cut by its diagonal. So I proudly concluded that the sum is n^2/2. Which was of course wrong, I forgot to add an n/2 to that since the "diagonal" is shifted right a bit. Still got top mark and maybe it was one of those moments that set me on a path. This went on through high-school, university, post graduate studies, and early career. It was only when I was knee-deep in real work that people started to care less about how I think and more about just the end result. Preparing for this kind of question isn't cheating as long as you understood the answer.
- kappuchino 4y agoI remember this formula was part of a book called "Formelsammlung" (german for equation-collection) that we were allowed to take to math exams in university in cs. This is a simple know or don't than you have to deduct issue.
- nine_zeros 4y agoThis is not cheating. Tech companies are literally looking for candidates who have seen the problem before. If they were truly testing for engineering skills, the interview would mirror real day to day world more.
- rurban 4y agoIf this would have been true, he would have asked about Gauss (it's one of the most famous math tricks in highschool afterall). he didn't ask, op didn't know either. so I would have suspected cheating. op's answer is constant n, but could have been improved to n/2 on average with a hash table. (but some constant overhead). so it really depends on the size of n.
- jaclaz 4y agoIt seems that knowing the famous anecdote about Gauss: https://www.americanscientist.org/article/gausss-day-of-reckoning https://www.americanscientist.org/article/gausss-day-of-reck... http://bit-player.org/wp-content/extras/gaussfiles/gauss-snippets.html http://bit-player.org/wp-content/extras/gaussfiles/gauss-sni... would have helped as well.
- Mountain_Skies 4y agoI told that story to my friend's daughter a couple of years ago. Next time I visited she was excited to tell me how she used it to win a sheet of stickers by betting one of her classmates she could add up the numbers faster than they could with a calculator. It was clever of her to add the calculator handicap into the mix. Makes me wonder if there are math hustlers outside of casinos.
- danuker 4y agoI think it's fair game. You called ahead of the job fair, which allowed you to prepare. They were also lazy with their recruiting questions. If they wanted to select on skills instead of knowledge of interview question gimmicks, they would have asked for a link to your profile showing off your work, and look at it after the fair.
- can16358p 4y agoThis isn't cheating. This is utilizing your network and preparing for potential questions. If Microsoft is risking to ask the exact same question to someone, it's their problem.
- zikero 4y agoArrest this man! How dare you practice for an interview? /s Granted some people practice 100+ questions, you practiced only 1, and it was the right one. Same same. Lucky indeed, but I wouldn't attribute your success to luck. You were clearly a good enough engineer to receive 2 offers, and good enough to build a career there. We all have multiple encounters with low-probability scenarios in life. If you have a 10% chance of succeeding at something, and you have 50 attempts, and you only need one success, then your actual chance of succeeding is 99.5% rather than 10% - almost inevitable.
- sackerhews 4y agoThis article sums up the value of combined networking, talent, opportunity and creative thinking.
- napo 4y agoI'm surprised that atm there is a consensus in the comments saying that it's not cheating. Companies ask interviewers to not reveal the questions they had to other candidates. It's likely that his friend was told not to say that. Overall he clearly had an unfair advantage, and even if legally it wouldn't be the definition of "cheating" it would go against the intent of the interview: which is to evaluate candidates in front of a new problem. Kudos to the author for being honest about all this. I think it's a real issue and that we should find more solutions to prevent this than candidates signing an NDA. Imho when doing such interview, questions should not rely on a "trick" and even if they do, candidates should be evaluated on everything else: how they explain the code, how they react to feedbacks, how easily they transcribe what they explain to code. It's not perfect but it helps.
- napo 4y agoA good example to make this question more fair, as an interviewer, would be to rapidly give the (n-1)*n/2 trick quickly if the candidate doesn't know it. And not care too much if they do know it.
- tester756 4y agoI'm shocked too. Comapre it with people who applied too, but didn't have that "internal" knowledge Is it fair from that "not well networked" person perspective? It's not even like he found this question randomly on the internet, he got it from MSFT employee, lol. I have really mixed feelings about this Edit. Don't get me wrong, apparently author was(and is) capable of doing his job, so it isn't a big problem, but what if author wasn't capable of doing the job and passed just due to the advantage? I know person who told beginner programmer what X company asks on interviews and that guy actually managed to pass that interview due to the knowledge but was fired like 3 months later due to lack of skills
- AmericanChopper 4y ago> Is it fair from that "not well networked" person perspective? Fairness becomes a bit of a contrived concept once you start to factor in higher order effects. Then it just turns into fair if it advantages me, and unfair if it doesn’t. I helped a friend get a job once because I knew who was going to interview him, and I knew he had a blog where he published all his thought-leader technical opinions. Is that fair or unfair? Probably neither. It’s more of a random coincidence that my friend benefitted from this. But is it fair that I have learned more about my local industry by going to industry events and listening to people present things, and talking to people, etc? That probably is fair, and that’s how I learned the tip I gave to my friend. Fairness isn’t really relevant to the problem here. If you believe that there is a problem at all, then the problem is that the screening process can be influenced by random coincidence.
- Znafon 4y agoI would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer. This interview question has everything bad imo: no practical uses, test knowledge of math formulas (which every math/CS major would have but none of the self learning folks). It’s very easy to stress and fail when given such a test, and even already knowing I would have tried something else because of the overflow.
- bawolff 4y ago> test knowledge of math formulas (which every math/CS major would have but none of the self learning folks) I mean they might. Its a very famous formula, with a famous story attached, which is often covered in high school level math. Regardless its a stupid question.
- Sesse__ 4y ago> I would not have though to use this formula. The sum of the integers grows as the square of n so if n is anything but small you will overflow and get an erroneous answer. As long as you can get wraparound semantics, the overflow is actually unproblematic. (n(n+1)/2 + k) mod 2^32 - (n(n+1)/2 mod 2^32) = k mod 2^32 = k.
- Znafon 4y agoIndeed, somehow this went completely over my head.
- jwilk 4y agoEven with wraparound semantics, you can't compute n(n+1)/2 naively, because (n(n+1) mod N) / 2 ≠ n(n+1)/2 mod N. So actually not knowing the formula is kinda advantageous, because computing the sum as 1 + 2 + … + n (with every addition mod N) gives you the right answer (mod N).
- ppsreejith 4y agoYou could delay division by 2 until the end. I.e ((2 * S mod N - n*(n+1) mod N) mod N) / 2 Where S is the sum of the array achieved through iterative addition with every addition mod N and N > 2n.
- gundamdoubleO 4y agoGot a chuckle out of the author thinking this was some kind of cardinal sin. The only person "at fault" here is his friend for telling him what interview question he received and I'd expect companies know this happens, which is one of the benefits of having further interview stages in the first place.
- hamburglar 4y agoI would say the only person “at fault” is the interviewer for using such an awful question. This is precisely the kind of question that gives programming puzzle interviews a bad name. If you’ve heard it before, it’s trivial and proves nothing. If you haven’t, you have to have a clever a-ha moment in order to do anything but brute-force it. “Have you heard this one story about Karl Gauss as a child” is a really terrible hiring criterion.
- Ekaros 4y agoI wonder what sort of response interviewer would give if asked. So how is this solution used in your company?
- Kim_Bruning 4y agoSo,based on reading the article; you'll see that to arrive at the solution the writer: * Communicated with a colleague (communications/interpersonal networking) * Thought hard about it (applying previous knowledge and experience) * Looked up and found relevant information (knowing where to look) * Combined the above to come to a solution. (and had the skill to put it together) By coincidence the practice practice question was also the one that was asked at the interview. If the interviewers had asked a different question, similar steps would have needed to be applied[1]. The question itself was an obvious practice question. There are many decent answers to the problem. What they were looking for were the knowledge, skills and experience that needed to be applied in the process of solving the problem. The point was to see if the candidate had those abilities. I'm fine with using a practice question for this. A real world problem often involves a lot of real world noise, which makes it impossible to efficiently resolve within the constraints of a 60 minute chat. I am -however- fully open to an argument that perhaps some form of Goodhart's Law ("When a measure becomes a target, it ceases to be a good measure") may have struck again. [1] Perhaps not the exact same set of skills, given the constraints of the interview setting. One COULD argue that the interviewers accidentally picked up on more than they were looking for.
- makach 4y agoPreparing is not cheating. You learned and used your knowledge in an appropriate setting. That is the skill set companies are looking for, also the colleague I would like to work with
- Simon_O_Rourke 4y agoThat's neither cheating, nor pure luck, but good preparation. I've gone through lots of questions asked in interviews and if I got one of them for real I'd answer it immediately without an ethical soul searching
- a_chris 4y agoImagine to solve an algorithmic problem to work in the UX team. I'm always more convinced that this type of interview process is a joke
- yarg 4y ago/* Not sure if this is correct, but there should be a solution along these lines will explode if the array contains values outside of 1...n also, invalidates the array */ int v = values[0]; for(;;){ if(v == values[v])return v; int t = v; v = values[v]; values[v] = t; }
- ldx1024 4y agoTry {2,2,1}
- yarg 4y agoYeah, at some point I'm going to need to accept that I'm too burnt out to code anymore.
- ldx1024 4y agoSoftware is hard, that's why we make the big bucks :)
- yarg 4y agoI never did; though even my employers acknowledged that I was undervalued - albeit as I walked out the door. I wasn't joking though - I haven't been able to work for years and have no real hope of piecing myself back together. (Mushrooms help, though they're seasonal - and there's no damned way the government's ever going to legalise them.)
- yarg 4y ago/* I used to be able to do this without a compiler */ for(;;){ int i = values[0]; if(i == values[i])return i; values[i] ^= values[0]; values[0] ^= values[i]; values[i] ^= values[0]; } /* full test code, does java really not have Arrays.shuffle? */ public static void main(String...args){ final int result; Integer[] values = new Integer[12]; for(int i = 1; i < values.length; i++){ values[i] = i; } final int dupe = values[0] = 1 + new Random().nextInt(values.length - 1); final var list = Arrays.asList(values); Collections.shuffle(list); System.err.println(list); for(;;){ int i = values[0]; if(i == values[i]){ result = i; break; } values[i] ^= values[0]; values[0] ^= values[i]; values[i] ^= values[0]; } System.err.println(dupe + " " + result); }
- s0teri0s 4y agoHoly crap, I wouldn't have thought twice about being lucky enough to roll out a solution I'd happened to have been thinking about for days. I am not seeing an ethics problem here, the guy was just very lucky to get a problem he was intimately familiar with.
- williamkuszmaul 4y agoUnless I'm misreading, the question as stated in the blog post never says there is only one duplicate (there might be many!), so in that sense I think his answer may be wrong. A more robust solution is just to have an array of n counters and just count how many times each item appears.
- philiiiiiipp 4y ago> when given an array of length n + 1 containing integers 1 through n, find the duplicate integer in an array. I do believe it is only one.
- jhot 4y agoThe length is n+1 and contains all ints 1 through n, so there can only be a single duplicate.
- williamkuszmaul 4y agoBut does the question ever say "all"...?
- lynguist 4y agoWhy are all the other comments so negative and stuck up whether it constituted “cheating” or not? That wasn’t the point of this story. It was a beautifully well written account on luck and how sometimes the things align. The interviewee at the time was receptive towards the kind of questions that are asked at Microsoft and got the right one. Good luck. And then he passed a 6 hr on-site interview as well! No luck at all! The story resonated with me.
- whiplash451 4y agoFully agree. Add to that that the question was super standard, it was quite likely that the candidate would have heard about it one way or another before the interview.
- isaacremuant 4y agoThe author prepared with the info he had and was "lucky" that he got a question he knew and had situational awareness to sell it. It's all positive traits in my book. The discussion about the ways to interview to smooth this out is great but I don't think he should self flagellate or consider that his entire career was predated on this. If you have the right attitude, prepare and work for it, you find any number of paths to get to the next level. It's unfortunate that interviews sometimes feel so badly fit to achieve the goal and we should actively challenge whatever practice we have an iterate to make things better for everyone.
- sverhagen 4y agoIt made me think of how courses take test questions straight from the class materials. And let's say I'm a big procrastinator, and I run out of time, studying the night before the test, and I decide only to go through the odd pages of my materials, and also let's imagine that the test writer, just by accident, took most (or at least, enough) questions from those odd pages, did I now cheat? (I think not...)
- pbhjpbhj 4y agoYou cheated yourself out of knowledge acquisition by treating a course of education as only a means to get a certificate. That's cheating. You're supposed to study the whole course, the examination is a statistical test to see if it's likely that you studied, and can apply, the whole course. If you didn't study the course, you're misrepresenting yourself by during the exam. That's cheating (in a different way to the first one). Examinations are imperfect, they usually can't cover an entire course without being too onerous. In this circumstance you cheated, but did not break the rules for taking the exam. You will be less competent on the course material than is intended for those who pass.
- nbevans 4y agoRecruitment agents are always pumping failed interviewees for the questions they were asked. They then make sure their next candidates are better prepared with this knowledge. This guy really shouldn't feel so bad. It's Microsoft's fault for not rotating the questions better. That, or they did rotate the questions, and it really was absolute pot luck.
- ajuc 4y agoI've had similar experience - in an interview for my current job I got asked same question that I've already encountered in a previous job interview. It must be pretty popular in the area :) It wasn't hard, and I solved it first time without help so it didn't feel like cheating, but I told the guy afterwards anyway. I did tech interviews from the other side before and from my experience having the perfect answer doesn't matter that much - what matters is showing how you solve problems and that you're familiar with common solutions and trade-offs.
- leipert 4y agoWhen I interviewed at my current company, I was pretty stressed about the interview and watched some Numberphile videos the night before to take my mind off things. Weirdly enough one of the problems discussed in the interview was about the Josephus problem which has a neat solution in binary [0]. I don’t recall if I ever asked the interviewer whether they also watched the video recently or how they came to think of it. [0]: https://youtu.be/uCsD3ZGzMgE https://youtu.be/uCsD3ZGzMgE
- misslibby 4y agoVery cool video, thanks for the link!
- whiplash451 4y agoThis is what happens when companies use riddles that have nothing to do with the job you’ll do and do not remotely relate to the skills that will be required on the ground.
- paulsutter 4y agoWho wouldn’t just sort the array and check it? His solution is very brittle: it fails in so many ways if the data had unexpected properties. Real world requirements usually contain inaccurate assumptions. He spent days to find a terrible answer, when the obvious solution is much better
- whiplash451 4y agoMaybe those who care about computational complexity for instance?
- paulsutter 4y agoEven if you had terabytes of data sorting is still the easiest answer. Especially if you had terabytes of data in fact. Brittle solutions suck Start with what works and then optimize Sophomoric is exactly the word here, and it’s no surprise that the story is about Microsoft
- whiplash451 4y agoAm I missing something or sorting is n.log(n) when the sum trick is linear time? In the lack of additional constraint, sorting seems massively overkill. Not sure why you are saying that sorting is simpler than the sum trick.
- paulsutter 4y agoThe author spent days thinking about it, whereas sorting is the immediate obvious answer. Developer time is massively more valuable than computer time by a factor of 1000 And the clever approach only works on data that is perfect, and that’s extremely rare in the real world This is a hypersophomoric question
- qcoh 4y agoHow is it brittle? It solves the problem at hand, which is unambiguous (I think).
- keraf 4y agoI actually cheated on an online assessment for one of my first programming jobs. It was my dream job and really wanted to get into that company. Under the pressure, I just couldn't figure out the solution to the last challenge which was a recursive algorithm. Normally, I would be able to do this but I just got stuck and in a moment of panic, I StackOverflow'd the question on a secondary device which provided me the exact answer. I typed it in with my own style and submitted the assessment. I got the job, stayed at the company for 4 years with great performance reviews and it shaped my experience as the programmer I am today. I couldn't imagine where I would be without the experience I gained there.
- mirekrusin 4y agoIf you were allowed to use stackoverflow at work for those 4 years, I'd say it was all fair.
- s0teri0s 4y agoOn a secondary device.
- BrianOnHN 4y agoPeople who get "recommendations" don't feel guilty at all for their unfair advantage. So please, more of this! Let the kids know that we don't live in a meritocracy! Otherwise, the good ones will become discouraged and we will all lose.
- jimmaswell 4y ago> we don't live in a meritocracy Nothing is perfect, but we do live in an approximation of a meritocracy, especially in tech. I had no special connections anywhere going into or coming out of college and ended up at my first company "the hard way". Any good references I made were only made through delivering results, I didn't know any interview questions in advance, and my college had no "prestige", certainly no Microsoft interviewers flying out to it - closest would be some waste of time joke of an "opportunity" I showed up to where IBM showed up to talk about their mainframes and AI stuff but offering absolutely no internship or job positions for software engineers. Coming from the tech desert of upstate New York, I actually had a lot of disadvantages working against me, working up from some low end job I only got half a year after graduating at a consultancy company to where I am now years later at a good remote programming position.
- kkdaemas 4y agoThe question is very unrealistic... how often do you know there is exactly one duplicate in a list? Much more common is there are zero or more duplicates. Here is what I came up with: - We need a way to record what has been already seen - A hash-map could work, but I think we can be more efficient - We know that all elements are less than the array length in size... - So we can allocate a single array of flags with the same length as the input - The flag for value `n` is at position `n` in this array let findDuplicates xs = let seen = Array.create (Seq.length xs) false let mutable duplicates = [] for x in xs do if seen[x] then duplicates <- x :: duplicates else seen[x] <- true duplicates I'm pretty sure this is O(n)? I think it's interesting that the mathematical trick (sum of numbers 1 to n formula) does not work in the more realistic variant. This fact is probably why leet-code problems are so disconnected from the real world. It's like AI for board-games.
- oriolid 4y agoThe question isn't really about finding duplicates in a list, but a slightly backhanded way to ask "do you remember high school math and can you apply it". A less artificial problem would just make things more complicated. Also, your way is O(n) memory when O(1) would be enough for the original question.
- masto 4y agoAlways start a programming interview by asking questions. You know there is exactly one duplicate in the list because you wouldn’t start coding without thinking about what the problem left unspecified and getting the interviewer to clarify.
- TheOtherHobbes 4y agoWhen I did my geography exam at 16 I'd given up with normal revision, so I spent the morning reading about one particular extremely obscure topic - something like the natural resources of Nigeria - because it was on the back of the weekly installment encyclopedia my parents were buying for me. It hadn't been mentioned in class. It hadn't even been mentioned as a possibility. But it came up anyway. I wrote a nice little mini-essay on it, and I aced the exam. I suspect that happens a lot in exams and job interviews. You get $random_question and it's supposed to be a test of broad knowledge, because clearly if you know the domain you'll know $random_answer. But it doesn't exclude people who are lucky. (Or possibly mildly precognitive.)
- zeroonetwothree 4y agoThere is a whole book with this as the premise: https://en.m.wikipedia.org/wiki/Q_%26_A_(novel) https://en.m.wikipedia.org/wiki/Q_%26_A_(novel)
- ChrisMarshallNY 4y agoI wouldn't consider it cheating. It was either a stroke of luck, or MS wasn't really doing an especially good job of reviewing their tech questions. A big part of programming (in my book) is finding the way that works; using whatever path is required. If you peek through a hole in the curtain to do so, then that's fine. Knowing about the curtain, and the hole in it, is part of engineering. I remember taking a photography class, where the teacher said "The first rule of photography is to cheat." He was talking about doing something like walking into a brownfield lot in The Bronx, and taking a picture at an angle, so it looks like a remote wilderness, but I understood perfectly. I regularly look up the most basic algorithms with Google, and StackOverflow is an integral part of my workflow. I've been shipping software since 1986. I'm thrilled to have all this information at my fingertips. Of course, I need to do due diligence, and make sure I understand whatever code I crib (I also usually rewrite it, so it fits my style). If you want to consider that "cheating," then knock yourself out. Whatever creams your Twinkie. I don't care, and I'll keep doing it.
- pc86 4y agoI don't think you can consider two people, at least a year apart from each other, being asked the same question "not doing an especially good job of reviewing their tech question."
- giaour 4y agoI was also asked that question during my Microsoft phone screen in 2021. I think there's a fairly shallow question bank
- cmos 4y agoI have found there are people who enjoy getting into the weeds of problem solving (possibly a minority) and other people who work really well with the weed divers in applying their results. I am a person who has benefited from this symbiotic relationship in school and in my profession, from the helpful study partner to the helpful stackoverflow answer. All of them have enabled me to build things bigger than I would be capable of doing alone, and they have seen their efforts as a crucial building block. Figure out what you enjoy and find people/tools/forums who compliment you.
- ajaimk 4y agoPretty sure this is not cheating. Pretty sure this is considered “experience”.
- Longlius 4y agoEvery time the topic of cheating comes up on HN, I become increasingly disheartened by the amount of people chiming in who think it's not only alright to cheat but also laudable to do so. Ethics are foundational to engineering. Jettisoning them is a sign of a discipline in decline.
- echelon 4y agoIs it cheating if the person asks his recently hired friend what the interviews were like and he just happens to get the same question? This is a case of random chance and Microsoft not having a wide enough of an interviewer pool. It didn't seem willful, malicious, or pre-planned on the part of the candidate. How would you respond in the moment? They admitted they were shocked to see the question. They were probably expending so much mental effort to maintain composure that the thought never crossed their mind on how to appropriately handle the scenario. High stakes and nerves. That's not at all what they prepared for.
- ethanwillis 4y agoI can almost guarantee you the "friend" was not supposed to disclose what the problem was that was asked of him. It's not a problem of the pool. It's a problem of the ethics of both his friend, and him.
- zwkrt 4y agoI desperately wish there were some kind of equivalent to the Bar Association for software. A higher power that can punish blatant ethical violations in the face of the relentless greed of an engineer's boss, company, or industry. I think of the Volkswagen emissions snafu and how that might have been handled differently if the engineers had something with teeth to use to push back against unethical and illegal practices. On the other hand, I feel that it would be a moot point. 'Ethics violations' require a code of ethics and an intent to violate them. I was recently at a meeting where an engineer was describing how they used an A/B test to prove that creating an extra modal dialogue in the account deletion process reduced the number of people who deleted their account. They described the entire process as being good for the user, who might be 'confused' about 'accidentally' deleting their account and how they would be more 'empowered' to 'remain loyal'. I realized I was listening to someone describe a dark pattern, but this person was convinced that dark was light.
- eismcc 4y agoCache hits aren’t cheating. He filled his cache with research and got lucky.
- lisper 4y agoLuck has played an outsized role in my life. Two notable examples: 1. In 1992 I learned that a colleague of mine was a member of the Magic Castle [1] and offered me a guest pass. I had a long-standing love of magic, and the chance to go to the Castle seemed like a once-in-a-lifetime opportunity. I invited some friends to go with me, and one of those friends asked if she could bring a friend, and of course I said yes. Fast-forward 30 years and that friend-of-a-friend and I just celebrated our 25th wedding anniversary. [1] https://en.wikipedia.org/wiki/Magic_Castle https://en.wikipedia.org/wiki/Magic_Castle 2. In early 2000, at the height of the dotcom boom, I sent a resume to an obscure little startup with about 50 employees. They made me an offer, but I turned them down because I decided that it was not worth giving up my secure position at NASA to go chasing a pipe dream. But they wouldn't take no for an answer. They offered me all kinds of additional perks (back then anyone with a CS degree and a pulse could pretty much write their own ticket) and so I decided to go. Four years later that company had an IPO. Their stock symbol was GOOG. [UPDATE] Two more examples that I just thought of, with a somewhat different dynamic: 3. When I was in high school I attended a football game. I drove myself in my parents' car. At the game, I met my best friend at the time (who has since died from complications resulting from malaria, but that's another story) who had arrived on a motorcycle. After the game we decided to go meet somewhere (I don't recall exactly where). I followed him. At one point he was stopped at a stop sign. I expected him to pull away from the intersection fairly quickly and I didn't want to lose him, so I stepped on the gas. By the time I realized that he wasn't pulling away as I expected it was almost too late to stop. I screeched to a halt (this was before ABS brakes) with my front bumper about a foot away from his rear wheel. If I had reacted even a second later I almost certainly would have hit him, and quite possibly killed him. 4. After college some friends and I went on a tour of Europe. We rented a car in England and picked up two girls so there were five of us in the car along with our backpacks. One of my friends was driving, and I was in the passenger seat. We were going at speed down a non-divided highway when I saw my friend turn his head to say something to one of the girls in the back seat. The car started drifting into oncoming traffic, which in England of course is on the right. We were heading straight for a semi-truck. In a split my brain decided that telling him to look out might be a bad idea because, as an American driver, his reflex reaction would be to turn the wheel to the right instead of left. So I grabbed the wheel myself and turned to the left. My friend of course did not know realize right away why I had done this. He thought I had just gone rogue, looked at me instead of out the window, and gave my hand a karate chop to get me to let go of the wheel. He never saw the truck. To this day I'm not sure I did the right thing. But we didn't hit the truck.
- Tade0 4y agoI was at the other end of such an interview once. Our candidate found us via a college campus job fair and was given a Codility test for screening. He didn't do particularly well, but got through and, unfortunately, was given another Codility test by mistake. I suppose he got upset at that point and just copied the solutions from a friend, who was also applying(we only had four sets of questions). That score was of course considerably higher, even though he made the exact same mistakes his friend did. We found out what was going on and had reservations whether to continue with the process, but he was invited to the second round and aced it. I think he spent around a year with us and left for a much better paid position. Overall that Codility test was wholly unnecessary (both the first and the second) and got me thinking how many talented people never made it to the second round because of it. EDIT: I checked that candidate's current LinkedIn profile and at the moment he's a Tech Lead at globally recognized big data analytics company.
- chris11 4y ago> We found out what was going on and had reservations whether to continue with the process, but he was invited to the second round and aced it. Did you ask the candidate about the copied code? To me that's an honesty issue.
- EdwardDiego 4y agoI recently got interviewed by MS, I met 3 individuals on the team hiring, they discussed what I'd done previously, and what they were doing now. The first interviewer was focused on culture and values. The second interviewer asked me to describe how I'd approach pathfinding a simple 2D maze, and explicitly told me that they weren't worried about "best" algorithms like A*, but were more interested in how I'd model the problem in the first place, and seemed happy when I suggested building a graph as a better way to reason about it, and write readable code than just index twiddling a 2D array. They then asked me to code review a pre-existing index twiddling solution, they liked my suggestions, and I even picked up an error (that didn't seem deliberate) that one of my suggestions would've prevented. The last interviewer was more interested in architecture, and their only technical question was "name a design pattern you've used and why you used it". Then they asked me to submit a GitHub repo that translated Roman numerals into Arabic numerals in Go, with a specific requirement to "obey Postel's law". At the same time, a small medtech firm looking to recruit me for a data engineering role had me meet two engineers for an hour, then complete an online coding test on one of those annoying online editors, where the goal was to calculate waiting times in TypeScript from ISO-8601 formatted strings. Then I met more of their engineers, got asked trivia like "What's the difference between ETL and ELT?" and then did some live coding on that same annoying online editor to implement the "maximum sub-array" problem before discussing Big-O... I felt like they'd taken algorithmic questions you'd use for a recent CS grad and applied it to a senior data engineering role where if I'm ever needing to calculate the maximum sub-array in TS, you're doing very many bad things. So all in all, MS's interview technique felt far more relevant and useful.
- joeman1000 4y agoOk, so how are interviews fair at all then? How do they really tell anything about the person, other than the fact they are good at interviews? How is it fair that all the other people queued up to interview didn’t get a shot because they didn’t do as well in a 5 minute high pressure period? This 5 minutes probably determined the courses of their lives. What the fuck? Does anyone feel as flabbergasted about interviews and tests? I just cannot do them, I need time and space to think.
- BlargMcLarg 4y ago> Does anyone feel as flabbergasted about interviews and tests? Yes. You're at worst the average, at best part of the majority. Almost everyone sucks at interviews and most job hiring processes are incredibly degrading. Feedback is terrible (includes no feedback). Hiring managers are all looking for different things, either subtly or wildly. Onus to get good at interviews is entirely on the individual, not on the company to make the process less of a hellscape. Hiring managers are largely biased, untrained, as are most interview processes. Many aspects of interview processes aren't even grounded in reality. But almost nobody is talking about this as it's just something you "get done" and "bite through" once every N years. Plenty of perfectly capable people fall to the wayside and are told they are the problem. Or worse, you get a bunch of (LinkedIn) thought leaders trying to gaslight everyone into thinking corporate holds the truth and the remainder of us are peasants who simply don't understand.
- anothernewdude 4y agoDevil's Advocate: It's never been as easy to interview with multiple companies as it is now. It's a numbers game, and I would (and have) had interviews purely for practice, or our of curiosity about some companies tech stack. If you make it all about the numbers, suddenly you feel less bad about blowing an interview, or filtering bad ones out early in the process. > not on the company to make the process less of a hellscape. I mean, they do suffer in the long term. Companies after all, are the products of their hiring processes.
- AshamedCaptain 4y agoI also need "time and space to think" (and so would most people), but given the choice between someone who needs time and space to think, and someone who doesn't (either works well under extreme pressure or is just that self-confident), who would you choose? Sure interviews are unfair (there are many problems like the one described in TFA, as well as people who just practice the skill), but are there better options?
- playbooks 4y agoThe arms race of coding interviews legitimately keeps some of the best most experienced candidates out of the candidate pool, replacing them with newbies who have time to make cheat sheets with every new type of leer code question, and maybe that’s the goal. When question lookup, exchange, cheating etc happens, it makes interviewers pick and design increasingly harder questions over time. That makes it impossible to pass interviews without months of prep memorizing/practicing the majority of latest questions, or cheating. What you lose are ethical candidates, or those with better things to do on their hands. That may be a feature and not a bug - you are left with those who will do the grind and do whatever it takes, until burning out in their own turn. After all the most intense hiring competition happens right out of college - capturing the developers with little experience, a lot of energy, and complete nativité on burnout. The companies that cause the most burnout, are the most intense competitors in that space too.
- rhexs 4y agoThat’s exactly the point of the interviews. Companies are looking for some combination of dedicated enough to grind endless problems, moderately high IQ, not “old”, willing to sacrifice for the company, etc. On top of this, managers are often looking for cultural similarity, same educational backgrounds, and more. If you want a company to have to take on and train engineers, well, that ship sailed in the 90s.
- ai_ja_nai 4y agoWhat if Microsoft just asks the same questions to all pre-screening interviews? :D
- imgabe 4y agoHow is that cheating? It’s certainly fortunate, but learning things that might be asked in the interview hardly seems like cheating.
- DeathArrow 4y agoWhat I take from this is that luck takes a big part of happy stories in life. Nobody is infinitely lucky and nobody is infinitely unlucky. To be successful means most of the time to be prepared when the luck comes and be ready to take advantage of the opportunity.
- nahshon 4y agoOne of my friends cousin immigrated to Canada recently from India. They both are shady and like to use shortcuts to reach success. Few years back, she rang me up at 12am in the night. She sent me a link asking me to solve a coding assessment for her. I was naive and idiot. I spent 2 hours on the test and submitted it. After that, both of them did not contact me for year. A year later, I came to know from him that her cousin passed that coding assessment and secured a full-time job with top 10 tech company for $140k/yr. She bought a house in one of the most prestigious community in Canada after probation. On the other hand, I never got a job higher than $50k/yr. I continue to rent and survive. Both of them came as immigrant few years after me and own houses. I cannot. I blocked both of them. I regret participating in that assessment everyday. It was against my morals and principles. Never make friends in Canada. They use and through you like a condom.
- momirlan 4y agoyou should not blame them for your situation. just be smarter and find a better paying job. i also found that it's not so important how much you make, but how wise you spend. but 50k in IT, that is ridiculous, even for a first job. you're definitely not trying hard enough.
- 908B64B197 4y ago> Few years back, she rang me up at 12am in the night. She sent me a link asking me to solve a coding assessment for her. > A year later, I came to know from him that her cousin passed that coding assessment and secured a full-time job with top 10 tech company for $140k/yr. She bought a house in one of the most prestigious community in Canada after probation. It seems everyone not qualified enough to pass an RFE ends up north. This isn't the first time I hear that story.
- lrvick 4y agoOne time a company I interviewed with asked me obscure algorithm questions about playing card shuffling. As a former professional magician I knew the optimal answers instantly and could jot them down straight away. They had allocated an hour for answers I wrote in a few minutes. I could have told them I had a massively unfair advantage, but I did not bother. They were visibly impressed and told me I was moving on to the final interview stage right away. I declined, as I hate companies that select for algorithm puzzle skill instead of real world problem solving experience.
- nerdponx 4y agoHopefully you told them why you declined, otherwise they will just keep asking those questions of other people.
- klyrs 4y agoIf companies told candidates why their applications were denied, sure, I'd be inclined to share my side. They don't, so fuck 'em. Play stupid games, win stupid prizes.
- nerdponx 4y agoIt's not for the sake of the company, it's for the sake of the other candidates.
- persona_reuse 4y agoPrevious company, I was a principal IC and I used to interview people. I was warned by HR never to discuss how the interview went or why the candidate bombed. Their notion was: 1) We're there to find candidates, not improve people. 2) Time spent on someone you've eliminated is a loss. Cut your losses. 3) Think like you're talking to the police. Are you 100% sure you're not going to say anything that could be even remotely construed as illegally discriminatory? 4) Most states are 1-party-consent for recording, and even if it's an inadmissible recording, them having an interaction recorded can come back to bite you if they use it to jog their memory to perfection. I think it's gross, but it's a litigious race to the bottom so I kind-of see their point. Really happy not to be an interviewer anymore.
- abvdasker 4y agoThe unfairness doesn't derive so much from the act of cheating. It's more that he got the answer ahead of time because of his connection to someone at the company. When people talk about certain inequities in tech demographics I think it's not unreasonable to point to situations like this as part of the problem.
- rguillebert 4y agoAside from whether this is "cheating", this shows how having connections can give you an advantage in your career.
- manuelabeledo 4y agoI don’t agree that this would be considered “cheating”. I think though that this is another reason why interviews with coding assessments are quite useless.
- stevenjgarner 4y agoIMHO, this was not cheating. This is a phenomenon called success. If you are fortunate (?) to be around in the entrepreneurial world long enough, you will realize that intelligence, hard work, good time management etc are not adequate. They just qualify as deserving. There are serendipities that separate those who succeed from everybody else who was deserving. Survivor bias [1]. Calling Eli was your serendipity. The opposite is also true: killer asteroids hit the planets of otherwise deserving individuals and initiatives. I was co-founder of a municipal fiber-to-the-home initiative in 1996. We had both a winning technical recipe and also a financial engineering recipe. (Extremely rare even today) We were then fortunate enough to acquire a customer that was a newly minted public company, representing a whopping 65% of our business. Banker's dream, but in actuality a big mistake. Then the double-whammy of fraud by that public company (wiping it out completely before our contract was realized) AND the dot-com crash. Killer asteroids are real. [1] https://www.youtube.com/watch?v=_Qd3erAPI9w https://www.youtube.com/watch?v=_Qd3erAPI9w
- afpx 4y agoThe thing is, for 20+ years you didn’t have to study. Only within the last decade or so have things become so competitive. There’s been a fundamental shift in supply and demand.
- giantg2 4y ago"If you are fortunate (?) to be around in the entrepreneurial world long enough, you will realize that intelligence, hard work, good time management etc are not adequate." Not just as an entrepreneur. I have found that these traits don't guarantee a reward for ICs, or anyone really. I used to work hard. Now I just work hard enough. Pays the same either way.
- hirvi74 4y agoWhat does IC stand for?
- technofiend 4y agoIncentive Compensation. It's a fancy way of saying bonus.
- aqibgatoo 4y agoCommon, this is not cheating!
- pclmulqdq 4y agoWhen I asked well-known questions like this in an interview, I usually ask the candidate if they have seen the question before. Almost everyone says "no." But if you then go on to solve the question without thinking about any alternatives, red flags go up. Even worse, some people would try to pretend that they didn't know the answer. Their line of thought to the solution would be a LOT more linear and less branchy than someone who truly didn't know. I would never fail someone who found the answer to the question, but I did note the possibilities: either they lied about knowing the answer, or are very smart and lucky to get straight to the answer. Now, I was happy if the candidate said "yes" and gave me the solution. Then we could move on to something else (usually an easier question), and I noted your preparation and honesty for the hiring committee. Almost everyone who said "yes" got an offer at that company. Almost everyone who lied about their "no" didn't get hired. By the way, this particular question has an easy way to weed out the mathematicians from people who are well-prepared: add another repeated number. It's possible to solve for both that are repeated.
- tylermenezes 4y agoThis happened to me with multiple questions when I interviewed for a Facebook internship back in 2010. I didn't really understand that this was bad (if I wasn't supposed to memorize the answers to all the questions, why were they all online and completely unrelated to the skills needed to be a developer?) The interviewer got upset and asked me a poorly worded question which I think he made up on the spot.
- digianarchist 4y agoI cheated on the interview for my current job. The question was posted on GlassDoor and from there I found the GitHub repo they were using. Is it so bad if you’re able to implement it in real time and all through the trade offs?
- stevage 4y agoStrange, I read the problem statement, paused, and worked out the answer in 30 seconds. Maybe I have just done enough of these kinds of challenge problems before. All totally irrelevant to the actual work of software engineering.
- deleted 4y ago[deleted]
- stutsmansoft 4y agoThis proves that in the real world, problems are solved by research and thinking. Whiteboard leetcode crap is simply a test for "have you heard the trick for this one or not?"
- steelframe 4y agoI've got a story of my own that has some remarkable similarities to this one. When I interviewed with Microsoft, they asked me to write a program that detects whether the stack grows toward lower address or higher addresses. Since I had studied computer engineering with an emphasis on CPU architecture, this was trivial for me, and I got the job. A few years later I interviewed with Google, and they asked me the exact same question. I didn't tell them I've already done this question with another company, in part because I knew the answer the first time around and didn't see the point in potentially torpedoing an opportunity to work at Google. For another interview question at Google, they asked me to write a heap allocation algorithm for the Linux kernel, and since I had recently written some kernel code, I happened to know (at the time) exactly how to use the kernel linked list manipulation macros from memory, which really impressed the interviewer. I ended up getting the job at Google too. Both jobs defined my career in many ways -- especially the Google gig. I've never performed quite so well on coding interviews since then, but somehow internal references and prior accomplishments seem to give enough momentum to make mediocre coding performance a non-issue. In fact I've never interviewed for a job for which I didn't end up getting an offer. In my case, I really did spend a lot of time in college getting as much exposure in breadth and depth to computer architecture as I could, and so I feel I earned my career. But at the same time I can't help but wonder to what degree dumb luck came into play with respect to the interview questions I got asked when I started out in Big Tech.
- 908B64B197 4y ago> they asked me to write a heap allocation algorithm for the Linux kernel, and since I had recently written some kernel code, I happened to know (at the time) exactly how to use the kernel linked list manipulation macros from memory, which really impressed the interviewer. > seem to give enough momentum to make mediocre coding performance a non-issue. These two statements contradict each other.
- Rafert 4y agoI think you missed "since then" preceding the second quote.
- masto 4y agoI don’t think this person would have done badly on the interview if they hadn’t practiced the question in advance. At least according to the narrative, when they first heard the problem they thought about summing the numbers: presumably they would also have gotten there during the interview. It also begs the question that a direct path to “perfect code” is the intended goal. Admittedly this story takes place quite a while ago and there’s no one approach to interviewing in big tech, but I think it’s safe to say it’s generally a more nuanced evaluation. In a situation like this, the textbook approach is to start by proposing a quick and dirty naive solution, like storing all the seen values in an array, and telling the interviewer why or under what conditions you think it’s a bad solution. You could realize that there’s only one bit needed, so you could track eight values per byte. That’s probably the point at which the interviewer might prompt you to start coding, since there are a few details to get right to show that you know how to implement a simple algorithm, and there’s opportunity for followup about boundary conditions, scaling, big-O, etc. At that point, you may have enough time for another prompt like “can you think of a way to do it without an array to store all the values?” If the candidate is still stuck, I’d offer them “what if I give you this formula for the sum of the numbers from 1 to N?” Similarly, if at some point earlier on they said “I think there’s a formula for this”, I’d probably give them a minute to think about it and then just tell them what it is. Because I want to move on to see if they can implement it. Are a lot of FAANG interview questions math puzzles pretending to be programming questions? Unfortunately, yes. It’s hard to avoid when you have a people who are smart at math and not particularly skilled at interviewing. They tend to create questions based on something they’re impressed with themselves for knowing. I’m not suggesting anyone has solved the problem of how to decide, based on 45 minutes talking to someone, whether they’re going to be successful at the job.
- samsa 4y ago"So pretty much, my entire career is built on one amazing stroke of luck." This, to me, is the buried lede. Much of success is due to luck. Not all; some people on balance are more talented and persistent and hard working than lucky. Others have more luck (a referral, inside info for helping them prep, etc.). I just landed a new job that I am quite confident I would not have been considered for without a referral from someone close to me working for the company already. After multiple rounds of interviews and assessments I am confident they feel I am a good match, but without the luck of that referral I very well may not have gotten past the call with the recruiter.
- ohmahjong 4y agoI've been explicitly told on a phone interview that "we really wouldn't be considering someone of your experience without the referral". Nailing the technical interview and getting the job felt amazing, but that referral came in _clutch_.
- habosa 4y agoWhen I interviewed at Microsoft the same thing happened. The final interviewer asked me a question I had already solved while studying. I told him I had already seen the question before and knew the answer. He said that’s fine and just had me show him the solution. We used the extra time to just chat about my interests and side projects and I got the offer anyway. So it doesn’t matter, you didn’t “cheat” any more than I did.
- Tyr42 4y agoOn one of my programming courses, while studying for midterms, I was reading a alternate textbook which covers similar material to our course, and I noticed that question 1 and 3 from the textbook had already been used on our homework. So I was like, excellent, question 2 is a good practice question for studying. I even called my roommates over and got them to study it too. Turns out it was the bonus question on the exam. I was surprised, but my roommates were pretty happy with me.
- gumby 4y agoThe use of “cheat” in the title is clickbait on a reasonable post. The author prepared and also had a lucky break in the screening interview. Then in the actual interviews they did ok as well. Sounds like the system worked the way it was supposed to.
- giantg2 4y ago"I felt like I had an unfair advantage. My preparation, plus a crazy coincidence, made me feel like I had cheated on my interview." Isn't this the very premise of LeetCode - do a bunch of LeetCode questions and you're likely to have a similar one in the interview?
- brhsagain 4y agoThe whole game of studying is predicting what's going to be on the test, rather than nobly mastering the material in general and then doing well on the test by applying your knowledge. Anyone saying this is cheating either did badly in school, spent impossibly exorbitant amounts of time on school, or is being a hypocrite. Also, if the article hadn't revealed the interview question, I would've assumed it was like, write out a proof of Fermat's last theorem or something. Even if you don't think of comparing the sum, the next obvious solution is to use a hash table to track duplicates, which I highly doubt they would've failed someone for. So basically this is a story of someone's non-cheating on something relatively trivial anyway. This probably increased the author's chances of going to hell about as much as standing next to your friend in 7th grade while he smoked a cigarette contributed to your chances of lung cancer.
- jimmaswell 4y ago> nobly mastering the material in general and then doing well on the test This is what I almost always did, because I was there to learn and wanted to better myself and actually know the material. Sometimes I'd know some nonsense was on the test like memorizing an arbitrary complicated formula but that was the exception. Always tended to do well too.
- brhsagain 4y agoCould be different era/circumstances, but when I was in school this would've been impossible. There was just way too much material to cover. If someone from my high school had claimed they aced all their classes by actually learning the shit out of every subject, I would've been like, either you have a 200 IQ, or you have more hours in the day than me, or you're actually doing some version of this: http://paulgraham.com/lesson.html http://paulgraham.com/lesson.html
- siilats 4y agoI had the same experience in my Cambridge University entrance interview. The kid before me came out and said the professor asked xx and she ended up asking me the same question and I had a chance to look up the answer.
- JKCalhoun 4y agoI feel like I used a little "social engineering" to get my job at Apple 28 years ago. I wrote about it: https://www.engineersneedart.com/blog/interview/interview.html https://www.engineersneedart.com/blog/interview/interview.ht...
- javajosh 4y agoIf this is cheating, so is studying for the interview by reviewing hundreds of similar questions. The difference is in degree, not kind. BTW you probably earned extra points for not naming the Gaussian sum you used, because that's pretentious.
- simula67 4y agoUltimately, interviews are about a process of elimination. There are M applicants and N spots open. If M>N (which is most cases) we need some way to go from M candidates to N job offers. How do you run this selection process? One way to do this is to ask the applicants who are all the candidates who can do the job. But this is a lousy way. Some people might simply say they are qualified even though they are not. Recruiters obviously need some way to filter out the candidates who cannot do the job. But let's say that even after doing that, the number of qualified candidates are still greater than N. What do you do now? Obviously, the company should hire those individuals who, when hired, maximizes the value to the firm over the tenure of the candidate at the company. Obviously, the company cannot simply ask the candidates who are the most valuable, because each person might respond that it is they themselves. So, the company is ultimately looking for certain signals. These signals, if present, indicate that the candidate, when hired, will bring maximum value to the company over their tenure. However, once the candidates understand that these are the signals that a company is looking for, they can fake it[1]. For example, in this case, the candidate figured out that the company asks toy problems in the interview and memorized the answer, albeit in this case, accidentally. However, nothing is stopping a candidate from doing this deliberately. In this case, the author is reliably able to emit this "toy problem solving skill" signal even though he may not have been able to solve the problem in the time allotted during the interview. However, the company was unable to detect this possibly false signal and therefore, he was hired. In this case, it does not look like a bad outcome for most people involved This problem of minimizing false positives would be an interesting problem to solve. A company that solves this problem well will probably enjoy a huge competitive advantage in the market. [1] https://en.wikipedia.org/wiki/Goodhart%27s_law https://en.wikipedia.org/wiki/Goodhart%27s_law
- dccoolgai 4y agoA company came to our school before a job fair and the recruiter talked at our club about what she does during her process. She mentioned that she writes short notes on the back of resumes to sum up her first impressions. So the next day at the fair, I saw her and turned my resume over and wrote "I love this guy, let's definitely hire him" and walked up and handed it to her and smiled and talked for a minute. Walked away and as she turned the resume over to make her notes I heard her bust out laughing. I got the interview.
- zeroonetwothree 4y agoI had a similar lucky break when interviewing for my first real job at $FANG. They asked me a question which I happened to have done a research project on. So not only did I give the optimal algorithm I also was able to teach the interviewer some new aspects of the problem. I got the job very easily. Conversely at my interview for $FANG2 I got unlucky and didn’t do as well. So I didn’t get that job.
- nickysielicki 4y agoI recently had an interview with a startup that asked me the same exact question that I got from a faang interview the week prior. It was a problem I hadn't practiced/seen before the first interview, but I was able to figure it out just before we were out of time. In the second interview, I stopped him right away once I realized I had just seen it, explained the solution that I came to the week prior, and he went on to choose a much more difficult problem that I couldn't solve in the time requirement. I regret nothing -- it was a better spend of time for both of us. Interviews are bullshit, but they're not such bullshit to me that I'm willing to sit there and pretend to have a eureka moment about a question that I already know. I had the opportunity to show my skills and he got to see me struggle through it, and that's what it's really about. By the time you get to a final round, they moreso want to know what it's like to work with you than they want to know what you know. If you're ever in this situation, there's really no wrong answer. Play pretend and look like a rockstar, kudos, or be forthcoming and show some ambition -- also kudos. Job interviews are stressful and I would never fault someone for playing dumb. OP shouldn't feel like he needs to explain his sins. This is a systemic problem with leetcode style interviews, and it's not your job to correct for that as the candidate.
- georgeburdell 4y agoSample size of 1, but it seems like questions used to be easier. I remember seeing this question on Leetcode, and this formula was covered in my high school math class and so I solved it within a few minutes. By contrast, I’ve had a couple of online assessments with Microsoft this past year and the problems were a lot harder (design a simple word processor with copy/paste, undo, etc, and the other was something about optimal scheduling of some finite resource)
- robofanatic 4y agoI think the author should not feel guilty for this and frankly he is overthinking about it a bit. Isn’t it true that most of the things do depend upon little bit of luck? Being born itself is sheer luck!
- bayareabadboy 4y agoWhat a silly, click baity non confession.
- newobj 4y agoThat’s preparing, not cheating, and is a behavior of good candidates. It’s also a shitty and very (old school) Microsoftian interview question.
- rychco 4y agoAnd the interview process was just as irrelevant to your actual success in the position as it still is today.
- lormayna 4y agoSomething similar happened to my actual job interview: in the preparation I had read a long list of questions and most of them was part of the technical interview. I was able to reply in seconds, just because I already know that. I was very honest and I told them after the 3rd question. It seems that they appreciate that.
- sys_64738 4y agoYou maximize the situation to your advantage by using all the tools at your disposal. That's what occurred here so zero cheating occurred.
- cmsonger 4y agoI have no opinion whether or not it's cheating. Feels like a definitional issue more than anything. I work and interview for one of the FAANG's. I had a candidate tell me just the other day: "Oh, I've done this in another form." We went on, talked about some details that are not a part of the core algorithm but that I think are interesting to suss out things like: "Do they understand concurrency", "Do they understand good API design", etc and then we moved on. As I was doing the writeup, I scored the person high on a measure that I rarely get a read from in technical interviews. I guess my point: I don't know if it's cheating and in no way shape or form feel judgy towards people who do what the author did. But when I've encountered people disclosing this, I have noted that.
- deleted 4y ago[deleted]
- sershe 4y agoI don't think this is cheating.. if someone asks me how to design a distributed join and I answer because I worked on distributed joins directly, is that cheating? This reminds me of a guy who, on the contrary, probably thinks I wronged him during an interview. He couldn't solve my relatively simple programming question and then remarked, sounding rather unhappy, that this question "wasn't on leetcode", and so he wasn't prepared for it ;)
- advocate23 4y agoThis isn't the sad part. The sad part is that technical interviews cannot be audited externally so they can ratchet up the difficulty if they don't want you. To my knowledge Google and Microsoft don't do that, but I would not be surprised if other companies who are more tolerant of dark patterns have already started. Second, after reading that blog post, you just know that there are some poor saps out there who have informed their interviewer: "I've already seen this question before." It breaks my heart that they are (likely) punished for their honesty.
- dixie_land 4y agoAs an interviewer I've seen candidates immediately recognize my interview question (let's be honest, with Leetcode unless you invest time to keep crafting new questions, sooner or later it gets leaked). The interesting part is that you can still get enough signal to tell who understood the solution vs who only memorized it. (e.g. in my question you had to do a pre-processing to transform it into a classical question on leetcode; people who only memorized the solution wouldn't even recognize that and would find the input does not "fit" into the canned solution)
- paulcole 4y ago> it definitely didn’t work the way Microsoft had intended I think this is a poor conclusion. This person has no clue what Microsoft intended. And I think preparation and knowing a person who works at Microsoft may have been what Microsoft intended.
- hardwaregeek 4y agoThis is pretty hilarious. If you spend any time on CS career forums like /r/csMajors or /r/cscareerquestions, you realize that peoples strategy appears to be “grinding leetcode” for hours and hours until they can regurgitate the exact question that they’re asked on the interview. It’s gotten to the point where some people are terrified at the prospect that they won’t get a question that they know already. As if figuring out the question in the interview is just such an impossibility. It’s quite sad because it reflects an attitude that problem solving is too stressful/challenging, so people will take the route of blind busywork to avoid actually solving problems. Granted leetcode problems are pretty useless and stupid. I don’t fault people for coming up with a stupid solution to a stupid problem.
- dudeinhawaii 4y agoIt's just simple luck, not cheating. I had a similar experience, at a Microsoft interview no less, a decade+ ago. I had been playing around with AI Pathfinding algorithms for a game I was working on. The first interviewer tries to toss me a difficult question that involved navigating a complex graph. I'm sure it was supposed to be a multi-stage problem that we work through together. Instead, I walked up to the board and wrote out an A* algo in 45 seconds because I had been writing this F-ing algo over and over, troubleshooting it for days in my game. The interviewer looked awestruck, and we spent the rest of the time discussing other things. Of course, I got the job. It's just plain luck. Enjoy it when it happens.
- birdyrooster 4y agoThis has happened to me a couple times and I tell the interviewer that I already know the answer and to move on to the next question. It’s good because you get to see more questions and makes the interview more interesting and at the same time the employer sees that you like a good challenge.
- lazyant 4y ago"Leetcode" algo questions are supposed to test how you think and programming skills but for most people it just tests if they've seen the question before or not.
- barefeg 4y agoOn the other hand that first question was just a filter. He managed to do well in the on site interview. So even if he had an unfair advantage to get the foot in the door, he managed to back it up
- aetherson 4y agoIn 2012, I moved from a long-term job to a small startup. I was the first engineering hire for the startup, and they had started building their product with consultants at Pivotal Labs. They also used Pivotal to test my programming ability -- I did an interview in which I implemented sets in Java in a style where the interviewer actually typed the code, I told him what to build. That startup failed pretty soon afterward, and I got an interview at another startup -- that had also used Pivotal as contractors. That startup did its own interviewing, but they had liked Pivotal's style of interviewing, so I went into an interview with the CTO who started saying, "Okay, we're going to build a set in Java, I'll type the code..." I said, "Look, I'm happy to do this interview, but I've done this exact thing before. Why don't you let me sit down with one of your coders for the time period you've allotted to this, and I'll help him do his work, which I think gives you a good sense for how I'd actually work." I sat down with a JS developer and figured out a bug in his tests which was causing him to think that he had a bug in his main code. I got the job.
- chromejs10 4y agoTalk about a click bait title... This is no where even close to cheating. It's like saying any test you've ever prepped for in the past was cheating.
- Layke1123 4y agoRemember, it's only cheating if you get caught! Every comment below OP's post
- agumonkey 4y agoI never cheated but after being rejected by clueless recruiters (javascript != java) that only reacted to big company names (no matter the quality of work I did) I decided to scramble my resume and turn projects into paid gigs. Interview went just like the others. I felt like a criminal for a few hours after that though.
- muxneo 4y agoThis is no cheating. When you want to succeed, the whole Universe conspires in order for you to achieve it.
- gedy 4y agoThis is basically no different than a take home assignment, and not cheating. I always do better thinking about problems in my own space, without the quiz show drama of someone staring at you and "taking notes".
- deleted 4y ago[deleted]
- abeyer 4y agoAlso "cheated" for my campus interview for a Microsoft internship -- there was enough demand and limited slots that they'd set a minimum GPA if you wanted to get a campus interview slot, which I wouldn't have met so didn't even apply. My friend got one, though, and she was scheduled near the end of the day. Her interviewer mentioned to her that his last slot had cancelled and hie was just killing time until the other interviewer was done and they were heading back to the airport... So she tells him she knows someone and calls me to run across campus to the career center to catch him before they left. Ended up w/ the internship and my first FTE job out of that.
- rationalfaith 4y ago
- therein 4y agoI think you're being unfair to yourself if you're calling this cheating. Also FWIW, I interviewed with Microsoft at my college, got asked the very same question as the OP and actually solved it the same way. I knew the formula for the sum and the rest just came to me at that moment. I was flown to Redmond, given series of interviews and an offer in OSG. Even though it was my dream to work on Windows kernel growing up, in the last 4-5 years, I had become a FOSS Linux guy so I turned down their offer, much to the surprise of the recruiter whom I had shared this was a life-long dream, and took an entirely different direction with my career and life. Worked out nicely. I am sure I'd be very happy in Microsoft but maybe I am happier.
- btheshoe 4y agoI did around 200 leetcode problems preparing for this summers internship search. About half my interview problems were problems that I'd seen before.
- difflens 4y agoI wouldn't consider this cheating, I would rather call this preparation. Is looking at question banks before an exam considered cheating? I think this is in the same vein. Interviewers are people too, everyone knows there is a finite, albeit large, pool of questions to ask. If I ever see a candidate that has prepared to the point that he/she can code up the answer to the majority of leetcode style questions, I'd hire them without hesitation.
- bgro 4y agoThis reminds me of all the people that memorize leetcode problems to pass FAANG interviews instead of actually working real problems. Yes, it’s cheating. The consent is you’re given a random question and let’s see how you do under pressure to solve it. What creativity do you have? What can you remember? How do you interact with the interviewer? Memorizing the question or the patterns commonly used and being able to regurgitate it out doesn’t make you good. You’re lying and breaking the agreed upon consent. You don’t know what you’re doing, you’re just regurgitating out a string answer instead of creating the object oriented program you lead them to believe you have. This puts real programmers who don’t have time to memorize trivial work at a disadvantage. Programming interviews need to be based on real world situations. If that’s not possible, memorizing a bag of tricks that aren’t useful or practical in the real world is not an acceptable solution. (How about you do a paired code review instead? You’d see real code, show team work skills, and demonstrate your knowledge by the questions you ask or bugs you flag as potential problems.)
- dragonwriter 4y ago> You’re lying and breaking the agreed upon consent. “Consent“ is a mutual agreement. If you haven't represented to the potential employer that you haven't studied the class of common interview problems, you have not broken any “consent”. In fact, given that employer are aware of the existence of numerous platforms that exist to prep candidates by practicing the class of problems, and indeed many use one or more of those platforms as part of their hiring funnel, that you have practiced on them is probably more of the base expectation than that you have not.