Description

We're kicking off a new season with a brand new topic: hash tables! This episode is full of bookshelves, pizza toppings, and helpful fridge operators who are teaming up to give you the most gentle (and the most fun) introduction to the world of hash tables.

Show Notes

This episode of the Basecs podcast is based on Vaidehi's blog post, Taking Hash Tables Off The Shelf from her basecs blog series.

Transcript

[00:00:00] SY: (Music) Welcome to the Basecs podcast, where we explore the basics of computer science concepts. I'm your host, Saron, founder of CodeNewbie.

[00:00:09] VJ: And I'm Vaidehi Joshi, author and developer.

[00:00:12] SY: And she is the brilliant mind behind the basecs blog series. Today we're talking about...

[00:00:17] VJ: Hash tables.

[00:00:19] SY: This season of the Basecs podcast is brought to you by our wonderful friends at Twilio. If you haven't checked out their API yet, you totally should. With Twilio, your app can send text messages and make phone calls with just five lines of code. And for a lot of developers, Twilio is the first API they've ever used. And that first time you type a few lines of code, run your program and see your phone light up with the text message? It's kind of magical. And as a thank you for being a podcast listener, you get a promo code for twenty dollars in free Twilio credit. Just text your name to 480-485-4321. You'll also get a link to a quick start guide for your favorite programming language. So text 480-485-4321. Link to that is in your show notes.

[00:01:07] DigitalOcean provides the easiest cloud platform to deploy, manage and scale applications of any size. They remove infrastructure friction and provide predictability so you can spend more time building what you love. Try DigitalOcean for free by going to do.co/codenewbie and get $100 of infrastructure credit. Link is in your show notes. Ok. Let's get started.

[00:01:33] SY: Ok, so let's start right the very, very tippy top. What is a hash table?

[00:01:39] VJ: Well a hash table is actually—it's a data structure but...

[00:01:45] SY: Ok.

[00:01:45] VJ: ...it is actually two little moving parts working together at once. It's, it's very cool because the two parts that make up a hash table are things that we actually know, we're familiar with. A hash table has one part where you can contain data because it is a data structure. It holds data. And that is an array...

[00:02:06] SY: Oh. I know those.

[00:02:06] VJ: ...which we know and love. Yeah.

[00:02:08] SY: Yeah.

[00:02:08] VJ: Good old arrays. So that's one distinct part of a hash table. And then the other part is something called a hash function. And it's very closely related to the array. So a hash table is a combination of a array structure and a hash function.

[00:02:25] SY: Ok. So arrays we know. We've dealt with those before. Those are pretty cool. This hash function thingy however...

[00:02:34] VJ: New kid on the block.

[00:02:35] SY: Yeah, yeah kind of. Well also just this idea that a data structure has a function attached to it is, is kind of interesting. I don't think we've encountered that before, have we?

[00:02:45] VJ: No, we haven't. Yeah, this is—yeah, totally new.

[00:02:48] SY: Yeah, so why...

[00:02:49] VJ: I just, I just threw it in there. (Laughing) I was like yeah, it's a function. Why are you surprised? And you're like wait. Wait.

[00:02:54] SY: We've never done that before. So why, you know, we've done arrays before. Why do we need a function to come with our array?

[00:03:02] VJ: So as I mentioned, the array holds the data. It's gonna hold our data as, as it is a data structure. But the interesting thing about hash tables is you don't just put data in there willy nilly, and that's where this hash function comes in. And actually as a quick aside, we know arrays and hash functions are new, but they're actually just algorithms. Here's just yet another algorithm that we're going to talk about. Some more algorithms a little algorithm right on top for ya. (Laughing) But anyway, sorry. I digress. I guess where I was going with this is that we do need an array to contain the data and because we can't just put data in willy nilly because this is a hash table that we're dealing with. It's very sophisticated. We need the hash function to tell us where our data is going to go. We use the hash function to more or less determine where our data lives. We know it will live in the array, but where in the array? Well that's a question that only the hash function can answer.

