by Andugal on 1/21/25, 8:15 PM with 434 comments
by constantcrying on 1/25/25, 10:56 AM
I would have walked out half way through. These types of questions are very telling of an organization which is extremely insecure in its own abilities.
For anyone who is a somewhat experienced programmer it is not hard to tell if someone else knows what he is talking about. You do not need to waste 45 minutes of someone's time on whether they can correctly interpret and execute some joke requirements.
by riffraff on 1/25/25, 9:59 AM
Also reminded me of my compiler class, we had some homework to write a pascal/C transpiler and a friend of mine somehow managed to implement it via bison errors(?). The teacher was not happy but had to agree it worked and gave him full marks.
by darkwater on 1/25/25, 11:49 AM
"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 warning about mixing Terraform and non-Terraform managed infra because it can lead to unforeseen issues, especially if there are less visible dependencies between the 2. I then mentioned anyway it could be done with Python + boto3, with AWS CLI + bash, with Pulumi, with CDK and then after some extra talk, also with Ansible.
They didn't want a long answer with lessons learned in real prod, they wanted a oneliner answer: Ansible. They told me then to be shorter in next answers and proceeded to ask like 30 questions in a row involving bash, Linux, Terraform and Kubernetes knowledge, to which I answered all correctly (and with the one-liner answer).
The result: discarded, because I chaotically answered to that first question. Although I was somehow offended because I don't like to be discarded, I think I dodged a bullet in this case.
by guccihat on 1/25/25, 11:39 AM
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.
by stevoski on 1/25/25, 10:02 AM
That’s due to this excellent post about your excellent abilities and reasoning appearing on HN.
¡Mucha suerte!
by skeeter2020 on 1/25/25, 1:06 PM
If you tightly script your interview, but then present it as open-ended and flexible: that's on you.
My take if I was interviewing (and forced to use this approach): appreciate what a interesting interview this was, explicitly tell them "wow! that'd didn't go as we planned, but interesting approach!", maybe steer conversation to the pros/cons of unique/efficient solutions vs. less terse / bog-standard approaches, have some prepared code to debug and refactor (instead of expecting the candidate to produce it).
I do a lot of interviews and most of them are so boring and forgettable. The best ones are unique and the candidates shows passion about <anything> in any demonstrable way.
by sjducb on 1/25/25, 10:02 AM
Apply to other companies. In this case it’s not you, it’s them.
by z3t4 on 1/25/25, 1:10 PM
The reason why you didn't get this job is because they filtered out themselves, it was not you that was bad, it was them thinking you where too smart for them. It took a lot of time for me to figure out this, that in a relation you want someone that are on the same level. I used to think that companies want to hire the smartest people... But no, they want to hire people that are like them.
Here's my tip: Start filter out jobs instead of having them filter you out! There are many jobs, especially if you are willing to relocate.
Only apply for places that are as much into types and functional programming that you are! Or at least on your "nerd" level generally.
Do the company have a technical blog that writes about this stuff? Do the company have a technical speaker that speak about this stuff? Is anyone at the company writing technical articles about this stuff?
If you see a good article, reach out to the author and ask if they have any openings or can recommend a good company to work for.
Also if you are applying for a senior position, and you get to an interview, you should be talking to them as if they where 5 year olds. Even if they say they have 30 years of experience, explain stuff like if you where talking to a kid. For me it's much easier to come up with a better algorithm then explaining to others why it's better. It feels like explaining it to my dog.
by camel-cdr on 1/25/25, 10:30 AM
That seems to be what all restrictions, especially #7, lead to and it is a concept everybody that understands how module works should understand.
> 15. Hardcoding matrices is forbidden.
This was definitely meant to nudge you into the direction of adjusting the base.
The excessive number of rules was really weird, surely they could've just asked you to consider simpler a solution.
> Asked the interviewer if it was OK to rewrite it using only types, she asked her partner and he told me it was but that he couldn’t see the point of it and advised me it would not be the right tool for the problem given that there would be many more rules
I suppose this might've been such a hint.
by jcz_nz on 1/21/25, 8:57 PM
This doesn’t assess anything meaningful, it’s an ego trip for the interviewer. Ugh.
by mgaunard on 1/25/25, 10:47 AM
The same applies to interviews.
by kej on 1/25/25, 12:50 PM
I'd be nervous about an applicant that came up with a very clever solution for the hard part of a problem but completely overlooked the simple part. (Again, not sure whether this is what happened here, but the change from how the problem is usually presented makes me wonder.)
by andyjohnson0 on 1/25/25, 11:46 AM
I can't make up my mind whether these interviewers are simply staggeringly unaware, or gatekeeping, or that they enjoy making people suffer. The latter because, for every candidate like the author, there will be multiple candidates for whom this kind of test leaves them frozen and anxious. I wish people involved in interviewing would think more about what they're doing.
by ch_123 on 1/25/25, 10:30 AM
by rokkamokka on 1/25/25, 11:12 AM
This code is almost unreadable to me, certainly to most on my team. I would request changes it if it was a PR going into production (ignoring that the problem itself is made up). The code I would've liked to see would be easy to read, easy to follow, and would make me understand the underlying rules that made the code look like it is. This, I feel, achieves none of that.
But of course, everyone is different, and certainly many in this thread feel different. I just wanted to add my perspective :)
by adhamsalama on 1/25/25, 10:18 AM
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
by rho4 on 1/25/25, 11:09 AM
Don't force 'clever' solutions if you're looking for readability, maintainability, changeability, debuggability etc.
On the other hand, our company doesn't do any technical interviews at all, so there's that.
by forgotpwd16 on 1/25/25, 11:10 AM
by codingdave on 1/25/25, 12:11 PM
So while I am not saying I love this interview method, and other comments are correct that weird tricks seem to be required... I still think the interview served its purpose. OP is not a good match for this company. No judgment implied there - this is the purpose of interviews: for both sides to see if they work well together. In this case, they do not.
by sixothree on 1/25/25, 10:04 AM
Fizz buzz just lets me see their coding style (single letter variables, lack of curly braces after ifs, comments, platform - console, web, service) and whether they’re willing to allow simple mistakes into their finished product. So many mistakes.
But it’s the least I can do to get some information out of a candidate who is already overburdened by the process.
by trhway on 1/25/25, 12:24 PM
switch (ch) {
case '1':
case '4':
case '7':
switch(rem) {
case 0:
rem = 1;
break;
case 1:
rem = 2;
break;
...
break;
case '2':
case '5':
...
by sd9 on 1/25/25, 9:55 AM
by spamizbad on 1/25/25, 3:10 PM
by cvoss on 1/25/25, 5:04 PM
But if the interviewers have to be persuaded that 0 is divisible by 3, I guess you can't expect too much from them. Or anything from them.
by leoff on 1/25/25, 10:02 AM
by iLoveOncall on 1/25/25, 12:43 PM
> 2. Max width of 100 characters. Lines must break on natural breakpoints and not with the aim of optimizing for following the rules. Comments do not count toward this limit and would be positively valued if they are helpful.
This is the point at which I would say that I've heard enough and I'm not interested in working for their company, before I hang up the call.
by BobbyTables2 on 1/25/25, 3:07 PM
This may sound surprising, but interviews are equally about convincing the candidate to join the company as they are about convincing the company to hire the candidate. The former involves much more than just the number for compensation.
I think you dodged a bullet here.
Once found myself in a similar ridiculous situation (Google interview). Looking back, I have to wonder if they expected me to put my foot down and tell them why their scenario was getting ludicrous instead of continuing along. In the end, they determined I wasn’t even fit to be a sysadmin, much less a SRE, despite 10 years of relevant development experience with a wide technical background and numerous patents.
by raverbashing on 1/25/25, 11:07 AM
The main issue that I see is that interviewers get extra picky with all the minor details and they fail candidates due to minor issues that would get solved in a code review or just with a bit more time
And while fizzbuzz using strings only is cool, it seems it didn't add anything to the predictive power of the interview
by bhaney on 1/25/25, 10:02 AM
I disagree, but of course that's entirely up to you.
by chvid on 1/25/25, 10:25 AM
If you use it as a chance to make a mockery of the interview process/interviewer then perhaps that is not a good idea if you actually want the job.
by jonathanlydall on 1/25/25, 12:10 PM
To be clear upfront, it wasn’t simply getting the right answer spat out by the candidate’s solution.
At one level they were trying to asses that you did in fact know how to write code, but since they’re assuming most of their candidates can write code, they were also checking to see what you would do when presented with evolving requirements and constraints.
If I were the interviewers (considering candidates are more stressed than they would normally be on a job), I wouldn’t necessarily require the candidates got all the requirements met as long as they were clearly on the right track and able to explain what they were doing.
Although the technical assessment was contrived (which is okay in an interview), it was absolutely not a “leet code” style problem, but instead super approachable and easy to understand. It doesn’t seem they were doing anything to “try catch people out” so as to disqualify them, but made it interesting enough that they could hopefully get a bit of insight into how the candidate tends to think and behave.
I do think the interviewers were silly to entertain the candidate’s approach for as long as they did, after it was clear that it was very impressive, even if highly impractical for the actual task at hand (which was to show the interviewers your typical day-to-day approach to coding tasks), they should have said very clearly to the candidate “your solution is very impressive and clever, but as we’re trying to gain insight on your approach to typical day-to-day coding, please change your approach such that we’re able to do so”. And they kind of did say something similar, which the candidate essentially ignored to… outsmart them?
If you ask me, the candidate is very skilled and intelligent, but at the same time not very smart in terms of understanding what other people actually “need”.
Most properly experienced software developers have learnt that often what customers “ask for” isn’t actually what they need, very often you give them what they asked for and when they actually see it in action, they realize it won’t actually do what’s needed and then iteration happens.
The candidate in this case gave the interviewers what they asked for, but not what the interviewers needed from them.
The hard parts of software development is almost always not about building something that technically works, but rather working out what’s actually needed.
My message to the candidate is, you seem very technically talented, but you don’t seem to understand very well about how the world and most people in it tend to “work”.
by kevinventullo on 1/25/25, 3:14 PM
Like sure the API itself may have string input/output, but under the hood there’s no way it’s not doing integer divisions and modulos.
by ibloomt on 1/25/25, 9:43 AM
by martimchaves on 1/25/25, 10:54 AM
by moi2388 on 1/25/25, 6:16 PM
I guarantee it’s due to you not living in the Netherlands and not being fluent in English.
No matter if the job offers says they accept remote people, in the Netherlands they really value face to face contact and good and open communication.
by firesteelrain on 1/25/25, 4:47 PM
I once was given an interview question for a position at a company. Wanted me to create build scheduler in any language. It was a build engineer position. I started to do their at home exercise but ended up telling the recruiter I won’t do the exercise. It was pointless since Bamboo, Jenkins, or GitLab is what they should be using. Not some home grown build system.
by Cthulhu_ on 1/25/25, 10:12 AM
by moffkalast on 1/25/25, 11:20 AM
> Max of 30 lines.
> Max width of 100 characters.
Putting arbitrary rules where none are really required is actually quite informative. It shows how the company culture is set up and it's probably gonna be lots of long days working on things that make no sense because some manager is power tripping over pointless arbitrary decisions. You must be truly desperate to come to them for work.
by zogomoox on 1/25/25, 11:29 AM
by crosser on 1/25/25, 1:36 PM
by lcnPylGDnU4H9OF on 1/25/25, 4:27 PM
by yosito on 1/25/25, 10:08 AM
I've recently completed half a dozen 2-4 hour coding challenges, gotten a perfect score according to the tests provided, and after a couple of weeks, gotten a boilerplate rejection email.
What's the point?
by hihiandrew on 1/25/25, 10:33 AM
by MattyRad on 1/31/25, 1:00 AM
https://www.richard-towers.com/2023/03/11/typescripting-the-...
I'm not drawing any conclusions, just pointing out the odd coincidence.
Discussion: https://news.ycombinator.com/item?id=35120084
by ben-schaaf on 1/25/25, 2:01 PM
by KingOfCoders on 1/25/25, 9:26 AM
by mariomash on 1/25/25, 11:08 AM
My only complaint about your code: in a company you probably want them to approve your PRs, sometimes your peers will code worse than you, so better if the code is less stilted and maybe objectively “worse”, but easy to understand at a glance. but that part also depends on the interviewer.... better to ask first, it's part of working in a team.
I'm sure you'll soon be hired for 50k+.
Suerte.
by ahoka on 1/25/25, 11:01 AM
by teddyh on 1/25/25, 10:59 AM
by rapidaneurism on 1/25/25, 4:34 PM
by vander_elst on 1/25/25, 8:13 PM
by theptip on 1/25/25, 11:55 PM
Solving a problem like this with the type system is setting off all kinds of “too clever for their own good” alarm bells. The goal of a coding interview is to showcase as concisely as possible that you know the craft of software engineering. Fizzbuzz should not be considered an IQ test.
The progressive requirements in the interview, while clunky, are getting at the reality of software development: there rarely exists a spec for what you are building. You need to be flexible to future requirements, and you need to write maintainable code that others on your team can understand.
by yobbo on 1/25/25, 1:06 PM
Sometimes it is possible to be too clever.
by wbxp99 on 1/25/25, 11:31 AM
by yreg on 1/25/25, 4:08 PM
by shusaku on 1/25/25, 10:32 AM
by xkbarkar on 1/26/25, 2:28 PM
Is there any other field where applicants are subjected to this?
Nepalese Ghhurkas perhaps ?
I once backed out of an interview when they sent me an 85 page manual on how to prepare for the interview with them. It was not even a FAANG company, just a small IT solution with mediocre benefits.
by squiffsquiff on 1/25/25, 10:25 AM
by divbzero on 1/28/25, 7:01 PM
In that case, a list of 1000 strings should work just fine. Fast lookup and can accommodate any new rule that comes in.
by revskill on 1/25/25, 10:41 AM
by stonekyx on 1/26/25, 12:13 AM
The solution was impressive and fascinating, regardless.
by MrDresden on 1/25/25, 11:17 AM
As has already been mentioned in other comments, these are clearly red flags and grounds for not taking the application process further.
by grujicd on 1/25/25, 11:05 AM
by joeguilmette on 1/25/25, 5:49 PM
by rvz on 1/25/25, 12:50 PM
Seeing this being used in the backend is really questionable. In fact, I then question the overall skillset of the team as to why they need to use Node.js or JS-related technologies in the backend.
As soon as I see any recruiter or company mentioning any usage of Node.js or JavaScript or TypeScript in the backend in the job description, I just laugh and delete the email and never reply back.
Introducing such unsound technologies into a production system responsible for maintaining a critical service is a recipe for complete chaos and disorder and tells me that your company is a joke that exists to prepare their developers for failure.
by pavel_lishin on 1/25/25, 3:08 PM
... that's not a "technicality", that's a crucial distinction that's as important as salary range or other benefits. This would be a huge red flag for me.
by PinkSheep on 1/28/25, 8:53 AM
by horns4lyfe on 1/26/25, 3:15 PM
by bhk on 1/25/25, 6:48 PM
by cranky908canuck on 1/27/25, 12:58 AM
These say that you will have to play a lawyering game.
The OP didn't have the time to immediately see that.
by umvi on 1/25/25, 3:49 PM
His solution is clever, but if that's indicative of how he's going to do engineering work at my company, I guess that means I can expect clever solutions for everything, which usually leads to esoteric, architect astronaut code bases that will be difficult for his non-clever colleagues to grok/maintain.
"Now the easy part! I just have to encode the numbers in base 15 and I could apply the 2 and 5 rule to 3 and 5!" Encoding things in base 15 is too clever for me.
Back to the original statement I made: TS types are a terrible choice because TS types are not debuggable. If you get too fancy with them, you need a god in TypeScript to debug because you cannot set breakpoints inside of types and step through to see how generics and constraints propagate (as would be required by a mere mortal in order to debug).
"Hey, there's a bug in Joe's fizzbuzz function, but he's out on PTO, can you fix?"
"Sure, I'll step through with a debugger real quick... Oh wait, it's 100% typescript types, I can't step through with a debugger. I took a look but it looks like it's encoding numbers into base 15 for some reason... I don't want to break anything further, let's just wait for Joe to get back"
"Actually, can you just re-write it using normal conditional flow logic? We want more than just Joe to be able to touch the code."
by fildevtronic on 1/25/25, 1:04 PM
by tmtvl on 1/25/25, 11:41 AM
by tanepiper on 1/25/25, 12:34 PM
I get that smaller companies can't afford to mis-hire, but they are also not a FAANG - when I read this, I doubt I would have passed.
by Cypher on 1/25/25, 10:17 PM
by yujzgzc on 1/25/25, 11:28 AM
A small company hiring a programmer isn't looking for super clever type system hacks, they're looking for someone to crank out code to solve problems fast. It's not readable or efficient to use the type checking system as a general purpose computation system. If this is the code that your teammate wrote and now you have to debug it, good luck...
The candidate is certainly smarter than the average code monkey, just not "housebroken". Once they've worked at a team where they mostly get to fix and improve long-gone coworkers' code all day is when they gain more of an understanding of what programming is about...
by b212 on 1/26/25, 2:33 AM
Great job OP, but my eyes bleed.
by pockmarked19 on 1/25/25, 2:23 PM
The easiest tell is the adversarial nature of it, but the moment the "max of 30 lines" slide was revealed I'd be out. Scratch that - I'd be out when I saw there were slides. The point of a technical interview isn't to repeatedly try and throw caltrops in front of someone, and a company that doesn't know that is unlikely to be a great place to work.
by joeguilmette on 1/25/25, 5:48 PM
by astura on 1/25/25, 2:50 PM
I would have walked out.
by stefs on 1/25/25, 8:54 PM
by randomcarbloke on 1/27/25, 10:42 AM
FML.
by joshstrange on 1/25/25, 1:44 PM
Hazing-style technical tests are just dumb and this absolutely qualifies. On top of that, I hate technical interviews that tell you that you can’t search the internet or use toolsets that you would use daily in your job. Why do companies waste everyone’s time on exercises that are not representative of the work/working conditions?
When I ran a hiring round last year I spent a good chunk of time putting together a test/process that tried to closely mirror the type of code/problems you would be solving as an IC. I had almost every candidate (even the ones we passed on) commented on the process and how it was no-nonsense and letting them use whatever tool/resource/etc they wanted to solve it made it less stressful.
I even told people they were free to use LLM/AIs. After competing the base test (which they did without us watching, it’s an easy base problem) we asked candidates to modify the code to handle one more use-case (very simple, nothing like the silly rules the OP was given) and it was very clear which people understood the code they/the AI had written vs the ones that could prompt for a solution but didn’t understand it and thus failed to modify it to account for the new use-case (or struggled heavily for something that was a 1-3 line fix depending on how you implemented the original code).
I truly despise the hiring process from both sides. Both parties are asked to make life-altering decisions on very little data. We had a 4-step interview process:
* Introduction, ask basic questions, get to know you
* Technical test and problem solving test (the problem solving test was talking through a real issue we had run into, asking you to talk through possible ways to solve it. There is no "right" answer or rather there are multiple right answers)
* Debugging test, we produce code with bugs in it, you find/fix all the bugs
* Final interview with owners of the company
Last time I talked about this in HN I had at least 1 person complain about how long the process was. Normally we'd get through it in 2 weeks or less with a candidate (depending on scheduling) and it was a total of about 5-6hr (depending on how long the tests took). I'm not a fan of long and drawn out interview processes, but this was the bare minimum process I could come up with that would test candidates in the areas that we cared about. Also, I wanted to give ourselves multiple chances to interact with the interviewee as some people came across great in the first few rounds, and by the later rounds issues had started to surface.
Is 6hr really a crazy amount of time to spend deciding if you want to commit to 40hrs a week to a company for potentially years of your life? Yes, yes, yes, I know you can leave after a week if you are unhappy and I know the company can let you go after a week if they are unhappy but it's never that easy and switching jobs is hard/painful/stressful (as is firing someone). I am strong opposed to the "just hire them and fire them quickly if it doesn't work out", in fact I find it morally repugnant to play with people's lives in that way. Also, I assume the people who suggest such a corse of action are not the ones that have to onboard new hires (a process that is very involved and takes a lot of time, for me at least).
This was an interesting post for how to solve FizzBuzz in an unorthodox and just "cool" way but this test tells you nothing. In fact, if a developer wrote code trying to be this clever, I would reject it at PR time. It's cool for code-golfing but LoC is always a stupid measurement when it comes to maintainable code.
I wish the OP the best of luck finding a job that doesn't make them jump through hoops like this again.
by TZubiri on 1/22/25, 12:45 AM
https://github.com/TZubiri/fizzbuzz2.0
Apologies to the employers that I uploaded it to Github, but I was trying to keep my green squares thingy streak. I didn't upload the requirements so that it's harder to google/scrape into an LLM.
My first note is that, the quality of the code was very high, evidently the code worked and it did so in a manner that introducing changes either required little or no effort. It is unfortunate that the interviewers were annoyed by this rather than satisfied, it reads as if the interview process was written by one person and the interview was executed by someone else and was trying to check some boxes and get to his lunch.
My second note is that, while not incorrect, the approach was a bit academic and certainly harder for others to read. The functional approach is not the most common and definitely not as easy to read as the procedural approach. The interviewer, potentially a coworker, would be reading this and thinking that he would have to read this as part of their job. I don't see any upside to a functional approach here, perhaps in cases with more complexity if I were keen to this approach the pros and cons would be weighted more closely, but it feels overkill.
In a sense it reminds me of the satirical https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... . Where it takes the POV of someone overengineering the fizzbuzz with javalike GO4 patterns.
Third, yes, the requirements are very weird and don't correlate very well with real problems, in some scenarios it forces the developer to do some weird things to the point where you are not sure how someone will evaluate you. If I were an employer I wouldn't be able to distinguish between someone that does 10 ifs in a row because he doesn't know how to use more expressive language constructs, or because he is trying to avoid an array or whatever fucky condition was placed.
Finally, requirement 7, to not use numerical literals and functions, indeed does require to reimplement some basic math, but it was not necessary to implement all of the math. You implemented base 10 addition. My solution just implemented signle digit base 3 addition with overflow. I think overimplementing is a common trap in programming, where you find a solution in 1 minute, and then spend 60 minutes implementing that solution, whereas if you spend some time looking for more efficient solutions, you might cut that implementation and debugging time in the long run.
I wouldn't say that the approach was wrong, it certainly would have bode well with more academic types that value functional approaches, perhaps if they use functional languages like F#, haskell, Scala, Clojure, etc.. But a javascript shop just screams pragmatism and lack of love for the programming language, I don't think you read the room here.
Oh and also, definitely make an AWS account and play with the free tier, just launch a vm (ec2). AWS was hugely influential in terms of design and pricing in the SaaS industry. Remember that AWS was the first big Cloud provider Google and Azure followed, so it's not as important to make an account with the other big cloud providers.
Best of lucks! I'm sure you'll find something.
by haspok on 1/25/25, 10:30 AM
Well, there you go. Typescript can only get you so far. Unless you want to be a low-paid code monkey, time to learn natural languages.
ps. I have many Spanish colleagues, and I have a hard time understanding them in general (when they speak English). Only one other nation is worse, the French...
by Dansvidania on 1/25/25, 1:53 PM
- 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 to understand what the truly appropriate solution is given the stated priorities (readability and maintainability were stated)
- not to mention the fact that if the interviewers don't understand your code, things won't go smoothly for you either way
The fact that they said, paraphrasing "..pick any esoteric language.." might investigate whether, given technical freedom (EG: to pick your own stack) you will build an incomprehensible codebase that will be hard for the company to deal with in the future
I think the author is indeed very clever and I learned a few things from reading this write up (thanks for sharing!) but I think the interviewers were right not be impressed.
If I were you, I'd try to dumb it down for your colleagues.