Live data from Hacker News

The FizzBuzz that did not get me the job

kranga.notion.site

381–390 of 460 posts

Re: The FizzBuzz that did not get me the job

#381
post #39
post #2

Very clever! Also, I’d steer absolutely clear of any company that does this. This doesn’t assess anything meaningful, it’s an ego trip for the interviewer. Ugh.

Oh, I guess a few of these additional rules might prove helpful for weeding out people who just memorized FizzBuzz but don't know much more. However, all of these "don't use the right tools" and "write extremely compact code" rules mostly select for people who are good in code golf, not for people who can solve actual business problems or write maintainable software. And it seems like this was the only programming ch…

This is my takeaway, like maybe 3 extra rules would be worthwhile but by god there is too many, what are you learning here for something so simple as fizzbuzz

Re: The FizzBuzz that did not get me the job

#382
I think DHH was right all along. Typescript is cool if you use it alone but from my experience code like the one produced by the OP gets written by some ex-Java ninja and out of 1000 devs maybe 5 could fully comprehend what the code actually does. AI writes this kind of TS a lot. I don’t say TS is bad but most of the time I feel it’s like trying to kill a fly with a nuke. The worst part is I almost never had the issues TS tries to solve, after all adding prototypes to React took 1/10th of the time than annoyances with TS take.

Great job OP, but my eyes bleed.

Re: The FizzBuzz that did not get me the job

#383
post #165

The base conversion insight was great. With this insight, the solution could have been just as compact and much more readable without using types. Sometimes it is possible to be too clever.

The base conversion insight is annoying; they mandate the form of the input in detail down to individual characters and mandate that you can't use numeric methods, except that in this one situation you can completely control the input and do so in a numeric way. You can't change programming language after starting, but you can change the input format on-demand? If you can choose an arbitrary input pre-processor, just choose that the input is the desired output and your program can echo it.

By rule 7: "Numeric types, number literals and their associated methods and operations are forbidden. The input array must contain a string representations of the numbers. The programmer can use whatever representation they see fit with the only restriction being that it could only contain letters, numbers and symbols that could be typed with a single stroke (they didn’t specify which keyboard layout, in mine, ñ and ç can be typed with a single stroke but I assumed it was an US keyboard). The max length of a string representing a number is 6 characters."

The numbers they care about are 1 - 1000 and the max length is 6 that leaves two spare digits, so decide that the input format is "tf0000" where the first two characters indicate if the number is a multiple of three, or five, respectively.

Re: The FizzBuzz that did not get me the job

#384

Earlier quoted context omitted.

> if I was trying to be too clever and quirky... You buried your lede IMO. The interviewers had this cute game and when the developer didn't play by the planned rules (build up a monsterous collections of branching on top of a for loop) they were screwed. Issues: * rules revealed one by one. Spec changes and is always incomplete, but you never even hear about changing spec that your existing solution already handles.…

> artificially handicapping developers > punishing creativity A similar thing happened to me once in an interview. They said use any language, but were a TS shop. I went with Python, which is hardly esoteric. The interviewers were seemingly unaware of the breadth and depth of Python’s stdlib, and so I demolished their questions in short order. I don’t remember specifics, only that I used heapq for something, and iter…

Google pulled this on a friend of mine. "Solve this in any language you want."

Friend solves it in Objective-C.

"Oh, except that one."

I have shunned every Google recruiter since.

Re: The FizzBuzz that did not get me the job

#385
post #134

Earlier quoted context omitted.

This rule alone would make me walk out: "New rules will be revealed one by one. The candidate should note them as there won’t be shown again" This feels more like a Squid Game parody than an interview. I interview people from all walks of life. I would definitely not have hired some of the best engineers I worked with if I was trying to be too clever and quirky when giving out requirements.

Personally, I think it's literally unbelievable. It reads like fiction.

Haven't interviewed lately?

Re: The FizzBuzz that did not get me the job

#386

Earlier quoted context omitted.

> artificially handicapping developers > punishing creativity A similar thing happened to me once in an interview. They said use any language, but were a TS shop. I went with Python, which is hardly esoteric. The interviewers were seemingly unaware of the breadth and depth of Python’s stdlib, and so I demolished their questions in short order. I don’t remember specifics, only that I used heapq for something, and iter…

Google pulled this on a friend of mine. "Solve this in any language you want." Friend solves it in Objective-C. "Oh, except that one." I have shunned every Google recruiter since.

I had a similar experience at a different big tech company when I went to use Ruby. The interviewer suggested that Ruby was allowed, but I would be unlikely to get the job if I didn't use python.

I did get the job, and with almost entirely in Ruby and PowerShell, so....

Re: The FizzBuzz that did not get me the job

#387

Earlier quoted context omitted.

I argue the contrary case - the interview style is pretty reasonable, but the interviewers screwed up the process (and ultimately, the grading). "Adding additional requirements which test a candidate's ability to refactor code" is a pretty good exercise. And it's ok to force candidates people down a specific development path. The problem is that the interviewers didn't do this. They let the candidate pick a strategy…

> but writes incredibly well! The post actually has a lot of small grammatical errors typical of someone not so fluent in English: >> My reasoning went as follow: // My reasoning went as follows . >> Is there any other numbers where this happens? // Are there any other numbers >> I didn’t had paper at hand // I didn't have (any) paper on hand. I'm not here to proofread a fun blog post but it's far from incredibly wel…

I didn’t even notice the typos when reading it... I did notice how well the text flows, how easy it is to read.

I (not a native speaker either) probably don’t make that many grammatical errors, but I envy their ability to just write. I can’t do that, I struggle with every word in long form writing.

These small errors are easily addressed with a final pass in e.g. DeepL Writer.

Re: The FizzBuzz that did not get me the job

#388
post #340

Since I'm in the process of seeking a job, I would like to share a somehow related experience in one technical interview, this time for a senior DevOps role. So, after the initial introductions and talking a bit about infra as code with Terraform, they interviewer asked a question: "What would you use if you cannot use Terraform for a project?" To which I initially answered, since it was a SENIOR position, with a war…

I've had a lot of experiences like this, and I wound up ducking out of the industry entirely in 2021 after having had my skillset reduced to dogmatic use of the infrastructure buzzword of the day.

What are you doing for money now?

Re: The FizzBuzz that did not get me the job

#389

I will go against the grain and say I do not consider OPs fizzbuzz solution to score particular well on readability or maintainability. And these were the only two stated core requirements. The solution is clever and demonstrates solid knowledge of TS. However, in my experience getting too clever with the type system is not always a good idea for ordinary application code maintained by a team of average TS developers…

The interviewers came up with a lot of brain dead rules that they (hopefully) don’t use on their code base.

I could ask you to show me how well and fast you can run while making up a rule that you can’t use your legs and then tell you that you can’t run fast enough to join my sprint team… but that would be idiotic on my part.

Re: The FizzBuzz that did not get me the job

#390

The interviewing company does seem like a dodged bullet at first glance, but: - the requirements being weird might very well be modeling how weird things often get in reality. Rules are often not recorded and not repeated, and very often they seem arbitrary from the POV of the developers. - the interviewers hinted that the direction was not what they were looking for - a senior dev needs to apply his own common sense…

could you at least tell me why I am getting downvoted?
Post reply on HN