Ian Hays: Building a MultiDictionary Collection for .NET

Download this episode

Download Video

Description

Here, we meet Ian Hays, a Summer Intern on the Developer Division's .NET BCL team. Ian wants to be a professional software developer when he graduates from college, so having the opportunity to be a Microsoft SDE for the Summer has been a great way for Ian to learn some of the ins and outs of professional development. Of course, the best way to be a dev is to dev and that's exactly what Ian has been up to. He designed and implemented an experimental .NET collection type, MultiDictionary, which is something many .NET developers out there have requested - in fact, it ranks among the top requests for additions to the BCL. What is it? MultiDictionary is a generic dictionary that associates a single key with one or more values. Values can be added and removed independently. We dig into Ian's implementation, learn some history, his approach to design and quality, and much more.

Joining Ian in this conversation is .NET Program Manager and long time Niner Immo Landwerth and .NET SDE Matt Cohn, who was Ian's mentor this summer and helped Ian through the process of designing, implementing, testing and shipping his collection type.

As always, we bob and weave, ride tandem with the random, you know - we have a conversation that builds itself up in real time... Enjoy. Learn. Build.


Resources:

Learn about (then get...) the NuGet package that contains the experimental MultiDictionary type.

Read Immo's blog post.

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Trillian

      This one got sidetracked quite a bit. I expected more discussion about trade-offs of the implementation: building upon Dictionary vs reimplementing the hash table, different types of value collections (list, set), usage of value types to avoid garbage, introduction of a new IMultiDictionary/IReadOnlyMultiDictionary interface, etc. Also, I don't know if I missed the secret signal that prevented Charles from asking what the second collection being worked on is, but it would have been nice to know!

      A fellow (ex-)intern :)

    • User profile image
      Charles

      @Trillian: Fair enough. I don't do this that much these days, so blame it on some rust. Those are excellent questions. However, this isn't a Going Deep and the idea was to chat with an Intern about something cool he had made. That said, I suspect Ian can answer your questions right here on this thread!

    • User profile image
      shaggygi

      Rusty C, I'm still waiting on another Bart De Smet interview.  Hopefully soon?

    • User profile image
      Charles

      @shaggygi: Still waiting on approval for the Cortana Rx deep dive.

      C

    • User profile image
      pnewhook

      Can we just point out how fantastic it is that there's an arrow on the whiteboard with the label 'Intern'

    • User profile image
      Blue Ink

      , pnewhook wrote

      Can we just point out how fantastic it is that there's an arrow on the whiteboard with the label 'Intern'

      In some places, that would be a null pointer.

    • User profile image
      Joseph N Musser II

      I'm curious about 1) Linked list items instead of List collection, and 2) merging actual values (rather than collection objects) up into the hash table.

    • User profile image
      terrajobst

      , pnewhook wrote

      Can we just point out how fantastic it is that there's an arrow on the whiteboard with the label 'Intern'

      Your comment totally made my day :)

    • User profile image
      Proton2

      The "Green House Effect" was mentioned in this video. Green House gases make the planet 30 C warmer than it otherwise would be. 95% of the "green house effect" is due to water vapor, a green house gas. When it comes to CO2 and its effect, the pre-industrial level of about 280 ppm is of course a natural effect, by which I mean the extra warming that quantity of CO2 causes has nothing to do with humans.

      Charles, you took some math I understand in your college or university training, so you know what Logarithm means. CO2 has a logarithmic function to its warming effect. That is why in climate science the terms "doubling of CO2" is used, to express this logarithmic function a little bit easier.

      The Intergovernmental Panel on Climate Change (IPPC) says doubling CO2 causes about 1 C of warming, but feedbacks kick in to cause 3 C of warming. My nearly 5 years of research informs me that this feedback either doesn't exist or is very low. My other problem with IPCC's position that CO2 is the control knob on climate is that in the past there was CO2 levels of 7,000 ppm with global temperatures colder than they are today at 400 ppm.

      I notice the day after I watched this video, the forecast for the high for Seattle was 67F or so.

      My question to you Charles is, what year is Seattle  going to have Santa Barbara climate?

    • User profile image
      Charles

      @Proton2: Wow. That's excellent listening, Proton :) It was a quip regarding Seattle's warm Summer this year (minus the past week, but it's warming back up again as I type...). I believe the discussion of the Greenhouse Effect lasted for a sentence or two, mostly in passing based on Ian's stated experience with the sunny warm weather we've been enjoying in Seattle during his internship... Not worth much serious discussion on this thread. Indeed, I'm well aware of orders of magnitude scaling...

      Hope you enjoyed the discussion that was a bit more serious in nature (accounting for 99% of the conversation's volume) and completely unrelated to the Greenhouse Effect. I believe this topic has many posts dedicated to it in the Coffeehouse, where it belongs.

      C

    • User profile image
      JohnAskew

      , Blue Ink wrote

      Can we just point out how fantastic it is that there's an arrow on the whiteboard with the label 'Intern'

      , Blue Ink wrote

      In some places, that would be a null pointer.

      I can't decide what is better, the serve or the volley!

      +2

    • User profile image
      iPavlu

      Bah, everybody is a climate change pro. these days...

      It is not question, whether in past there was CO2 higher and over all
      temperatures lower and now it is CO2 lower and temmperatures higher.

      It is completely missing the point what climate research is about,
      because it is complex nonlinear system with nonlinear loosely coupled
      subsystems and as such, it is hard to predict it, but easy to triger
      changes with silly things like turning millions of years of CO2 deposits
      into atmosphere in last hundreds years...

      It is simple like this:
      1) If you think, that we do not know about climate change enough?
      2) If you think, that we do not know about interaction of climate and sea currents enough?
      3) If you think, that we do not know how whole system would react on changes?

      Then the no brainer answer is: Tread lightly man!

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.