Home > Lectures, Version 4 > Two Episodes on Sets

Two Episodes on Sets

I’ve just posted an introduction to sets in Python, and a brief look at how they’re implemented (which you need to know in order to understand why you can’t put a list in a set). The second of these has more theory in it than most of our episodes; I’d be grateful for feedback from non-computer scientists about how much sense it makes.

Categories: Lectures, Version 4 Tags:
  1. Joao
    July 9th, 2010 at 01:09 | #1

    I really like the lecture on the implementation of sets, very elucidating.

    I’d like to see it added to the lecture an explanation of how actual values are stored in sets, since hash functions are not invertible. Is it in a list which is not used for look-ups?

    Also, it would be great to provide some real world values for number of required operations and memory use for computations based on large sets, as a motivation of their use.

  2. July 9th, 2010 at 04:04 | #2

    The introduction is great.

    The implementation section is clear and communicates quite of a bit of interesting information in 10 minutes. However, in my opinion, for most of the target users of this course, this section is actually counterproductive. The problem is that most scientists (biologists at least) don’t care about how this works. They just want to know that sets are faster for a lot of tasks and that you have to use tuples instead of lists in them. I suspect that by taking 10 minutes for this lecture that you will frustrate/lose/alienate >80% of your target audience (again, this is my guess for biologists) and even most of the 20% that find this stuff interesting enough to actually enjoy it probably won’t retain much. Most folks taking this course will probably give you a few passes on overly theoretical information, but only a few. This just doesn’t seem like a good place to spend one of those. In my experience it is precisely this kind of material that results in scientists in other fields being reticent to take programming courses in computer science departments. The great thing about SC is that we can come here to learn how to drive the car, without learning how the carburetor works.

  3. July 9th, 2010 at 14:41 | #3

    Thanks for the feedback — it looks like I need to do another (shorter) version of the “storage” episode that doesn’t talk about hash tables in so much detail, but just says, “Set contents have to be constant, use tuples when you need to.” Still thinking about how to work the term “hash” in there (so that the error message is explainable)…

  1. July 8th, 2010 at 19:17 | #1