Computer Science: Remove Hash Map lesson and project
Checks
- [x] This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- [x] I have thoroughly read and understand The Odin Project Contributing Guide
- [ ] Would you like to work on this issue?
Describe your suggestion
There are a few issues I have with the current Hash Map content in the Computer Science course, and in light of them, I'm proposing that the content be removed.
- I'm wary of the Computer Science section being bloated. With recursion, linked lists, hash maps, binary search trees, and graph content via Knight Travails, there's a lot going on for a section of the curriculum that I think should be more of an introduction to DSA concepts than a deep dive. The hash map content presents the easiest thing to cut because I think it has the least value (discussed in the next two points).
- I've come to think that constructing a Hash Map from scratch fits weirdly with higher level languages like JavaScript and Ruby. There are a couple of issues (how the languages handle overflowing 64bit ints, how the languages handle indexing above an array's length) that make building a Hash Map from scratch awkward in a way they wouldn't be if we were teaching something like C. Or even languages like Java or C# that have explicit int types and statically sized arrays. Although I realize this is partially an anecdotal argument, I think these types of problems make the content confusing for our learners, leading to lots of trouble working through the project and lots of maintenance overhead dealing with issues on GitHub regarding the lesson and project.
- I think the content has low practical utility. Linked lists, recursion, binary search trees, and graph problems are well trod areas in "leetcode" type interview questions, even in working with higher level languages. I find it unlikely that JS or Ruby devs are asked to construct a Hash Map from scratch in interviews. If anything, I think they're much more likely to engage with problems that ask them to use the languages' builtin Hash Map types (Ruby's
Hash, JavaScript's object literals orMap) to solve problems where they're the right structure for the job. And the current content doesn't explore this.
Interested in people's thoughts on this (maintainer as well as learners who've worked through that lesson and project). Although I'm a maintainer on the DSA team, this isn't for sure going to happen, and I'm willing to be swayed into keeping the content around. I'm definitely curious to know if people find the content valuable or not.
Path
Ruby / Rails, Node / JS
Lesson Url
https://www.theodinproject.com/lessons/javascript-hashmap-data-structure
(Optional) Discord Name
No response
(Optional) Additional Comments
No response
Your point about lower utility resonates with me. I would be for trimming this bit of content.
Thanks for writing this up Josh! I'd be for dropping it as well. The point about it being awkward with the languages we teach, and the maintenance overhead from that does it for me!
I'd love to take this on!
Also yes, I was a learner with no DSA background when I did DSA. I did remember the DSA section feeling particularly long, although it was for sure interesting, espcially KT. My two cents is we can probably pull some leetcode easy questions for learners to try. That way, it stopped being about implementing something from scratch but more on problem solving and algorithmic thinking in general.
So yeah, depend on our final destination for this, I'd be glad to take those content away and replace with something new.
Removal makes sense to me given the points on practical value. Feels odd being made to make a hashmap using built-in hashmaps and not something that's really needed for our work. Conceptual awareness seems sufficient which is handled via the lesson and relating that to the built-in structures.
I agree removal makes sense as well. I thought it was particularly redundant while going through it because it makes more sense to use Ruby/Javascript builtins than implementing one from scratch. With that said, I think @ZackHoang made a good point, that learners would still benefit from learning about hashmaps/associative arrays, and how to use them to solve algorithmic problems. Overall I am in favour of replacement rather than removal, as knowledge of the data structure has benefits beyond learning about DSA just for the sake of computer science.
This issue is stale because it has had no activity for the last 30 days.
Hi, have we decided on how to best move forward with replacing this project? I'd love to tackle this if this is still worth addressing!
As for what can we replace this project with, Leetcode's Contains Duplicate problem might be suitable for learners at this stage (https://leetcode.com/problems/contains-duplicate/description/). I think the number one reason for this is that in order to solve this problem efficiently (which is order of N time), using Set will be necessary since retrieval time will be O(1) so we only need to move through the array once.
Let me know if this is a good replacement and I'll start working on a new lesson!
@ZackHoang I haven't completely made up my mind yet, and there is still some discussion I want to have around it before I decide. Thank you for volunteering though. I'd be glad to assign you if we decide to remove it.
I will say: I never said anything about replacing it, and if we do remove it, I have no intention of replacing it with anything else. If we decide to go forward on this, it'll likely just be a removal.
@ZackHoang I haven't completely made up my mind yet, and there is still some discussion I want to have around it before I decide. Thank you for volunteering though. I'd be glad to assign you if we decide to remove it.
I will say: I never said anything about replacing it, and if we do remove it, I have no intention of replacing it with anything else. If we decide to go forward on this, it'll likely just be a removal.
Understood. Though, is there any reason why we are removing this completely rather than finding a replacement?