Clicking Through the Hash Code
The Art in Code 008 - djb2 hash unsigned long hash(unsigned char *str) { unsigned long hash = 5381; int c; while (c = *str++) hash = ((hash << 5) + hash) + c; return hash; } Snippet source Written by Daniel J. Bernstein (also known as djb), this simple hash function dates back to 1991. Hash functions have wide applications in computer science and cryptography. They are used to map a potentially large amount of data to a number that represents it. For example, the hash function from this code snippet maps "hello" to 2109668080, but "hello!" to 6952337080. Despite the fact there's only one character different, the explanation isn't mathematical, and the number returned is completely different. Snippet explanation Copy image in new tab Save image as... Copy image address Create QR code for this image Block element Inspect
В ролике мужчина в веб-камере внимательно изучает страницу с исходным кодом хеш-функции djb2. Он открывает контекстное меню изображения, увеличивает фрагмент кода и затем долго всматривается в него через экранную лупу, будто пытается раскрыть великую тайну. Шутка в преувеличенной реакции программиста на обычный старый код: серьёзное «расследование» превращает скучное чтение исходников в комедийный момент. EN: In the clip, a man shown through a webcam carefully studies a webpage containing the source code for the djb2 hash function. He opens the image context menu, zooms into the code, and then stares at it through an on-screen magnifying glass as if trying to uncover a profound secret. The joke is the exaggerated programmer reaction to an ordinary piece of old code, turning routine source-code reading into a comedic investigation.
- @gentoomemes / 7575 2023-11-25
- Type
- video, 0:18
- Size
- 1280×720 · 947.5 KiB
- Mood
- absurd, deadpan
- Language
- en
- Added