From my experience working with people learning programming, many students have a fear of linked list and trees. They buy coding books and practice problem sets about linked list and trees.
Little do they know (a few years down the road), most of them will get work experience and complain that nobody uses linked list and trees. Heck, when a problem presents itself where linked list might be a great solution, they probably won't think to use it.
I think that this system of constantly bringing up linked lists, stacks, and queues for data structure is broken. A better format for teaching data structures would be to train the student's ability to come up with the right data structure for the problem they are solving. The ability to come up with solutions specific to a problem is the real skill and this skill will empower engineers come up with stacks, queues, linked lists when they need it.
Here's how I would teach data structures:
Ask student:
1. Let's say you want to build an elevator system. What classes would you need, and what properties / methods would each of them have?
2. You need to build a restaurant game. What classes would you need, and what properties / methods would each of them have?
+ a list of many other questions
Follow up to each of these questions would be for students to implement their data structures with provided assets to see their implementation come to life. Throw in firebase (realtime db) so students can interact with each other's games helps them see flaws in their implementation / data structure design. Its a great data structure + application development practice.
I think that your method for teaching data structures wouldn't work in practice. I don't think many students can arrive at such data structures on their own. How many students can you expect to come up with the implementation for a dictionary who have only ever heard of and used lists and arrays?
The analogy in math would be to expect students to derive the pythagorean theorem from scratch. Not only would this be a difficult task for most newbie mathies, you would also have a significantly smaller proportion of students arriving at the formula than by conventional means. It would be much more effective and efficient for a larger demographic of learners to show them the formula, explain how it's derived, and have them then apply it over multiple examples.
I see where you are coming from, pythagorean theorem is a bit of a stretch. Here's one:
First you teach someone how to carve wood and basic physic. Then you give them different hypotheticals and have them build things that solve these problems. This helps them really understand the problem and how to solve different problems using their skillset. With this, they will be able to build what they need (boats, house, tables, chairs, etc.). Conversely, if you teach a student how to build a boat over and over again, I doubt they would be able to build a house.
Fundamentals: Classes, arrays, objects
Everything else is derived. Linked lists, trees, are not fundamentals.
Again, this is just my observations and I wanted to share.
I see where you're coming from there. It's basically a corollary of a recent topic on HN, which was that you in practice rarely encounter a problem that requires you to do anything algorithmically interesting. But then again, if you do, how would you have any idea of how to work on a graph if you couldn't even do a linked list?
I believe that students should work on the ability to come up with data structures that solves different sets of real life problems, and get good at it. If they can do that, then they should be able to easily implement a linked list or graph when they need to.
I think that understanding how common data structures are implemented is a worthy endeavour to understanding the foundations of your craft. There will also be a (very small?) subset of developers who really need to understand them well because performance and optimization is their everyday job.
But I get very frustrated whenever I see an argument for learning them like this one: "...knowing how to implement these data structures will give you a huge edge in your developer job search..."
This is what makes me worried/frustrated about the prospect of interviewing for a future software engineering job: the worry that they'll ask me programming trivia and miss the point that I'm kick-ass at my job and bring great bottom-line value to the company I work at.
On another note, I was playing Human Resource Machine recently and on one puzzle I said to myself, "this is a linked list!" having learned about it from an MIT lecture I watched at bedtime months before. Very satisfying nerd-validation.
A developer who knows the basics will have less chances of doing stupid mistakes when dealing with algorithms. Data structures are the bread and butter of coding.
Like all things, if you want to make a high building, you better have a strong base.
Now it's true that the grunt of a programmer's work won't be such a problem, especially since there is a need for more coders out there.
But still, I'd still prefer being conservative and be sure any average coder (even more so for an engineer) knows about some data structures.
I still vividly remember that time some student argued that vectors and lists were about the same thing.
I have to share, I've had a long day. I read the headline and clicked through with a bizarre mental image that I was going to find some mechanism by which pull ups, squats and pushups would allow me to understand red-black trees and bloom filters.
Little do they know (a few years down the road), most of them will get work experience and complain that nobody uses linked list and trees. Heck, when a problem presents itself where linked list might be a great solution, they probably won't think to use it.
I think that this system of constantly bringing up linked lists, stacks, and queues for data structure is broken. A better format for teaching data structures would be to train the student's ability to come up with the right data structure for the problem they are solving. The ability to come up with solutions specific to a problem is the real skill and this skill will empower engineers come up with stacks, queues, linked lists when they need it.
Here's how I would teach data structures:
Ask student: 1. Let's say you want to build an elevator system. What classes would you need, and what properties / methods would each of them have?
2. You need to build a restaurant game. What classes would you need, and what properties / methods would each of them have?
+ a list of many other questions
Follow up to each of these questions would be for students to implement their data structures with provided assets to see their implementation come to life. Throw in firebase (realtime db) so students can interact with each other's games helps them see flaws in their implementation / data structure design. Its a great data structure + application development practice.