Submitting a professional code sample

Started by
3 comments, last by GameDev.net 17 years, 5 months ago
Mostly asking for advice here from those in the know, but I recently had a phone interview with a reputable studio, and they'd like code samples. Now, what's the best thing to submit for a code sample? Are they looking for a finished demo, or just a short snippet of clean code? Most of the code I've written in the past has either been based on book samples, school assignments, or is already copyrighted, so I don't have a full demo ready to go. I can probably throw together a small complete game in a night, like a Breakout or Tetris clone easy, but I'm not sure how impressive that is. I think the most impressive stuff I've done so far were assignments based on samples of AI flocking and physics ballistics, but I'm not sure how "cool" that really is. Just kinda looking for a direction to go considering I'm having a severe mental block and would like to submit them some sample code fairly quickly.
PiotyrSoftware Engineer by day, Game developer by nightThe early bird may get the worm, but the second mouse gets the cheese.
Advertisement
I don't think 'they' are looking for a complete project. Just a "short snippet of clean code", as you said. Nothing that 'works' - nobody has the time to compile and launch an application like that.

I've seen first hand someone investigating applicant's code snippets. It took that person several seconds (maybe a minute), just to get a general 'feeling'.

I myself took 3 files from different projects. Completely unrelated, high- and low-level, two from libraries of mine and one from a project under developement - for the most broad spectrum.
Ideally, you want something that is something you can accomplish well, but is also complex. simple data structures, such as linked-lists, or widely-known mathematical functions, such as a matrix-vector math library, are usually not good candidates. Not only are they seen far too frequently, they lack enough depth to show that you can understand complex problems, and worse yet, allow little deviation from the standard forms - simply put, they are a poor showcase for your skills.

Personally speaking, and I've never been in a position to evaluate such demos - so I'm going from what I've heard from those who have - is that a smallish, polished game or demo is one viable option as long as there's something of substance behind it. If you can bang it out in a night or two, its honestly not worth their time to look at - They've probably seen it a million times before, and theres likely nothing original about it. I honestly would not send a tetris or breakout clone unless it was absolutely all I had the time to do.

Demos could be anything really. Physics, audio, networking, multi-threading. If you make a demo that shows you can tackle something out of the norm well, and you can discuss the approach you took intelligently, and ideally alternative approaches (and why you made the decision you did,) then you'll likely make the short list and be called back for the next round of interviews. Its all the better if its something outside of your comfort zone, something you've never tackled, because it shows that you can independantly research and impliment techniques. This will show the employer that you can handle learning new things on your own.

Another option, while not as good as a full demo, would be a non-trivial data structure, like a red-black tree perhaps. Geven the multi-threaded world we're headed into, any form of lock-free structure would show something a little extra.

Also be sure to tailor whatever you send to the company and the position at hand. Showing a single-threaded Checkers AI while applying for a position titled "Multi-threading Guru" is not a very good choice. Some companies prefer game demos while others prefer more accademic exercises. Basically, know your audience if at all possible.

throw table_exception("(? ???)? ? ???");

As someone who does applicant code evaluation, I can say this: I personally don't care much about what the code does as much as I care about what it says about the author. Does it show clarity of thought, and cohesion of design, or is it a hobbled together mess? Does it show an understanding of the implementation language? That sort of thing.

However, I would be really surprised if they were offended (or would view you badly) if you asked for clarification of what they're asking for.

You should also know that it's generally considered part of Fair Use (at least in the States) to use a snippet of code you wrote (that's Copyrighted by someone else) for this sort of thing. But, I am not a Lawyer.
Quote:Original post by Piotyr
Just kinda looking for a direction to go considering I'm having a severe mental block and would like to submit them some sample code fairly quickly.


While you are usually really not expected to submit fully fledged "blockbuster" stuff, you will in fact stand out -positively- if you can provide snippets of code that solve actual tasks or problems.

Programmers that are able to provide such complete solutions, illustrate that they clearly have potential and also sufficient discipline to actually finish a project, rather than only starting projects (which is all too common among people who call themselves "programmers").

This topic is closed to new replies.

Advertisement