   Code Samples and Job Applications
  I'm looking for advice on job applications where companies ask for code samples along with your resume / cover letter and other standard material. Does anyone have any general guidelines as to what sort of samples to send? Obviously it's in your best interest to send good, clean, documented code of a relevant nature o the job description, but what about size? Does "code sample" tend to mean a complete program? I don't want to send more than people will ever want to look through and just be brushed off on that basis. On the other hand, I'm worried that sending only a part of a program may seem incomplete and therefore undesirable as well. For those of you familiar with this process, is it better to provide small toy programs? Complete programs of a significant size? Parts of larger programs?What other recommendations might you have to consider that may not have crossed my mind?Thanks in advance!   
  Put yourself in the position of the interviewer. What would YOU be looking for?I've been asked to give input on code samples in the past. When I look at code samples, I want a sample -- not a whole program (If its more than 250 lines, +/- 100, there's a problem). The thing I care about when looking at the code sample is an elegantly thought out algorithm to solve a problem and how its written and documented...comments, explanations, function comments, spacing, white space, etc. If I get a bunch of uncommented spaghetti code or code which looks like a quick hack, then I think less of the talents of the programmer. Even less if the code has syntax errors or uses an approach which doesn't work. Overall, I'm trying to gauge just how creative you are with your problem solving skills. If there are ways to optimize your code to make it more efficient, then I'll assume you missed that optimization or you use unnecessary steps to solve a problem. The weight I give to the missed optimization is proportional to the effect it would have on the programs runtime or memory usage.   