Live data from Hacker News

TypeScripting the technical interview

richard-towers.com

131–140 of 180 posts

Re: TypeScripting the technical interview

#131
post #129

I've got a CS related degree, but I'm a mostly self-taught dev, and not understanding 90% of the code really makes me reevaluate my career choices. Where and how can I learn this stuff?

Just do some basic functional programming. And/or do some of these challenges and don't feel like a cheater if you look at other peoples solutions: https://github.com/type-challenges/type-challenges

Re: TypeScripting the technical interview

#132
post #129

I've got a CS related degree, but I'm a mostly self-taught dev, and not understanding 90% of the code really makes me reevaluate my career choices. Where and how can I learn this stuff?

Do you want to learn it because it looks interesting, or because you think it's important for a Real Programmer to know?

If it's the former, go for it.

If it's the latter, don't worry about it. I have a CS degree, did 6 years on a team writing C++ at Microsoft, and only briefly flirted with understanding this stuff. A couple of the wizard devs on the (very large) team could do it, but they also knew that code needed to be simple above all else, so it was effectively banned in our code base.

Re: TypeScripting the technical interview

#133
post #76

Earlier quoted context omitted.

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...

I don't know about the typescript compiler, but the way around template recursion limits in "classic" C++ template metaprogramming is to figure out a way to make it O(log N) depth instead of O(N) (for some value of N). Like instead of linearly iterating through a range of types through recursion, you divide and conquer. Easier said than done, but possible in some cases.

Re: TypeScripting the technical interview

#134

Earlier quoted context omitted.

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.

"An ultracrepidarian is a person who offers opinions beyond their own knowledge"

Re: TypeScripting the technical interview

#135

So he wrote all that for the typescript lsp to respond with the answer, but when it compiles down it's nothing? And we're using runes as variables just because? That is pretty neat, and silly. I also think it highlights my natural aversion to static type checking in dynamic languages. I know that I could get sucked into writing a bunch of code for the checker, instead of using my energy for making the application wor…

brilliant article - the TS therein is type-hints basically, helping the coder program to chess spec. so yes, in that scenario it's not generating JS (functions etc) lol

Re: TypeScripting the technical interview

#136

So he wrote all that for the typescript lsp to respond with the answer, but when it compiles down it's nothing? And we're using runes as variables just because? That is pretty neat, and silly. I also think it highlights my natural aversion to static type checking in dynamic languages. I know that I could get sucked into writing a bunch of code for the checker, instead of using my energy for making the application wor…

> I know that I could get sucked into writing a bunch of code for the checker, instead of using my energy for making the application work.

“Making the application work” is only half the story. Making a large application stable and maintainable is only really possible with static type safety, IMHO.

Re: TypeScripting the technical interview

#137

So he wrote all that for the typescript lsp to respond with the answer, but when it compiles down it's nothing? And we're using runes as variables just because? That is pretty neat, and silly. I also think it highlights my natural aversion to static type checking in dynamic languages. I know that I could get sucked into writing a bunch of code for the checker, instead of using my energy for making the application wor…

this is why i love ts when not working for a megacorp. when the ts gets too cray i just nope out. throw an any or as in there and get on with my day. wouldn't pass a code review but i don't care

IMHO it’s worth learning to properly type those cases, otherwise you never really know which parts of your application are actually being type checked.

Personally I also find coming up with the correct types to be gratifying if they’re a little tricky.

Re: TypeScripting the technical interview

#139
post #129

I've got a CS related degree, but I'm a mostly self-taught dev, and not understanding 90% of the code really makes me reevaluate my career choices. Where and how can I learn this stuff?

Yes it's mostly because it looks interesting and fun. I definitely agree these type-golf-esque solutions are not ideal in an enterprise project especially where we have juniors and fullstack devs committing a lot of FE code.

Re: TypeScripting the technical interview

#140
post #129

I've got a CS related degree, but I'm a mostly self-taught dev, and not understanding 90% of the code really makes me reevaluate my career choices. Where and how can I learn this stuff?

Don't worry. I assure you that many senior devs can't follow this article either without some further digging. This is a puzzle interview task, not something that matters in most peoples daily work.
Post reply on HN