[00:04:04] SY: So I have this array where I just stick things at the end, right? I start zero. If one is open, I put it at one. Next thing is two. Two is open, put it at two and so on and so forth. So pretty simple, pretty straightforward data inputting process. Why do I need a whole algorithm to tell me where to put stuff?

[00:04:25] VJ: Well before I even get into the answer about why you need an algorithm, I just wanna ask you like say you have this array, and then one day—you know, you put it away and you don't really think about it. And then later on you're just like, "oh, wait. I need something from my array. What's your plan?

[00:04:42] SY: Well okay so...

[00:04:43] VJ: How are you gonna find it? (Laughing)

[00:04:45] SY: I feel like whatever my answer is is not the right answer, but—well if it was a, a regular array I, I guess I would, I would kinda only have one way to really do it. I'd have to start at the beginning, right? Assuming I don't know its index. I don't know where it's located. If I was finding it, I'd start from zero and just work my way up.

[00:05:05] VJ: Yeah. You, you pretty much just have to search through the array. And this is actually true for another data structure called a linked list, which we've talked about in previous seasons. If you don't know the index, and you are just like I'm gonna iterate through until I find the thing that is, you know, the thing that I want, now you're searching through everything to look for one item. And there's actually a Big O notation term that we use for that. Do you remember what that is?

[00:05:31] SY: Ok, so Big O notation we talked about how it is looking at the worst-case scenario that might happen. So if I have an array, I know I have to go through every single one until I get to the one I'm looking for. The worst-case scenario is that it's the very last thing I put in because I'm starting at the beginning. So my Big O notation would be N?

[00:05:58] VJ: Yes, it would be O(N).

[00:06:00] SY: O(N), yeah.

[00:06:01] VJ: So where we could say N is the number of items in your array, and if you didn't have any order to them you just put them all in willy nilly, then it would take O(N) time in the worst case to look through everything to find the item you want, which just happens to be at the end.

[00:06:17] SY: Ok, so if I have—I'm trying to think of, you know, the last array that I wrote or, or dealt with—it's not that many items, you know? Maybe it's like five or six things. I got my list of pizza toppings. I don't know. I can't remember the last time I had pizza. I don't know why I said that one. (Laughing) But, you know, like I just—this is my, my little fun list, but I feel like when we're talking about it being a problem that, you know, that O(N) being an issue, we're talking about like if we have like a million things.

[00:06:46] VJ: Yeah.

[00:06:46] SY: Then that would probably really suck.

[00:06:48] VJ: Yeah. It doesn't scale very well. Like the more things you have...

[00:06:51] SY: Yeah.

[00:06:52] VJ: ...like it's gonna get as annoying as your list grows basically. (Laughing)

[00:06:56] SY: Yeah.

[00:06:57] VJ: Big O notation. How annoying is this going to be?

[00:06:58] SY: The more pizza toppings. Yeah. Ok. Cool. So that problem is supposedly solved by this new element thingy called the hash function. So how does the hash function help us deal with huge data sets where I have a million pizza toppings?

[00:07:21] VJ: Well the hash function basically helps us create a little bit of a mapping. And so what I mean by that is it helps us take out the logic of deciding where to put items into the array. So instead of us just being like well I guess I'll just put at the end. I'll just stick it in there, and then I don't really have order, an order to this, so hopefully I’m not looking for the last thing. Good luck, future me. (Laughing) Exactly. Um, is really trying to make that part of dealing with a large data set or even just a small data set that much easier. So what a hash function does—when you couple it with an array, it takes any type of input. So let's just say it's an array of various items—your pizza topping, for example. It takes an input. And let's say for now it's magic. It's not magic, but let's just say right now it's magical.

[00:08:17] SY: I'm cool with some magic. Yeah.

