• 0 Posts
  • 5 Comments
Joined 3 years ago
cake
Cake day: September 2nd, 2023

help-circle

  • At some point you have to assume some kind of knowledge though. If you have to explain everything from the basics, the moment a concept is slightly complicated, the blog gets thousands of pages long.

    You don’t need to explain how an integer is represented in binary in memory in a blog post about atomic integers. Most people that read about atomic integers already know how integers are represented in memory.



  • I once found a full pack of cigarettes on the ground at age ~10. I quickly figured out that lighting it on fire and using the cigarette to set off fireworks was so much easier than using a lighter. I didn’t even think of smoking it, I just left it lit on the ground and used it as a lighter.

    I didn’t understand why my parents were so worried when they found out lol.


  • I tried to implement my own git from scratch. And when I got to choose a hashing algorithm, I reached the exact same conclusion as the author pretty fast.

    The hashing algorithm doesn’t really matter as long as it’s good enough to prevent accidental collisions. And if there is a collision, it is extremely easy to check.

    If you are about to create a new object and an object with that hash already exists, you compare the 2 objects. If they are the same, nothing happened. If they are different, you just found a collision. Throw some obscure error that will only be witnessed once in the lifetime of the universe and be done with it. Tell the user to change a single bit of the input and be done with it.

    The purpose of object hashes in git was never to provide security. Security is achieved through other means.