![]() |
| | #1 |
| Registered User Join Date: Aug 2005
Posts: 185
| Submitting a Code Sample to an Employer |
| thetinman is offline | |
| | #2 |
| and the hat of sweating Join Date: Aug 2007 Location: Toronto, ON
Posts: 3,282
| I've never had any company ever ask me for any sample code. They usually just ask me questions or give me a simple test to complete.
__________________ "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008 "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010 |
| cpjust is offline | |
| | #3 | |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Quote:
In fact, I have one of those contracts which basically says "Everything you think, 24 hours a day, is property of The Company." I have to be extremely careful what I reveal or I risk losing my own assets. Just think it through and be careful.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
| | #4 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,338
| Quote:
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is offline | |
| | #5 | |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Quote:
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
| | #6 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 11,338
| No, the circumstances are very different. Here you would be asserting copyright even before entering employment, thus the tangible expression of your idea is available for inspection (and for registration, for that matter). Of course, if you copy or rewrite your implementation into company code then the company would own that copy of the code, but that's too bad and is entirely your fault.
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is offline | |
| | #7 |
| Registered User Join Date: Aug 2005
Posts: 185
| |
| thetinman is offline | |
| | #8 |
| Registered User Join Date: Aug 2005
Posts: 185
| I've been asked for sample code. One thing though, is that my coding ability goes both beyond what was taught to me in school and beyond anything I've done professionally. I've also been given tests in the past, some of which were not the least bit comprehensive. Sample code might be something that I could volunteer. |
| thetinman is offline | |
| | #9 |
| l'Anziano Join Date: Aug 2001
Posts: 2,630
| Is this for a job interview? 99% of the time if it is for a job interview than they just want to see how good your code looks, in other words: do you comment your code and indent nicely. |
| DavidP is offline | |
| | #10 |
| Super Moderator Join Date: Aug 2001
Posts: 7,814
| I think they will probably be looking, if at all, for consistency. Consistency is very important. The length of the code or what it does is not nearly as important as how it looks (consistency falls into this as well) and how easy it would be to maintain. Are you throwing globals around everywhere or is the piece nice and tight and contained? Maintenance costs a lost so if you prove you can write easily maintainable code it will look a lot better than throwing them some super confusing uber algorithm. I'll take a loosely coupled piece any day over something that is so tightly coupled it takes a jackhammer to remove it. I doubt they will have much time to really look at it but they may code review it and send you suggestions to see how you handle constructive criticism. Some want to defend their code at the first sign of criticism which is not a good trait and a huge red flag for me. You can learn a lot from most code reviews. Some of the suggestions you will agree with and some you won't but either way you should have good solid reasons for agreeing or disagreeing. Sometimes its not a matter of agreeing as much as this is how our company does A or B and we want our devs to follow suit. It's always good to have another pair of eyeballs looking at your code b/c in the end we all make mistakes. In the end if the suggestions improve the quality and maintenance factor of the code or if it's a matter of following the way it's been done thus far then you would want to heed the suggestions rather than insist on your own way. All of us put our absolute best efforts forward but none of us write perfect code and code reviews are not there to put you down. They are used to help you as well as to be the first line of defense for possible bugs or later maintenance nightmares. Most of your knowledge will be tested in the interviews. I doubt seriously that any place would choose to hire/not hire simply based on what you submit unless it is so ugly that no one can understand it...which I doubt it is.
__________________ If you aim at everything you will hit something but you won't know what it is. Last edited by Bubba; 11-15-2008 at 10:15 AM. |
| Bubba is offline | |
| | #11 |
| Registered User Join Date: Aug 2005
Posts: 185
| More or less for a job interview. I'm trying to get into a field that involves programming. I put some comments in my code (enough so that I can understand it a year later), and everything is indented. I'd just like to have something nice on hand in case a potential employer asks for a sample. Also, because I have little formal training in computer science, and my job requires very little programming, I'd like to be able to voluntarily send some nice looking code to a potential employer. Since I already have a full time job, it would preferably not be some big algorithm that takes weeks to writes. |
| thetinman is offline | |
| | #12 | |
| and the hat of sweating Join Date: Aug 2007 Location: Toronto, ON
Posts: 3,282
| Quote: If some court chooses to act illegally, then I would find THEM in contempt of court and ignore any ruling that they spewed out.
__________________ "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008 "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010 | |
| cpjust is offline | |
| | #13 |
| chococoder Join Date: Nov 2004
Posts: 443
| just writing a copyright notice is useless. If you signed (implicitly or explicitly) a contract releasing ownership to the company that's that, the copyright is now owned by that company. And if you don't agree to such a clause, most likely you won't be hired anyway. Of course any company requiring candidates to send in samples of their work isn't likely to get the coders they think or want to get. A lot of the code they will get sent will be pilfered from the internet or books, a lot of the rest created on purpose with express intent to be as nice looking as possible (maybe even created by others for pay rather than by the actual candidate), and thus won't reflect the abilities of the candidates except their ability to plagiarise and defraud others. Code written on-site with the hiring company by the candidate during the interview process is a better gauge, but given the stress the candidate is under while writing it it's unlikely to be a representative sample of what he is capable of producing under normal conditions. Most hiring crews don't take that fact into account however. |
| jwenting is offline | |
| | #14 | |
| and the hat of sweating Join Date: Aug 2007 Location: Toronto, ON
Posts: 3,282
| Quote:
__________________ "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008 "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010 | |
| cpjust is offline | |
| | #15 | |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| Quote:
Obviously, this doesn't mean that the company can't put in the small print for the solution that the code you send will henceforth belong to them, just like many photo competitions allow the competition company to use your photos "in any way it likes, whether you win or not" - a good way to build up a large library of stock photos on any or all subjects... ![]() -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. | |
| matsp is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't get sample shell code to work... | jcafaro10 | C Programming | 4 | 04-05-2009 09:55 PM |
| Pre-Interviewer asking sample code | jayee_spicyguy | C Programming | 3 | 02-09-2009 11:21 AM |
| True ASM vs. Fake ASM ???? | DavidP | A Brief History of Cprogramming.com | 7 | 04-02-2003 04:28 AM |
| stricmp() where can I view the sample code? | Unregistered | C Programming | 5 | 06-28-2002 08:40 AM |
| Interface Question | smog890 | C Programming | 11 | 06-03-2002 05:06 PM |