Pitfalls to avoid as a programming noob

tl;dr "Where to I get started learning how to program?" There are 3 correct answers; more detail below: SICP: Structure and Interpretation of Computer Programs, by Abelson and Sussman. There is a video lecture series There is also a book, more or less identical to the lectures, which you can read for free online, either […]

Ethereum RLP Encoding w/code in Erlang and TypeScript

This is a standard for encoding arbitrary(ish)-depth lists of lists of … of lists of bytestrings, as a single bytestring. -type decoded_data() :: binary() | [decoded_data()]. -spec encode(Data) -> RLP when Data :: decoded_data(), RLP :: binary(). -spec decode(RLP) -> {Data, Rest} when RLP :: binary(), Data :: decoded_data(), Rest :: binary(). Ethereum’s docs are […]

Base64 v. Base58 with code in Erlang and TypeScript

Base64 and Base58 are two algorithms for encoding byte arrays to plain text. I initially assumed these were two instances of the same “Base N” algorithm. This is not the case. These are two fundamentally different algorithms. Base64 is simpler. It treats your byte array as a stream of bytes. It encodes 3 bytes at […]