141

Before you're hired:
1. A binary tree?
2. Currying?
3. Higher-order function?
4. How does event loop work?
5. What is prototype?
6. What is encapsulation?
7. Can you draw an algorithm?

After you're hired:
1. Hey, can you add auth token and login to our app?

Comments
  • 12
    Search, copy, paste, build, run, deploy.
  • 4
    This is very JS specific, and JS sucks ass.
  • 2
    @mundo03 How is that JS specific?
  • 1
    @DangerousDev and prototypes
  • 3
    @mundo03 @irene Well prototype pattern is also a standard design pattern in OOP 😛
  • 1
    @DangerousDev there are prototype based languages, where JS is the most popular.
    That word just reminded me to Object.prototype.bullshit from JS

    Never heard of prototypes on other OO languages though.
  • 1
    @mundo03 Yeah JS is prototypical by nature, but other OOP languages like C# and Java, though not prototypical, can use Prototype Design Pattern in required cases
    You can give it a read if you like 🙂

    https://exceptionnotfound.net/proto...
  • 0
    @DangerousDev I do like. Thanks!
  • 0
    @irene The pattern does come in handy when creating a new object requires a costly operation. Now, maybe u can use a cloning method like you said (have to try out how that work out practically though), but one main point is also to HIDE the mechanism of creating new instance, but rather copy an existing object!
  • 0
    @irene Nope. A cloning method has broader semantics, that is, the properties of one object instance are duplicated in a new instance in way that they have same state but occupy diff memory locations. And they can be used in many diff ways.

    Prototype pattern sorta 'Uses' clone for sort of seperating object instantiation from object use. While implementing prototype pattern, you sorta make sure that only way of constructing a new object of particular behaviour is by cloning a particular instance, the Prototype Instance.
  • 0
    @irene 🤷‍♂️
Add Comment