- cross-posted to:
- technews@radiation.party
- cross-posted to:
- technews@radiation.party
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.
This is an excellent explanation of hashing, and the interactive animations make it very enjoyable and easy to follow.
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.