[00:08:18] VJ: Yeah. Add some sprinkles in there. (Laughing) The hash function just magically takes in this input, takes in your pizza topping, and it's like I'm gonna tell you where to put it. And you just listen to me. And wherever I tell you to put it, you go put it there. And that's basically what the hash function's job is. Its, its job is to calculate where that item—where your pizza toppings—should live inside the hash table, which is just your array. And it tells you, "this is where you should go put this pizza topping. I have determined this is where it should live." And the hash function is actually helping you out because its magic—which is really just an algorithm—is that it's determining where's the best place for this item to live in the array so that it's evenly distributed, and it's kind of like randomly put into places that you can quickly go retrieve them later without having to iterate through the whole array.

[00:09:12] SY: Wait, but how, how does it telling me where to put things help me get it out faster?

[00:09:22] VJ: Well your hash function is the magical thing that told you where to put something in the array. So it is also the magical thing that will know where everything is in respect to your array. So that means if you're kind of offloading the work of deciding where to put the item in your array to the hash function, then you can also just lean on the hash function and be like, "hey, I don't know where I put this thing. I forgot. It was a while ago. Can you tell me where it is?" And it's like with little machine that's like, "no worries. I know where it is. You told me you wanted pepperoni. I told you where to put the pepperoni when you put it in. Now I'll tell you where the pepperoni lives 'cause I know how to figure it out 'cause I have this little magical algorithm inside of me."

[00:10:04] SY: Ok, cool. So it's like—it has the secret key to figure out where on the topping shelf—I'm trying to do this pizza thing. It's, it's getting a little... (Laughing) But it, but it is, right? It's kind of like ok, if I have, you know, a fridge full of all these pizza options, and I say like I'm not just gonna stick...

[00:10:27] VJ: I like this metaphor. It's good.

[00:10:29] SY: Right? Y’see I, I wasn't sure if it was gonna work out...

[00:10:32] VJ: The fridge. Great.

[00:10:32] SY: ...but I'm kind of excited. Fridge, right? Yeah. And, and I'm like I don't know where to put this pizza topping. If you leave it up to me, I'll just stick pizza toppings on the end. And then later on, I have to go through every single part of the fridge to figure out...

[00:10:43] VJ: Not great.

[00:10:44] SY: …where I put that pizza topping. (Laughing)

[00:10:45] VJ: You're gonna forget about the basil man. (Laughing) Then it's gonna go bad, and you'll forget the basil.

[00:10:49] SY: So expensive.

[00:10:50] VJ: Anyways.

[00:10:51] SY: It is. It is expensive. And so instead, I'm saying, "hey fridge operator," my, which is my hash function, I'm gonna say, "I'm gonna give you this pepperoni. You figure out where to put it." And then the fridge operator's like, "don't worry. I got you. I'm gonna put this pepperoni somewhere safe."

[00:11:09] VJ: I got you.

[00:11:10] SY: And I don't even know where it is, and I really don't care. But when it's time for me to get that awesome pepperoni, then I can say, "hey fridge operator, where is it?" And it uses its whatever little magical system thingy to go find it much quicker than it would for me to go through the fridge myself and try and find it.

[00:11:28] VJ: Exactly.

[00:11:29] SY: Is that the idea?

[00:11:29] VJ: Yes. That's, that's a great—yeah, that's a great...

[00:11:31] SY: Neat.

[00:11:32] VJ: ...way of summarizing like hashing functions. And that's, that's the...

[00:11:34] SY: Neat.

[00:11:34] VJ: ...important bit. It's not just you and the fridge. It's you and the fridge, the array and the fridge operator, the hashing function.

[00:11:42] SY: Yeah.

[00:11:42] VJ: And that's a hash table.

[00:11:45] SY: Ok, so where is it putting my pepperoni? That would be a good title for this episode, by the way. Where is my pepperoni? (Laughing) But, but where is it putting it? Is it at an index? Is it—I'm assuming it's not a fridge shelf.

[00:12:00] VJ: Well you could imagine...

