Hacker News new | past | comments | ask | show | jobs | submit login

> Tree data structures are really common in front-end.. like the DOM....

99.999% of front end developers do not solve those kind of problems.




Also there are font-end languages (XPath, CSS selectors, etc) specifically for these types of structures, so you don't have to traverse them.


Yeah, just pile on another layer of code you don't understand. And then wonder why it's slow or doesn't work the way you expect.


I know, so crazy, that's why Facebook was written in x86!

Fun fact: I'm lying.


Software developers always have to work on top of some sort of abstractions throughout our career, correct?


That doesn't mean you shouldn't have a reasonable understanding of what those abstractions are doing, though.


For the purpose of selecting a DOM node in a performant manner, you really don't need to know how CSS/XPath traverse the DOM. You just need to know that querySelector exists.

In general, I think it's enough to know what your abstraction does, rather than how it does it.


There's a huge difference between using an abstraction with vs. without understanding what it does. Often the latter leads to more layers of abstraction piled on top to "fix" the problem, until everything sorta works and is barely workable at the same time.


"All non-trivial abstractions, to some degree, are leaky."

https://en.wikipedia.org/wiki/Leaky_abstraction#The_Law_of_L...


It's build on top of the abstractions; not depend on someone else's implementation of all the abstractions...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: