Jump to content
  • Advertisement
Sign in to follow this  
Halma

What should you send a company that requests code samples?

This topic is 3755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A company I contacted for a game programming position is asking me for code samples, in order to see my "coding style and efficiency". What should I send them? Should it be a big 5,000-line project, or would a nice pretty 200-line function suffice? Do they need a complete working program, or can I just send them a couple classes and/or files?

Share this post


Link to post
Share on other sites
Advertisement
Wow, that's some clean code!

Is it very important for the code to be so polished and well-documented?

Generally, I'm the type of programmer that just gets things done, even if I have to use an occasional goto. I suppose that's not what they want to see, is it?

Share this post


Link to post
Share on other sites
Quote:
Original post by Halma
Is it very important for the code to be so polished and well-documented?


It's pretty much the least they can expect...

Quote:
Generally, I'm the type of programmer that just gets things done, even if I have to use an occasional goto. I suppose that's not what they want to see, is it?


This is exactly the kind of programmer who you don't want on your team. Team programming requires the ability to write code which can be understood by your teammates even if you have to spend more time writing it.

Share this post


Link to post
Share on other sites
I see what you mean. But I could be a "horrible goto-using programmer", but still manage to clean up and polish one of my messy codes. So what's the big deal?

By the way, is it a good idea to send them something that isn't open source? Couldn't the company steal my code?

Share this post


Link to post
Share on other sites
Quote:
But I could be a "horrible goto-using programmer", but still manage to clean up and polish one of my messy codes.


In my experience, if ya do something just to get it to work, and not write cleanly... it'll be a snowball's chance in hell to go back and clean it up.

Also poorly written code builds up and makes it harder on yourself, since you have to go back and modify it later to make it do different things or fix bugs. Once you go back to fix a bug or add something to it, it'll be so hard to work on because of all of the hacks.

Trust me, if ya do it write it nicely the first time you save yourself a whole heck of a lot of trouble.

P.S dont use goto.

Share this post


Link to post
Share on other sites
It's not so bad. Say I have 2 goto's in my code. At worst, I can just rewrite the 2 offending functions.

Besides, I'm not saying that it's good programming practice to write goto's and have to fix them later. What I'm saying is, if the company sees your code and it looks clean, how can they know that you're not a sloppy programmer that just managed to clean up one project?

Share this post


Link to post
Share on other sites
They won't know that you're not a sloppy programmer who cleaned up one project, but it's all they've got to go on.

And I would send them a kitten. Everyone loves kittens.

For everyone's enjoyment...

Share this post


Link to post
Share on other sites
I always ask what they're looking for, exactly. If they want to see one method/class you can go through and polish it a bit. If they want to see a whole project just pick something you wrote recently.

Share this post


Link to post
Share on other sites
Quote:
Original post by Halma
Besides, I'm not saying that it's good programming practice to write goto's and have to fix them later. What I'm saying is, if the company sees your code and it looks clean, how can they know that you're not a sloppy programmer that just managed to clean up one project?

Because they're likely to also give you a programming exam. They'll compare the submitted code to the exam code in terms of style, and they WILL notice discrepancies. Habits are a lot harder to hide than you may think.

Oh, and for everyone's sake, become a better programmer. This "hack it through" mentality is something you should adopt in worst-case scenarios, not as a matter of standard practice.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!