Some common coding snippets