Format sample code