I'm not looking for "work" code or even a full application. Just something above a hello world that the candidate wrote.
Personally, I'd rather see a few code samples than a resume. You can talk me through your work history, but you can't just talk about code. I'm not going to hire someone on a code sample alone, but I think it really moves the conversation forward.
So, the question: Am I being harsh in thinking it's a BIG red flag if a candidate has no code samples? How do you approach a candidate with a solid resume but zero code samples?
Now that I'm on the hiring end, I've been ask for a sample from candidates, but I'm starting to find them not all that helpful. I've gotten a ton of model classes that are pulled out of Rails or Django apps. Which is fair, if you're building a fairly vanilla app on an MVC web framework, a model is probably one the more self contained pieces, but I think it's really hard to judge a candidate by them.
Ultimately, I've found a much better way to get a feel for how someone codes is to have them come in and pair with them for an hour or two. First spend some time showing them the codebase at a high level and work with them on a really quick problem to see if they get the basics, and if they do, dive into something a little more substantive. Has the nice side effect of seeing if you're going to get along.
1) You're perfectly in your right to ask for code samples. Given, you have to make sure in some fashion that they wrote it.
2) From the perspective of someone without sample code -- I can't show you what I make. I can count a number of reasons why it wouldn't be available: NDAs, trade secrets, company owned code, and even government classified work. In this situation, I would prefer a whiteboard test or code up this problem in a few days and submit it with your resume.
You might logically ask, why no other code outside of work? To that I would respond work-life balance. If you insist on "free time" code you'll get a whizz bang coder probably. You'll exclude the people who strive for balance (which may not be what you want, you just have to know you're excluding these people). These people have other interests outside of work and I might argue be more well-rounded individuals than someone who codes for 8 hours and then goes and hacks for 6 more on their side project.
Obviously this isn't a hard and fast rule, I'm just giving you the other perspective.
I work in IT. I like to code, and I code at work (which means I can't show it to you). I have some sample code from some school projects, but older individuals wouldn't.
If you were to do the same thing with IT you would ask "Why haven't you set up a webserver and configured the database." Maybe because I don't have a use for that outside work. Maybe I have other interests or other time commitments that prevent me from doing that sort of work. In respect to coding, maybe I don't have a problem that can be automated, and I would absolutely hate to spend my time implementing an idea that is probably worthless. If I bother to validate it and do my homework, you're looking for an entrepreneur to give up their work in order to join yours as less than a founder.
I guess it depends on what you're looking for and your point of view.
It sounds like that given the choice between coding something in order to show employers versus creating a resume you would rather produce the code. But as an employer, do you want code that they wrote to show off, or do you want code from a project that they enjoy and to solve a problem, rather than as a demonstration? And as other people said, you don't know how long it took them to write that spiffy code they're showing you. If you spend enough time on it, the turd will eventually be polished.
Resumes are pretty much universally accepted. Startups are tending towards more code based, but I get the impression that you don't know going in if they want to see existing code, or a specific problem solved. Given that situation, your bang for the buck would probably go with a resume. Even if you tweak your resume to have 3-4 versions in order to apply to different positions it's probably time better spent than creating contrived code examples to serve as a resume.
On the flip side, I just accepted an offer where the interview basically revolved around discussing projects in my github profile. But, the comment was made that they've never interviewed anyone with a github account...
I don't think it's unreasonable to ask everyone to submit a code sample, and in fact I think it's a stellar idea. Provided that you make sure that they actually wrote the code and didn't appropriate it somehow, it's a really good way to ensure that they know what they say they know. However, I wouldn't hold it against anyone if they didn't have something prepared. I'd just tell them to write a relatively simple app and submit it in a relatively short timeframe (maybe a week).
That said, I'd make sure that if you're looking for something in particular, you mention it when you ask for a sample. I've been in interviews where they specifically asked for a code sample that ignored persistence and display, and later been asked to give a sample that showed I knew SQL and a UI technology. That was frustrating.
Seems like good practice to specify UI/non-ui. I'll keep that in mind. At this point, I'm just asking for any code as a basic sanity check before we meet up. Deeper dives could come later...
Having a coding question (Something clever but doesn't take up a lot of time to do, the best programmers have plenty of options, they don't need to jump through your hoops if they don't want to) on your website and asking for solutions to that is a better filter imo.
1: You will know the time frame in which it took the candidate to write the solution.
2: You are setting out the parameters for the task and can choose an area(specific skills) that you are particularly interested in testing knowledge for.
I know a lot of companies do this as a standard practice.
I recently tested the job market and found that I also had no code sample that I could share, but I know personally that it doesn't make me any less of a coder.
Your loss.
I have no problem with trials.
Also, you mention my "loss," I've NEVER turned anybody down because of a lack of code samples, I've just moved faster with other candidates. I've never hired anybody with code samples, but there were other factors...
Its great that you've never turned down an candidate due to lack of a code sample. I think passing on someone over such a thing is a bit unwise.