Write snippet codes