Miscellany code snippets and exercises