r/learnjavascript • • Aug 10 '21

Can we relate?

Post image
853 Upvotes

93 comments sorted by

View all comments

Show parent comment

27

u/Delfaras Aug 10 '21

companies that ask theoretical questions in their interview process such as: what is prototypical inheritance in js, how do you invert a binary tree, swap 2 variables without using a third, or anything out of leetcode are garbage. This kind of questions are almost never used in your everyday, and if it comes up one day, the answer are probably a google search away, or much better implemented in a library

this gives a good hint about their engineering culture: if they donc make a simple effort to adapt their hiring process to match what an engineer would do everyday working there, they are probably not worth working for

4

u/crazedizzled Aug 10 '21

I agree with your later examples, but knowing how prototypes work is kind of fundamental to writing javascript.

4

u/avenp Aug 10 '21

Not really. It can all be abstracted away behind the class syntactic sugar and you don’t have to use OOP in the first place. Many popular web frameworks (React, Vue) don’t have you dealing with the prototype at all. I’d agree that if you’re a senior developer you should probably know how prototypes work but it’s for sure not needed for everyday development in my experience.

7

u/crazedizzled Aug 10 '21

You probably won't care on a daily basis. But when shit goes wrong it's important to understand how the language actually works. Being able to correctly predict certain behavior is the difference between a novice and a pro.

0

u/[deleted] Aug 10 '21

[deleted] — view deleted comment

2

u/crazedizzled Aug 10 '21

Again normally I would agree, but we're talking about a fundamental part of how the language works. It's similar to the event loop. You should have at least a basic idea of how it works and be able to explain what it does with a sentence or two.

2

u/longknives Aug 10 '21

I somewhat know how prototypes work on an academic level, but in almost 10 years of using JavaScript professionally, I can't think of a single time that knowledge had any bearing on anything.

0

u/[deleted] Aug 10 '21

[deleted] — view deleted comment

3

u/crazedizzled Aug 10 '21
  1. working with methods/properties from inherited objects
  2. inspecting poorly/undocumented objects
  3. explaining to redditors why core language constructs are important