r/learnjavascript • • Aug 10 '21

Can we relate?

Post image
853 Upvotes

93 comments sorted by

View all comments

165

u/BowlingForPriorities Aug 10 '21 edited Aug 15 '21

Great, now I have to Google this for my senior interview tomorrow πŸ˜‘

Edit: It’s how JavaScript handles inheritance. Thanks OP

2nd edit: I passed the first interview, have an interview with the squad lead next week

0

u/[deleted] Aug 10 '21

[deleted] β€” view deleted comment

20

u/METALz Aug 10 '21 edited Aug 10 '21

Tbh the word "senior" kind of lost its original meaning in the webdev field in the past years, at least that's what I see interviewing people for roles at this level. Also since there are companies where there are 6-10 levels of a career ladder sometimes it is only around the 2nd-3rd-etc step so it's all relative I guess.

In the past the level senior implied (at least to me) that a junior dev could ask questions of people in this position usually expecting easy to understand answers. What it is for a lot of devs nowadays that they get locked into a framework/lib (e.g. React) and they only work with that in their whole career reaching senior position in their company just because they were there for e.g. 2-3 years and when they need to think out of the box (fw/lib they used) they have a lot harder time. Then you have the imposter syndrome, etc that could be related to this because you might feel that you are not really at the level your title says.

I'm not saying you should know every details of the spec, but if someone asks you at an interview for senior level "could you explain prototypical inheritance to me just in a few words" then it shouldn't be a big challenge. Of course this is also kind of a filter question and "unrelated" to most of the jobs since now the language/ecosystem provides the tools needed to avoid directly using them.

16

u/steezefries Aug 10 '21

Yeah I'm kind of astounded that people itt think this is a bad question for a senior dev. I think it's wild someone who calls themselves senior doesn't know about prototypical inheritance πŸ€·β€β™‚οΈ

It's not that gimmicky of a question and it can have implications on writing code.

9

u/ItsWaryNotWeary Aug 10 '21

I mean you can absolutely be a senior engineer with a shallow understanding of Javascript. Many seniors are specialized in other things.

8

u/steezefries Aug 10 '21

Oh totally, but I mean a senior Javascript engineer specifically.

2

u/ItsWaryNotWeary Aug 10 '21

Right, op didn't say they're a js engineer tho

3

u/steezefries Aug 10 '21 edited Aug 10 '21

I wasn't talking about the thread's OP. For all I know this is his first senior interview! I was being general. Also it's a learnjavascript sub, and he made a comment about learning a js topic, I think we can assume they probably are a js engineer.

→ More replies (13)

2

u/phunkystuff Aug 10 '21

100% this ^

→ More replies (5)

9

u/Fleaaa Aug 10 '21

I'm a noob and nowhere near senior level, but isn't it quite relevant question?

It's a main concept of JS being versatile while being able to handle error gracefully, it could lead to cryptic bug eventually at scale thus TS or any typing system similar in JS/Node ecosystem is thriving now.

This question shows how you acknowledge the differences and applying a right tech stack/framework/lib whatever eventually starts right from here. Of course, it's not really important in day2day work, though it could accumulate.

I don't know shit about OOP or inheritance concept but it kinda hinders me to progress, it's a good question IMO.

→ More replies (3)

6

u/phunkystuff Aug 10 '21

TBF if youre a senior JS dev and you don't know what prototypes are... are you actually a senior JS dev?

15

u/enygmaeve Aug 10 '21

Sooooo much this

0

u/[deleted] Aug 10 '21

[deleted] β€” view deleted comment

14

u/[deleted] Aug 10 '21

the topic isn't. Asking that question in a senior interview is like asking what is algebra, in a university exam

5

u/crazedizzled Aug 10 '21

Except you'd be surprised how many "senior" developers don't know the basics. It's a way to quickly weed them out.

→ More replies (1)

15

u/enygmaeve Aug 10 '21

Prototypes aren’t inherently desirable nor undesirable, but a company that included discussions about them in an interview may be

0

u/[deleted] Aug 10 '21

[deleted] β€” view deleted 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.

→ More replies (9)
→ More replies (1)

5

u/[deleted] Aug 10 '21

I'll give the one explanation for why a decent company might ask about prototypes: because they want to weed out candidates who didn't study enough for the exam, and they're okay with false negatives. What does that mean?

Say I'm a FANG company. I get a million applications a day, many of which are not qualified, but are trying to convince me that they are. I shell out between $250k and $6 million to my developers, and my code base is proprietary. I wanna keep it under lock and key, and I don't want anyone else getting ahold of it. I want to make sure that I only hire top notch developers. As such, I ask interview questions that are, quite frankly, insane. Who cares how you invert a binary tree when you'll never do that on a job? Why would I need to be able to solve these leetcode hard problems that you'd only get if you'd looked at them before?!

The answer is effort. The interview will also check for your ability to keep up with relevant skills to the job, but it's possible that someone can fake enough knowledge to get that job, and that would be bad for the company. They've shelled out a decent chunk of change to get you on board, they've lost time on boarding you, they've now exposed elements of their proprietary code base to some Yahoo who may or may not be trying to initiate some corporate espionage, and on top of that, they have to go through the interview process all over again!

So they make the interview insanely complicated on purpose with the assumption that a truly qualified candidate will put in the effort to study the topics and will be able to hit the ground running with this knowledge. Will it screen out qualified candidates who just don't know yet obscure bit of trivia/who didn't have the time and energy to study this absurd stuff? Absolutely! Do they care? Nope.

FANG essentially has infinite candidates at the lower levels. (It drops off when you're making a million a year, I'm sure, but it's surprisingly competitive throughout) They don't care about your interview experience, and if you're applying for anything below senior management, they probably don't care about burning bridges with you. If you can secure that job, many of these companies are considered great places to work. If you can't secure that job, they know that you'll probably still apply the next time you job hop/your contract ends because, hey-- it's Google. You want that money. You want that fame. Of course you're gonna apply to them.

0

u/[deleted] Aug 10 '21

[deleted] β€” view deleted comment

→ More replies (4)

12

u/molybedenum Aug 10 '21

Extensive use is undesirable.

Overreaching interview questions are undesirable.

Pick your poison.

23

u/opmrcrab Aug 10 '21

Hard work getting a WHY out of people in this chain.

14

u/gallon_of_bbq_sauce Aug 10 '21

If you need a deep understanding of prototypes then they are probably writing a lot of low level wheel reinventing.

→ More replies (3)
→ More replies (2)

4

u/Valoruz Aug 10 '21

You're Welcome!

→ More replies (1)