[00:12:01] SY: Like where...

[00:12:01] VJ: You could imagine the fridge shelves are labeled as indexes or indices.

[00:12:05] SY: Oh.

[00:12:05] VJ: And it is just putting it into a, a little slot in the array, which are often called buckets, hash buckets.

[00:12:11] SY: Oh, ok.

[00:12:12] VJ: So you could imagine a—there's a bucket in your fridge, and you put the pepperoni in there. And you don't know which bucket it's in, but you know one of them has the pepperoni. You just ask the operator for it later.

[00:12:21] SY: Ok. So that makes sense. So I get if we talk about this fridge idea, then it's kind of like ok, I have this pepperoni. And then my fridge operator says, "well pepperoni goes in my meat bucket, you know? I put it in my meat toppings bucket." Whereas if I gave it basil, it would say, "ok, this is gonna go on the herbs bucket." You know? And if I have—what's a type of cheese? Mozzarella. (Laughing) Then it'll go with—I was like cheese. I was like if I have a cheese, it'll go in my cheese bucket. No, it's not how it works. If I have mozzarella, then it'll go in my cheese bucket.

[00:12:54] VJ: Yep. That's, that is a great we can just keep going with this pizza metaphor. But I actually think we should do an example of...

[00:13:00] SY: Ok.

[00:13:00] VJ: ...to kind of demystify the magic of the hashing algorithm.

[00:13:05] SY: Right. That fridge operator.

[00:13:07] VJ: Maybe without pizza because I'm afraid everybody's gonna...

[00:13:09] SY: What are you doing?

[00:13:09] VJ: ...think it's about pizza.

[00:13:10] SY: Yeah, yeah. (Laughing)

[00:13:11] VJ: You can use hashing algorithms for not pizza, too.

[00:13:14] SY: Ok, what should we use.

[00:13:16] VJ: Let's go with books.

[00:13:18] SY: Ok.

[00:13:18] VJ: 'Cause they also live on shelves, you know?

[00:13:20] SY: That's true.

[00:13:20] VJ: Hopefully not in your fridge. (Laughing) I mean I guess you could put a book in the freezer.

[00:13:24] SY: I like to keep my books nice and fresh. So... for consumption. (Laughing)

[00:13:30] VJ: Hash tables. They're everywhere as long as you have a shelf. (Laughing) Like we could walk through a really quick example where we have a bunch of books and we're like, "oh, I don't really know how to organize them, but I'm gonna use a hash function. And I'm going to figure out where to put them on the shelf. And we can just say like there's like shelf one and shelf two. Actually this is computer science. Let's do zero index shelf.

[00:13:54] SY: Ok.

[00:13:54] VJ: We have 12 shelves.

[00:13:56] SY: Ok.

[00:13:56] VJ: They start with zero. It starts with zero, and they go all the way up till 11.

[00:14:00] SY: Cool.

[00:14:00] VJ: So which means we actually have 12 shelves between zero and 11. And those are our hash buckets. And one of the interesting terms, the kind of technical terms that you might run into when you're dealing with hash tables is that you sometimes create hash algorithms based on a table size. And a table size is just how many buckets it has. So for our example, we could say that our hash table size is 12 because we have 12 buckets.

[00:14:29] SY: Ok.

[00:14:29] VJ: We're gonna kind of dive into what this hashing algorithm would do. And let's say it's a pretty simple one. And all this hashing algorithm is gonna do is it's gonna count up the number of letters, the number of characters actually in the title of whatever book we give it.

[00:14:45] SY: Ok.

[00:14:46] VJ: And it's just gonna divide it by the hash table size, which is 12. And then whatever the remainder is, that's gonna be the hash bucket for that book.

[00:14:56] SY: Cool.

[00:14:56] VJ: So we're just dividing and looking at the remainder, and the remainder is exactly where we go put the book. Not we, actually, the hash function.

[00:15:02] SY: Yes. I'm so excited.

