this post was submitted on 21 Jun 2023
39 points (100.0% liked)

Programming

17536 readers
266 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

As a programmer, you use hash functions every day. They're used in databases to optimise queries, they're used in data structures to make things faster, they're used in security to keep data safe. Almost every interaction you have with technology will involve hash functions in one way or another.

Hash functions are foundational, and they are everywhere.

But what is a hash function, and how do they work?

In this post, we're going to demystify hash functions. We're going to start by looking at a simple hash function, then we're going to learn how to test if a hash function is good or not, and then we're going to look at a real-world use of hash functions: the hash map.

top 2 comments
sorted by: hot top controversial new old
[โ€“] spartanatreyu 10 points 1 year ago

Samwho has great interactive articles, his recent article on memory allocation and slightly older article on load balancing are great for beginners just starting to explore those areas.

If anyone is interested in other interactive articles that aren't necessarily about coding, Ciechanowski's are the best. He hand-codes each interactive example and each article is so full that they could easily be entire chapters of textbooks.

[โ€“] sisyphean 5 points 1 year ago

This is an excellent explanation of hashing, and the interactive animations make it very enjoyable and easy to follow.