A few thought experiments solidified as code.