[00:15:04] VJ: What's a book title? The Great Gatsby. I remember—I haven't read that in a while. I read that back in...

[00:15:09] SY: Oh, it's been so long. Did you see the movie? I thought it was pretty good. It's kind of a ridiculous premise.
[00:15:13] VJ: The one with Leo?

[00:15:13] SY: Yeah. Like he did this...

[00:15:15] VJ: Oh, yeah.

[00:15:15] SY: ...whole—ok. I don't want to ruin the ending for people. That's ok. We'll just, we'll just move on. (Laughing)

[00:15:21] VJ: Watch. Pause this episode, watch the movie, come back and you will wonder why we told you to do that 'cause it actually has nothing to do with hash functions. Just for your own edification. You're welcome.

[00:15:31] SY: Anyways. (Laughing)

[00:15:34] VJ: So the Great Gatsby—I think there are one, two, three, four, five, six, seven, eight, nine, ten, 11, 12, 13, 14. No, 12. Crap. I need to look at the blog post.

[00:15:47] SY: One, two, three, four, five, six, seven...

[00:15:50] VJ: It's 14.

[00:15:50] SY: ...eight, nine, ten, 11, 12, 13, 14. Fourteen—14 non-white charac—no. That's not—I was gonna say non-white characters. (Laughing)

[00:16:01] VJ: That does sound like the movie though. I don't think there are any people of color. Anyways, sorry.

[00:16:05] SY: Were there any non-white characters? God, this episode got political.

[00:16:09] VJ: Yeah.

[00:16:10] SY: Non-white space characters, right?

[00:16:12] VJ: Yes. The Great Gatsby has 14 characters in it. We're not even concerned with the characters. We're just gonna take this book and say, "hey, hash function. Figure out where to put this. Just go put it there, and when I ask you later, you tell me where it is." So the hash function is gonna say ok. My input is this book title. I'm gonna count up the letters.

[00:16:28] SY: Fourteen.

[00:16:28] VJ: There's 14 characters. And I'm gonna divide it by the size of the table...

[00:16:33] SY: Yep, 12.

[00:16:33] VJ: ...hash table, which is 12. Fourteen divided by 12 gives us a remainder of two.

[00:16:38] SY: Yes.

[00:16:38] VJ: And so the hash function's like, "all right. Two, you go live in bucket two.

[00:16:42] SY: Ok.

[00:16:42] VJ: And The Great Gatsby is gone. It's been hashed over there.

[00:16:45] SY: It's done. It's been hashed.

[00:16:48] VJ: Oh my God. (Laughing) That's the episode title.

[00:16:53] SY: Ok.

[00:16:54] VJ: But, you know, what's, what's a hash table without, with the one thing, right? You gotta have...

[00:16:59] SY: That's, that's true.

[00:16:59] VJ: ...at least two things.

[00:17:00] SY: Gotta hash 'em all. Ha! Hash 'em all. Get it?

[00:17:02] VJ: That's good. Nailed it.

[00:17:03] SY: So many good titles. Nailed it.

[00:17:06] VJ: So another book title—let's say The Sound and the Fury.

[00:17:11] SY: Ok.

[00:17:11] VJ: That has six—no, 18 characters. It has 18 characters, and—I think it's 18.

[00:17:19] SY: Yep, 18.

[00:17:19] VJ: I like that I can hear you counting. I like that... (Laughing)

[00:17:22] SY: Just to verify.

[00:17:21] VJ: Eighteen.

[00:17:22] SY: Yes.

[00:17:23] VJ: And 18 divided by 12—our hashing function will figure out—is, gives you a reminder of six.

[00:17:28] SY: Ok.

[00:17:29] VJ: And so it goes and puts The Sound and the Fury into bucket six.

[00:17:32] SY: Bucket six.

[00:17:33] VJ: And that's all fine except...

[00:17:37] SY: Uh-oh.

[00:17:37] VJ: Now I'm gonna put in another book.

