Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Samples for interview [closed]

Tags:

c#

.net

asp.net

I recently applied for a developer position and the director there asked me to send some samples of code.

How should I approach this? Once, I sent a sample of code that I wrote for myself to a company and they didn't get back. This time, I want to be prepared and send appropriate samples. I want to know what I should send them, create a sample website/code it and send a link along with code files, or create a sample project, or some other approach. I cannot send code that I have written for my previous and current employer, so I'm not sure what to send. They asked for C#, HTML, CSS, JS, SProcs, triggers samples, so I thought: would it be nice if I create a project that includes all the above and send it to them, or should I send individual samples?

like image 972
rs. Avatar asked Nov 11 '09 20:11

rs.


People also ask

What makes a good code sample?

Code samples and snippets should be simple and brief. Their purpose is to demonstrate specific functionality, not what a clever programmer you are. Follow coding best practices, where they are clear. For example, use feature detection rather than browser sniffing.


2 Answers

You've pretty much answered your own question. Why not create a project including all of the above? Small games are fun to write and you can demonstrate a lot of knowledge by creating one. Websites are good too, if you want to demonstrate things like good UI design and dynamic HTML and scripting knowledge.

It's essentially your portfolio to demonstrate what you're capable of, so apply all your knowledge. This includes not just what the program does but also how it does it -- good choice of algorithms, code architecture, proper naming of variables and appropriate comments, etc.

You can write code that's of just as high quality as what you'd create for an employer -- higher, in fact, since you have complete control over the methodology and standards used. Install one of the free revision control systems (git, mercurial, subversion etc), use bugzilla to track your bugs and todo list, and write a full suite of unit tests. Produce professional documentation and demo screenshots.

Yeah, that's a lot of work. But I can guarantee you that if such a project crossed my hiring desk, I'd have you in for an interview in a hot minute.

like image 64
Ether Avatar answered Oct 08 '22 23:10

Ether


I've been in this situation before, and I usually just refuse to send them the code samples.

The reason is this: when I work for an employer, I'm working professionally, and the employer has exclusive rights to all the code. If I tried to copy the code and send it to another potential employer, I'm at risk of major intellectual property theft. On the other hand, if I create some code for my own use, it is by definition amateur code (even if produced by a professional), and doesn't have the same level of project management stricture, test stricture, etc., and is therefore not representative at all of my professional coding skills.

Companies that ask for this are effectively asking for the impossible. I find it best to point this out to them.

like image 41
Paul Sonier Avatar answered Oct 08 '22 23:10

Paul Sonier