Assorted amusements in algorithm implementation