[00:17:39] SY: Oh, snap.

[00:17:40] VJ: And it's another author. We, we've had like a Fitzgerald and then we had Faulkner, and now let's do some Hemingway. Now there's a book by Hemingway called The Old Man and the Sea. And just, just, just for kicks, it also happens to have 18 characters.

[00:17:55] SY: One, two, three, four, five, six, seven, eight, nine, ten, 11, 12, 13, 14, 15, 16, 17, 18.

[00:17:55] VJ: So now the hash function is like, "oh, there are 18 characters in this title. Eighteen divided by 12 is 6. It goes to put the book at six, except now there is already something at book six.

[00:18:06] SY: We already have a six. Oh man.

[00:18:09] VJ: We just put The Sound and the Fury into there.

[00:18:11] SY: Can we do that?

[00:18:12] VJ: And now we have—well this is what is called a collision where we are, have two items that should live in the same bucket. And now, our hash function has to figure out what to do because it already put something in. There is something there...

[00:18:30] SY: Yeah.

[00:18:31] VJ: ...and there's not really space to put something else right now the way that our hash table was built. And for what it's worth, this collision sounds really scary, but it's actually pretty common. It like it occurs whenever there are two elements that are supposed to be inserted into the same place in an array or inside of the hash table so this is actually ok. And the reason it's ok is because if there were no collisions, that would mean that our fridge is infinitely large. And like it's not—that's just not reasonable. (Laughing) It's just like too big, you know?

[00:19:03] SY: That's true because if there were no collisions, then we would only be able to have 12 books.

[00:19:08] VJ: Yes. Or you would be having a shelf or, you know, like a, or fridge or whatever. You'd have buckets that are like infinitely large. And then you're back in the same problem where you have an array basically. It doesn't solve anything. So even though a collision sounds like it's a really bad thing, it's actually pretty normal and it actually tells us something about our hash function, which is that no hash function is always going to return a unique hash bucket value because that means it...

[00:19:34] SY: Oh.

[00:19:34] VJ: ...would be generating a new unique index every time. And in fact, hash functions will pretty much always input multiple elements into some bucket at some...

[00:19:44] SY: Oh.

[00:19:44] VJ: ...point.

[00:19:45] SY: Ok. That's different from regular arrays.

[00:19:48] VJ: Yeah. Yeah. And you can have multiple things in one bucket.

[00:19:51] SY: Yeah.

[00:19:51] VJ: But there is something that's important to note is that you don't want too many things in one bucket. You want your buckets to be pretty evenly distributed. And that's where the algorithm aspect of a hashing function really comes in. And we won't talk about that too much but...

[00:20:05] SY: But why, why is it important that it's equally distributed? Like what happens if I have one bucket like I—like my meat bucket, right? Everyone loves meat except for I guess people who don't like meat. But for everyone else, you know, I wanna have like all the different types of pepperonis and all the different types of sausages. So what's wrong with maxing out my bucket?

[00:20:26] VJ: Well if you have too much of your data in one bucket, now imagine that you get to that bucket and you're like well, I have fifty-five different types of meat and only two types of cheese and herbs. Now if you wanna search for one specific type of meat, you're now back at the same problem where all your data is, or the majority of your data is in one bucket. And to find something, you still are gonna have a whole bunch of stuff to search through.

[00:20:49] SY: Oh.

[00:20:50] VJ: And so you don't ever want to end up in the situation where you're searching through a whole data set in one bucket because that doesn't really solve the problem of even distribution so that you can avoid like linear search through dataset.

[00:21:04] SY: Ok, so what we're saying is our fridge operator, our hash function helps us better efficiently get to an index so that we can start, you know, at the last index if that's where it is or in the middle index. But once I'm at that index—therefore I'm like dealing with one particular hash bucket within a bucket—I still have to go linearly. So I'm still going from the very beginning and checking out each one, each item in a row to find the one that I'm ultimately looking for.

