TIL: Using phash2 for data partitioning

  • ~1 min read

In programming, we often need fairly distribution of data. Using phash2 we can get the same hash for the same Erlang term regardless of machine architecture and ERTS version. This fast function should always be used for hashing any data and limiting the result to a range of integers.

Use dbg to check your Elixir code

  • 1 min read

Debugging Elixir code has become even more accessible thanks to the dbg function. Thanks to the latest version, your work may become more pleasant and the search for errors even easier. Check how to apply new possibilities in your code. A simple one-line can facilitate your error analysis.