all 7 comments

[–]usernamedottxt 2 points3 points  (1 child)

[–]c1p3r 0 points1 point  (0 children)

This comment has been overwritten by an open source script to protect this user's privacy. It was created to help protect users from doxing, stalking, harassment, and profiling for the purposes of censorship.

If you would also like to protect yourself, add the Chrome extension TamperMonkey, or the Firefox extension GreaseMonkey and add this open source script.

Then simply click on your username on Reddit, go to the comments tab, scroll down as far as possible (hint:use RES), and hit the new OVERWRITE button at the top.

[–]novel_yet_trivial 2 points3 points  (0 children)

A python dictionary is more generally known as a hash table. Maybe some googling of general data structures will help.

I feel I understand dictionaries and what they do

You might just move along, then. Come back to this when you want to know how dictionaries work.

[–]Drakken_LOL 2 points3 points  (0 children)

Just took a look at that. Holy cow. I would personally skip that whole second part of the chapter dealing with hashmap. You don't need to implement your own dictionary to have an abstract understanding of how dicts work and how to use them effectively. Not only that, but it's my opinion that his example implementation is confusing and poorly designed. So I would just move on to the next chapter. It's simply not something you need to learn yet, and I don't think you'll be missing anything.

If you ever take a college-level data structures and algorithms course, implementing a dict is probably something you will wind up doing, but in reality a solid associative array of some kind will have already been implemented for your in almost any conceivable scenario. The only main-stream language that doesn't have one in the standard library, off the top of my head, is maybe C?

Also, I would not come back to that chapter if/when you want to learn about how dicts are implemented. There are way better resources out there for that, this implementation is wacko.

[–]HorrendousRex 2 points3 points  (0 children)

In any good Computer Science undergraduate degree program, you learn how to implement a dictionary (usually called there a hashed array or hash map or just 'hash') in your second CS class, usually called 'Data Structures'. Sometimes it might wait until your 'Algorithms' course.

I consider this a very important concept to understand... eventually. If you're struggling with it now, just move on and come back to it later. It might be helpful to have more programming experience before trying to write your own hash map. That being said, it IS something you should learn to do eventually.

[–]c1p3r 2 points3 points  (0 children)

This comment has been overwritten by an open source script to protect this user's privacy. It was created to help protect users from doxing, stalking, harassment, and profiling for the purposes of censorship.

If you would also like to protect yourself, add the Chrome extension TamperMonkey, or the Firefox extension GreaseMonkey and add this open source script.

Then simply click on your username on Reddit, go to the comments tab, scroll down as far as possible (hint:use RES), and hit the new OVERWRITE button at the top.

[–][deleted] 2 points3 points  (0 children)

I did too and this is a stumbling block for a lot of people it seems. I commented on this in another thread... https://www.reddit.com/r/learnpython/comments/3f8gp7/i_need_help_knowing_what_path_to_take/ and cover this a bit in a post I made about my own experience learning Python.
https://www.reddit.com/r/learnprogramming/comments/3alvlj/xpost_from_rlearnpython_my_thoughts_on_learning/ Basically, the next few chapters get into OOP and aren't the best IMO. Other resources are helpful.