[00:21:36] VJ: Yeah. And so you—ideally, when you create a hash table with a hash function, you don't overwhelm any bucket so that you don't end up with that problem.

[00:21:47] SY: Yeah.

[00:21:47] VJ: You really want an even distribution because—and this actually is a great segue into why hash buckets or hash functions and hash tables are so speedy—they give us this easy access to one place. And you're not—you're, you're pretty much guaranteed that's gonna take the same amount of time to get to any budget because once you know which bucket to go to, you're like oh, I can go directly to bucket ten. I can go directly to bucket two. That gives us constant time to find the item at or items at that bucket. So if you use a hash table and then you've got 15 things in one bucket and everything else has only one or two items in the other tsbuckets, now you've got one bucket where you're like well any time I look at something in this bucket, I'm gonna have to search through it.

[00:22:34] SY: Yeah.

[00:22:34] VJ: And it doesn't really solve my problem. I'm back at linear search, which is O(N). So to put it in the perspective of BIG O notation, you really want to leverage the power of a hash table and its hashing function to give you constant time when it comes to retrieving things or inserting things into a, a hash table or searching for them when you need them in a certain moment.

[00:22:56] SY: So does that mean that in a particular bucket there is a maximum number of things that I want in order to really get the advantages of using a hash table?

[00:23:08] VJ: Yeah. And I, I think that probably differs based on the size of your data and the way that you handle collisions 'cause I did mention that collisions are normal, which means that everybody who's dealing with hash tables must have thought about what to do, right?

[00:23:22] SY: That's true. Yeah.

[00:23:23] VJ: When there's... I, I never really answered the question of when you have two books that go into bucket six, what do you do? I just said...

[00:23:29] SY: You're so sneaky. You didn't answer that question. That's right.

[00:23:31] VJ: I know. I didn't. But next...

[00:23:32] SY: Oh, man.

[00:23:32] VJ: ...episode, we'll, we'll get into what you do because...

[00:23:35] SY: Ok.

[00:23:35] VJ: ...we, we kinda left our poor hash function, you know, stumped.

[00:23:38] SY: Yeah.

[00:23:38] VJ: But what you have to do is when you deal with hash, hash tables, you have to make your hash functions smart enough to be able to handle a collision. And that's called resolving a collision, collision resolution because every hash function needs to know what to do in that situation. And you can kind of handle it differently. But sometimes you'll be like okay when you, you can have up to three items, so once you have three items maybe re-, rehash or redistribute or figure out how to fix this bucket that's overflowing. Get a new bucket or move to the next bucket or add some small buckets. We'll get into that in a future episode, but that's a little bit of foreshadowing about...

[00:24:11] SY: Yeah.

[00:24:12] VJ: ...how many buckets you could have in your fridge.

[00:24:14] SY: Huh. Very cool. So next week we're gonna figure out what to do with those collisions. But for today, that's the end of the show. (Music) If you liked what you heard, leave us a review, and make sure to check out Vaidehi's blog post. Link to that is in your show notes. Also wanna give a huge shout out to Twilio for sponsoring the season. Make sure to check out their awesome API. To get your twenty dollars in free Twilio credit, text your name to 480-485-4321. Phone number and link are in your show notes. Digital Ocean is the easiest way to deploy, manage and scale your application. Everything about it was build with simplicity at the forefront. Setting, deploying, even billing. Their support is amazing. They've got hundreds of detailed documentation and tutorials. So if it's your first time deploying an app, they've got great tools and community to make is nice and easy. Try DigitalOcean for free by going to do.co/codenewbie and get $100 of infrastructure credit. Link is in your show notes. Vaidehi, you wanna say good-bye?

[00:25:14] VJ: Bye, everyone.

[00:25:15] SY: Thanks for listening. See you next week.

[00:25:19] SY: That was good. I liked that one. That was fun.

 

Thank you for supporting the show!

Thank you for supporting the show!