code snips and useful tips