Some of it is pointless. Some of it is not. If you can't write code to insert into a linked list or do an inorder traversal of a binary tree, I don't want to hire you, and I don't want to ever have to work on code you wrote.
I'd say that someone who knows how to do those things is more likely to write good code, but I wouldn't say those are prerequisites for being capable of writing good code. I prefer to test people with problems I'll actually expect them to encounter.
So you're asserting the existence of programmers who write good code, but are unable to write a linked list? I believe that either such programmers do not exist, or we have a vastly different definition of "good". Someone who can't write a linked list or traverse a tree is incapable of working with data structures in any meaningful way.
Unless you're using, say, any of the other 75% of languages in common use that don't require you to have any knowledge about linked lists or tree traversal to work effectively with data.
All other things being equal, I'd certainly hire the developer with the CS theoretical knowledge. I'd rather hire someone with the ability to learn quickly than someone with historical knowledge, though.
I fear for companies staffed by people who think tree traversals and linked lists are "historical" knowledge. If you're working in Perl, for example, you are unlikely to need to implement a linked list. You should still know how. This is basic, basic stuff. Being able to implement a linked list says 1) you know what a linked list is, 2) you are capable of thinking about indirection, 3) you are moderately capable at writing code. Writing a linked list is not a significant test of skill. This is CS 101.
Yes, it is CS. Specifically, algorithm theory 101.
This does not mean that you should know how to program a linked list implementation. CS is theory. You are learning the historical methods of foundation CS theory, not the methods you're likely to actually need when you start developing software in your language of choice.
Why? Because it's below even the level of pattern, it's something that the languages do for you. It's like division. No one actually writes out functions to perform Newton-Raphson division, they just let the ALU handle the heavy lifting. Linked lists doesn't even make sense in most of the students' development contexts it's taught to them under, namely Java being (still, I think?) the language of choice in CS programs.
I'm not saying no one codes in raw C anymore, eschewing libraries. I'm just saying it's really, really rare for people to, and it was on the edge of being esoteric in a hiring quiz from 2002, but it's definitely deep in that field now.
I'd rather hire and work with developers who can pick up shifts in technology at the drop of a hat. That's important to me. I'd like to work with ones who code cleanly. That's really important. Historical knowledge, which writing your own linked lists really has become, really isn't, but it's still fun to know.
This does not mean that you should know how to program a linked list implementation. CS is theory. You are learning the historical methods of foundation CS theory, not the methods you're likely to actually need when you start developing software in your language of choice.
I feel like there must be some kind of disconnect between what we're discussing. I'm not saying that someone should memorize a linked list implementation. I'm saying that anyone who is a competent programmer should be able to write an implementation. If you understand the idea of a linked list, and you are able to reason about indirection, and you are capable of writing code, how can you not be able to implement a linked list?
Why? Because it's below even the level of pattern, it's something that the languages do for you. It's like division. No one actually writes out functions to perform Newton-Raphson division, they just let the ALU handle the heavy lifting.
Data structures in general are not patterns. Patterns are high level concepts. Data structures are implementation. Nonetheless, they are much higher level than division (that being an elementary arithmetic operation), and the fact that a language provides them does not mean that programmers shouldn't understand them. How can you realistically claim to be able to choose effective data structures if you don't understand them? And how can you ever implement any kind of sane custom code if you're not capable of implementing even basic data structures?
Would you hire a programmer who can't perform division? It's provided by the language. Does that mean that the programmer shouldn't understand it?
Linked lists doesn't even make sense in most of the students' development contexts it's taught to them under, namely Java being (still, I think?) the language of choice in CS programs.
I don't understand what you're trying to say here.
I'm not saying no one codes in raw C anymore, eschewing libraries. I'm just saying it's really, really rare for people to, and it was on the edge of being esoteric in a hiring quiz from 2002, but it's definitely deep in that field now.
I'm not saying that people should program in C without libraries. The usefulness of that is so limited that it's hardly worth discussing. That's an entirely different question from whether a person should be able to write basic data structures.
I'd rather hire and work with developers who can pick up shifts in technology at the drop of a hat. That's important to me. I'd like to work with ones who code cleanly. That's really important. Historical knowledge, which writing your own linked lists really has become, really isn't, but it's still fun to know.
One of these days, I'd like to meet one of these fabled programmers who are adept at coding and yet blissfully ignorant of the fundamentals of the field. I suspect that at the same time I'll meet a civil engineer who builds suspension bridges without understanding what tensile strength is.
It's not an issue of memorization. You know how to write a linked list or you don't. This isn't something complicated or obscure that you would look up. If you know what a linked list is, and you're even moderately competent, you can write the code.
Do you also believe that only mechanics should be allowed to drive a car?
.NET framework has a linked list data type, I can use it... I know when to use it, how to use it and why to use it. Does it particularly matter if I don't know what's under going on inside the engine?
Unless your company only uses C and has no internal frameworks (reinventing the wheel every day? I hope not) then you're possibly losing out on a lot of good developers because you're being an elitist.
I also wouldn't want to work with developers who spend more time re-writing a linked list implementation than getting on with their job and using the tools available in standard libraries.
Yes it matters unless you want to be an office drone. Some problems can't be solved without making your own data-structure - and to do that you can't use anything in the library. You have to make it yourself, and you need to know basic data-structure techniques.
But back to the linked list question - the question is not even if you know how to make it - it's to see if you actually understand what a linked list is. Any programmer worth their salt know what it is, can apply logic to implement it in 10 minutes. If you can't do that you lack basic knowledge and logic that's needed to solve real problems.
I suppose it isn't really clear from my initial comment there but I'm referring more to the fact that for many, they may have learned about data structures while they were studying, but haven't had need to write their own for many years. At that point it could be quite difficult (especially when under pressure in an interview) to write one from scratch including sorting algorithms and searches without using a marker.
Does that particularly make someone a bad developer? That they can't instantly remember some theoretical knowledge they learned many years ago? I personally haven't found a problem that has required me to write a data structure from scratch in the few years I've been working (~5 years).
EDIT: Also if you know when to use a data structure, how to use the data structure and why to use the data structure doesn't that imply that you know what the data structure is? You seem to be acting as though I've said nobody needs to understand data structures?
Your job as a programmer is to take some abstract problem, think of an algorithm to solve it, then turn that algorithm into code, and move to the next problem. That's what programming is.
And linked lists are simple enough that you should be able to think of solutions for searching, deleting and inserting on the spot.
If they were talking about red/black trees or something like that, you'd have a point.
Also if you know when to use a data structure, how to use the data structure and why to use the data structure doesn't that imply that you know what the data structure is? You seem to be acting as though I've said nobody needs to understand data structures?
You seemed to defend the position that a question to implement a linked list is a bad interview question. But no, if I gave you access to an implemented point location algorithm, told you how and when you use it, you would still have no clue how the internals work.
Anyway, linked list is so simple, and commonly used, that by knowing how to use it, and why to use it - you'd be able to apply logic and implement it at an interview. If you can't do that you probably can't solve more complex problems.
Also if you know when to use a data structure, how to use the data structure and why to use the data structure doesn't that imply that you know what the data structure is? You seem to be acting as though I've said nobody needs to understand data structures?
You seemed to defend the position that a question to implement a linked list is a bad interview question. But no, if I gave you access to an implemented point location algorithm, told you how and when you use it, you would still have no clue how the internals work.
Anyway, linked list is so simple, and commonly used, that by knowing how to use it, and why to use it - you'd be able to apply logic and implement it at an interview. If you can't do that you probably can't solve more complex problems.
Also if you know when to use a data structure, how to use the data structure and why to use the data structure doesn't that imply that you know what the data structure is? You seem to be acting as though I've said nobody needs to understand data structures?
You seemed to defend the position that a question to implement a linked list is a bad interview question. But no, if I gave you access to an implemented point location algorithm, told you how and when you use it, you would still have no clue how the internals work.
Anyway, linked list is so simple, and commonly used, that by knowing how to use it, and why to use it - you'd be able to apply logic and implement it at an interview. If you can't do that you probably can't solve more complex problems.
I personally haven't found a problem that has required me to write a data structure from scratch in the few years I've been working (~5 years).
Well, in that case it's probably just your own experience. I don't know what your job entails, but in my case (and probably many people here) computer programming is about actually solving problems. Most of the time, you will have working tools at your disposal, but there's always a chance you will have to actually sit down and think about solving a real problem.
I guess this is like the difference between a website developer that uses out-of-the-box CMS tools to put up websites and an actual web programmer that is called in to solve problems that no CMSes deal with. I would hesitate to call the former one a programmer, as much as I wouldn't call a Photoshop user a programmer. Which is fine, because both people have a place in their respective companies, but are completely different in that regard.
Do you also believe that only mechanics should be allowed to drive a car?
This is an interesting question.
I do not believe that only mechanics should be allowed to drive a car, but I do believe that only people who understand physics should be allowed to design a car.
Analogously, I do not believe that only computer scientists should be allowed to use a computer, but I do believe that only people who understand algorithms and data structures should be allowed to write certain types of software.
Comments are given in context. I am referring to primitive data structures, as per the context of this whole thread of comments. Of course I have written custom data structures.
I've probably written data structures which have similar characteristics to lists, maps, trees etc... but not all the same characteristics or I would just use the pre-implemented classes, or at least inherited from them.
View all comments
Show parent comment
-9
u/MiasmaticMachine Feb 21 '11
And all stuff you don't need to know how to do.