Live data from Hacker News

TypeScripting the technical interview

richard-towers.com

111–120 of 180 posts

Re: TypeScripting the technical interview

#112

Earlier quoted context omitted.

Um, which part?

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.

The interview is to test for membership in a cult. There are other places you can be paid to code and design software that doesn't require (or even actively disrequires) being a cult member.

...or at least not a member of that particular cult.

Re: TypeScripting the technical interview

#113

Earlier quoted context omitted.

The distinction is just because you "don't care" about the values right now, nothing stops the next developer (including future you) from needing the values. So now you've gone from not caring to "enabling someone to shoot themselves in the foot" if they don't read the types of the parameters carefully. That's the difference.

The case I was trying to convey doesn’t narrow the actual type for anything outside its own function body. Any footgun that exists after the function call already existed before it. It just implies “I’m only looking at your keys not your values”.

> It just implies “I’m only looking at your keys not your values”.

That's what `unknown` is for. `any` behaves like `never` (in covariant positions), which is exactly the opposite.

Re: TypeScripting the technical interview

#114

I am a 6-figure front end developer, work with typescript daily for the last 3 years. I didn't follow any of that shit. The fuck is an 'n-queen'? I don't think I learned that in my coding bootcamp. Is that a bad sign?

It's "N-(queens)", not "(N-queen)s"

Re: TypeScripting the technical interview

#115
post #52

Long ago, on Svalbard, when you were a young witch of forty-three, your mother took your unscarred wrists in her hands, and spoke: Vidrun, born of the sea-wind through the spruce Vidrun, green-tinged offshoot of my bough, joy and burden of my life Vidrun, fierce and clever, may our clan’s wisdom be yours: Never read Hacker News But Hacker News has read of you, in their snicker-slithing susurrential warrens, and word…

The word "susurrential" returns only two Google results. One is for this post. Does anyone know what this word is supposed to mean?

I believe that is his way of calling us gossipy ultracrepidarianists.

Re: TypeScripting the technical interview

#116

I am a 6-figure front end developer, work with typescript daily for the last 3 years. I didn't follow any of that shit. The fuck is an 'n-queen'? I don't think I learned that in my coding bootcamp. Is that a bad sign?

The N queens puzzle is a well known mathematical problem.

https://en.wikipedia.org/wiki/Eight_queens_puzzle

Re: TypeScripting the technical interview

#117
post #16

TypeScript has the most complicated type system ever. Don't know why Anders&Co needed to go that far.

As much as people complain about the TS type system’s complexity, it is just modeling real world JS. The vast majority of its complexity is hardly used in TS that doesn’t interop with existing JS, because you generally won’t write such highly dynamic code when you have to define its types. But it does allow for safer interop. Even so, JS itself being so dynamic, TS still can’t claim full type safety. And as much as p…

What I always say when someone complains about TS and we should just write JS is “When you write JS you ARE writing TS, you’re just compiling the types in your head.”

Re: TypeScripting the technical interview

#119
post #84

Pretty sad that computations on types look like C++98 in Typescript when C++ itself has moved on to have much more concise ways of performing computations on types in C++11 and 14 (see boost hana).

Interestingly TypeScript compiler doesn't use types for compilation (that's why you can have esbuild that compiles Typescript without understanding the type system). That is the end result of type computation is... Nothing, always, just like in OP.

Template metaprogramming is all about code generation. You would expect them to look different.

Re: TypeScripting the technical interview

#120

Earlier quoted context omitted.

As much as people complain about the TS type system’s complexity, it is just modeling real world JS. The vast majority of its complexity is hardly used in TS that doesn’t interop with existing JS, because you generally won’t write such highly dynamic code when you have to define its types. But it does allow for safer interop. Even so, JS itself being so dynamic, TS still can’t claim full type safety. And as much as p…

What I always say when someone complains about TS and we should just write JS is “When you write JS you ARE writing TS, you’re just compiling the types in your head.”

Yep, constantly. I used to do it and I honestly don’t know how I had 10% of that cognitive load capacity while I did.

(I still do it now because I inherited a huge highly dynamic set of projects, and just explaining the portion of the universe I remember at any given time is an exhausting majority of all of my weekly meetings.)

Post reply on HN