4 ms·
> Yes,I'd be fine with it as long as they could read and understand a table of data specifying the time and space complexity of various data structures and algo
by seanwilson 9y ago
> Yes,I'd be fine with it as long as they could read and understand a table of data specifying the time and space complexity of various data structures and algorithms.
I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your own algorithms and data structures.
> The amount of programming done in memory constrained apps and for large scale data is tiny in comparison to all programming, most of which is very basic CRUD type work meant for use in resource rich environments at small scale.
Those were just examples. I've seen plenty of cases of code for CRUD apps that had problems handling just a few 1000 records because the coder didn't understand memory usage and algorithmic complexity. I'd certainly want lead/senior developers to have this knowledge even if it's rare they have to step in to help in this area.
- lmm 9y ago> I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your own algorithms and data structures. But you so rarely want to implement a new algorithm or data structure. I suspect someone who knows how to implement a red-black tree is, all other things being equal (and I know all other things would not be in practice, but bear with me), worse for most programming jobs than someone who doesn't (but who knows what its performance characteristics are) - you'd never want a programmer to implement their own red-black tree, that's a maintenance nightmare even if they do it correctly, you'd want them to use the one from the standard library.
- nerdponx 9y agoThe analogy doesn't extend other fields, so I would be skeptical that it holds in computer science and software engineering. Consider, for instants, a data scientist who does great in Kaggle competitions but has a poor understanding of probability theory. That data scientist will not be able to estimate or control the error in their models effectively, and will not even know that there is a way to do so. You do not want to hire that data scientist for a senior role.
- lmm 9y agoSoftware development is the art of abstraction, and it works both ways. Do other industries have anything like the "not invented here" problem that software does?
- nerdponx 9y agoI can't speak for other industries necessarily, but I would suspect the answer is "yes". It's certainly rampant in all forms of social science academia. It's mercifully absent from professional data science in many places.
- seanwilson 9y agoYes, you should never be reimplementing something that's in a standard library and for what it's worth I would never expect an interview candidate to know how to implement a red-black tree. What I meant was that knowing core algorithms and data structures is important so you can recognise familiar problems so you avoid reinventing the wheel + you know where to look for answers. Maybe you have to use some clever combination of data structures to model your data efficiently. Maybe your data is actually a graph so now you can lean on graph algorithms. Maybe you just realised you're naive implementation to answer some question about your data has n^2 growth so now you can consider if a different data structure would help. Personally, I find people that have poor knowledge of data structures and algorithms are the ones that will reinvent the wheel the most as they don't know what exists already.
- lmm 9y agoWhat do you mean by "knowing core algorithms and data structures" then? Because for me that phrase would definitely include knowing how to implement your own red-black tree, hash table, linked list and so on.
- ubernostrum 9y agoBeing able to implement off the top of one's head is a skill that fades as soon as one is no longer required to do so. Requiring it as a criterion of hiring is, essentially, a back-door way of saying "we only hire people fresh out of college", since they're the ones who've recently been having to do this stuff on exams and have it fresh in their minds.
- seanwilson 9y ago> Being able to implement off the top of one's head is a skill that fades as soon as one is no longer required to do so. I haven't implemented a hash table, linked list, growable array or binary tree for years but know I could because I understand how they work and I select which one to use often while coding. I find it hard to understand how you could claim to know how those data structures work and not be able to implement them.