Code sample

Add essential code samples and their brief explanations.