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.

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.

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

Create a post

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 !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog