what is the difference between a cover letter and a writing sample?
A cover letter should be written fresh each time you apply for a job. Tailor it specifically to the job posting, using keywords from that posting. By contrast, you may be able to use the same writing sample for several different job applications, as long as it is broadly applicable to the field.