Live data from Hacker News

TypeScripting the technical interview

richard-towers.com

71–80 of 180 posts

Re: TypeScripting the technical interview

#71
post #43

Earlier quoted context omitted.

Only if you want to get hired.

I’ve been hiring developers for decades at a Fortune 100 company and have never engaged in such nonsense. Unless you are hiring people to program chess sets, the question in the article is foolish. If you want to test their problem solving or coding skills, give them a problem from the actual work they will be doing at your company.

I wish more companies thought that way. It seems like most of them are just cargo culting Google's hiring methods with the expectation that it will turn them into the next Google.

Re: TypeScripting the technical interview

#72

Earlier quoted context omitted.

Asking about setting a Queen on a chess board. Unless I’m being hired at a company that programs chess sets, it is a nonsense question. If you want to test someone’s problem solving skills, test them with a problem that actually reflects the real work they will be doing at your company.

> N-Queens is a classic backtracking problem that gets asked a lot during interviews. https://fizzbuzzed.com/top-interview-questions-3/

Which is exactly the point, it's a leetcode question that tests whether you've memorised a bunch of leetcode interview questions

Re: TypeScripting the technical interview

#73
post #26

In case folks miss the link at the top of the article, this is translated from an old 2017 post by Aphyr. That post was in Haskell, where it's not too surprising that you can do serious computation inside the type system. This new post translates the ideas to TypeScript, which is more widely known, and which I once heard described as having "accidentally Turing-complete" types: https://github.com/microsoft/TypeScript…

I'd say it's "inspired" rather than "translated". The part about using the typescript language server to compute the solution, and the protagonist claiming the code is "concise" because only 4 lines of javascript were generated, was absolutely brilliant. Cracked me up at least. Glancing at the actual code, I admit I'm with Criss in my ability to follow the logic, but it doesn't look like a direct translation from Has…

I know my mind is decidedly poisoned when I could follow the type definitions perfectly, and they reminded me of certain types I have written myself… ah, TypeScript, what have you done to me…

Re: TypeScripting the technical interview

#74
post #55
post #48

Earlier quoted context omitted.

[flagged]

This is a jab (insult), and I've flagged it, but I am also curious. If you could, please describe the qualities of a "bootcamp" grad by which you recognize them? Edit: especially pertaining to type inference, I guess?

If you wanted to have a conversation, you wouldn't have flagged it. So, no.

Re: TypeScripting the technical interview

#75
post #26

Earlier quoted context omitted.

I'd say it's "inspired" rather than "translated". The part about using the typescript language server to compute the solution, and the protagonist claiming the code is "concise" because only 4 lines of javascript were generated, was absolutely brilliant. Cracked me up at least. Glancing at the actual code, I admit I'm with Criss in my ability to follow the logic, but it doesn't look like a direct translation from Has…

I am not well versed in Haskell, but wasn't the original also computing the solution with just the type system?

Yup

Re: TypeScripting the technical interview

#76
post #53

Earlier quoted context omitted.

I wondered if anyone would spot this :) There's a recursion depth limit of 500 on the TypeScript compiler, which prevents this solution working for N > 7 Even Aphyr's original Haskell solution only demonstrates N = 6, so in some sense this is an improvement on the state of the art for type-level N Queens solutions /s

I don't really know what it means, but I've seen it used to work around depth issues in Typescript, but can this use a "trampoline"?

I don't think there's any way to do iteration in the type system (other than recursion), so there's no way around it.

I considered forking the compiler to set a deeper limit, but at some point Typescript itself is going to stack overflow. Also that probably goes a bit beyond what Criss is expecting in an interview...

Re: TypeScripting the technical interview

#77
post #8

This is a delightful read, which reminds me of two other articles. The first is also a caricature of the technical interview, solving FizzBuz with Tensorflow: https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ The second is a explanatory story, or "discovery fiction" as the article classifies itself: https://paulbutler.org/2022/what-does-it-mean-to-listen-on-a... I love these humorous yet pedagogic technical wr…

I think you would enjoy this too https://aphyr.com/posts/353-rewriting-the-technical-intervie...

And of course, the original.

https://aphyr.com/posts/342-typing-the-technical-interview

(Also linked I the first paragraph of the link you posted, as well as in the intro of the OP.)

Re: TypeScripting the technical interview

#78

Earlier quoted context omitted.

> N-Queens is a classic backtracking problem that gets asked a lot during interviews. https://fizzbuzzed.com/top-interview-questions-3/

Which is exactly the point, it's a leetcode question that tests whether you've memorised a bunch of leetcode interview questions

> classic backtracking problem

Literally in the parent post.

Re: TypeScripting the technical interview

#79
post #43

Earlier quoted context omitted.

Only if you want to get hired.

I’ve been hiring developers for decades at a Fortune 100 company and have never engaged in such nonsense. Unless you are hiring people to program chess sets, the question in the article is foolish. If you want to test their problem solving or coding skills, give them a problem from the actual work they will be doing at your company.

> Unless you are hiring people to program chess sets, the question in the article is foolish.

Ever heard about word “abstraction”?

Re: TypeScripting the technical interview

#80
post #26

In case folks miss the link at the top of the article, this is translated from an old 2017 post by Aphyr. That post was in Haskell, where it's not too surprising that you can do serious computation inside the type system. This new post translates the ideas to TypeScript, which is more widely known, and which I once heard described as having "accidentally Turing-complete" types: https://github.com/microsoft/TypeScript…

I'd say it's "inspired" rather than "translated". The part about using the typescript language server to compute the solution, and the protagonist claiming the code is "concise" because only 4 lines of javascript were generated, was absolutely brilliant. Cracked me up at least. Glancing at the actual code, I admit I'm with Criss in my ability to follow the logic, but it doesn't look like a direct translation from Has…

The final punch line is that types vanish and the compiled code is effectively useless.
Post reply on HN