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开发者_StackOverflow社区 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?
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.
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.
I'd take something I already worked on - preferably three-tier including sprocs, etc., and factor out anything of a sensitive nature. If it's something you wrote yourself then you will be comfortable discussing it and able to show the breadth of your knowledge - that's what will land you the job. A complete project shows that you know how everything fits together. One more thing: if they ask you where you go to find good code samples, do not immediately say Google: tell them you would look in their code base ;-)
Besides what you send them (a project, a website), I suggest you also give some thought as to what you want to convey with it, and give a written introduction to the sample: why you think it's an interesting piece of code? What does it showcase? What pieces are you proud of? What were the challenges?
They should be able to figure that out themselves, but there is no harm in helping people see what you want them to see...
WHen I intervoiew people I often ask them to give me some code. Usually I asked them to code infront of me though but I guess my point would be the same if the send it to me. I don't look at what they've done (the functionality) but how they've done it. What design principles guide their work. How tidy is the code. What's their test strategy. Have they used any patterns and if so are they used in a well thought way. Depending on the language I'd look for specific aspects of the language. In c++ I'd love to see them be capable of using template specialization elegantly (E.g. for traits/policies) in c#3.0 I'd look for propper use of lambda expressions, generics, LINQ I'd be looking for both correct use as well as over use.
Hope it gave you an idea of what kind of scrutiny you might be put through
精彩评论