3 ms·
> Why shouldn't a "senior" developer know what a binary tree is? Because it's not about binary trees. You could as well ask why a "senior" developer shouldn't
by sdevonoes 4y ago
> Why shouldn't a "senior" developer know what a binary tree is?
Because it's not about binary trees. You could as well ask why a "senior" developer shouldn't know what:
- a TLB is
- a Trie is
- UDP is
- consistent hashing is
- the CAP theorem is about
- NFS is
- BFS is
- and a large etc.
As you can see, a question like "what a binary tree is" could easily be as well "what BFS is about". So, it's not about "senior" developers not knowing their stuff, but that there is so much to know about, that certain developers may know better about certain topics than others. For instance, I don't know by heart the algorithm for inverting a tree; sure, I can give it a try and may come up with a solution... but I'm sure a fresh grad student who has studied in the last semester how to inverted a binary tree, will come up with a solid algorithm faster than I can come up with my weak algorithm.
> I wouldn't want to hire someone who doesn't know about algorithms and data structures and thinks he can solve anything with Google.
Same can be said about not hiring someone who doesn't know the basics of Operating Systems (e.g., TLBs), or the basics of networking (UDP vs TCP), or the basics of distributing systems (e.g., CAP theorem, distributed transactions)...
I'm not saying "There is too much to learn about! Please don't ask me anything!", I'm saying that at a given point in time, any experienced developer can provide a poor algorithm (and so fail the interview) to invert a binary tree.
- charcircuit 4y agoEven an entry level developer should know those things at least at a surface level since they are taught at university. Regardless in interviews you are not required to know what a binary tree is. Your interviewer will be able to define it for you.
- ipaddr 4y agoWhy assume developers all come from cs programs and filter for only those candidates? When I went to college I got to work on a mainframe. I'm not going to assume everyone did and start asking JCL questions.
- charcircuit 4y agoNothing is stopping you from learning these topics on your own. In fact the vast majority of these topics I learned about on my own before encountering them in university. The problem with asking mainframe questions is that they aren't as relevant in today's landscape. Meanwhile TLB is relevant for performance, UDP is a very common network protocol, consistent hashing is relevant for designing distributed systems, etc. Especially if you are just self teaching yourself you aren't going run into a chance to work on a mainframe unless maybe you use a mainframe emulator, but why?
- abecedarius 4y agoWhat "inverting" a tree means isn't super clear, but the last time this came up on HN it meant reflecting left to right -- right? So the question tests if you can write code dealing with recursive data structures at all. To me it's strange to think of this as a niche concern and not something you may do every day.
- charcircuit 4y agoYes, it means that for every node the right child becomes the left child and the left child becomes the right child.
- DeathArrow 4y ago>Because it's not about binary trees. You could as well ask why a "senior" developer shouldn't know what: - a TLB is - a Trie is - UDP is - consistent hashing is - the CAP theorem is about - NFS is - BFS is I would feel embarrassed if I were a mid level developer if I didn't know what you mentioned. Many of those concepts I've learned in University as a CS student. It would be unthinkable for me to for a a senior developer or engineer to not know basic CS concepts. Not knowing advanced concepts and very new techniques is ok, but the basics and the foundations of CS? As for why you need to know those, it's pretty simple: you will need those in your day to day job to make software design decisions, systems design decisions, come up fast with decent solutions to various problems you encounter, as you won't have time to ask a question on Stack Overflow for anything non trivial. >For instance, I don't know by heart the algorithm for inverting a tree; sure, I can give it a try and may come up with a solution... As an interviewer, that is all what I want from you. Show me you can come with a decent solution in a decent amount of time. >I'm saying that at a given point in time, any experienced developer can provide a poor algorithm (and so fail the interview) to invert a binary tree. I wouldn't consider to fail the interview for failing to invert a binary tree, provided you know what a binary tree is and you give it a decent try. Also there won't be questions only about CS concepts, but also on language, frameworks, tools, libraries, databases, architectural strategies, systems design and so on. So the overall knowledge matters. But what am I supposed to say to a guy fresh out of college who applied for a C# developer role and did not know what a class is? "Our developers will take time of implementing business requirements and teach you what you didn't learn in school and software development on top?" I am afraid my boss would not agree to us not responding to business needs in a fashionable time.