I am not writing anything about small coding project vs cover letter. Tool that I used in my comment is comparison to show common traits of both ... like "white as snow".
Bad - small coding project will show that candidate is a bad coder, even if the code works.
Bad - cover letter will show that candidate has bad grammar, even if person put in the effort.
Good - small coding project will show that candidate can get anything done.
Good - cover letter will show that candidate is willing to put extra effort to get the job.