Handy reusable code patterns