Thread: Submitting a Code Sample to an Employer

  1. #16
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Faroe Islands
    You type your name as the maker of the source or header file, why would you want more than that o.O? And I don't think any company would erase that, unless they really don't like you or something :P
    But if you're afraid of the company just stealing your code, then I'd guess you're not trying to get into a friendly workplace, in that case, I'd recommend you don't even try get in, 'cause unfriendly work places drain your soul and you're gonna walk depressed for the rest of your life
    Currently research OpenGL

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Quote Originally Posted by Akkernight
    You type your name as the maker of the source or header file, why would you want more than that o.O?
    You might as well explicitly claim copyright. If you are paranoid, you might even register the copyright.

    Quote Originally Posted by Akkernight
    And I don't think any company would erase that, unless they really don't like you or something :P
    They might not like you after you have left the company
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #18
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Faroe Islands
    If a company hates you for leaving them, then they got serious issues :P
    Currently research OpenGL

  4. #19
    Join Date
    Nov 2004
    Quote Originally Posted by matsp View Post
    And I doubt that unless you are specifically paid for such "previous work" and it's code that you have actually written as personal development, it would actually hold up in court. Certainly, a new employer would not have the rights to code you wrote for a previous employer - it wouldn't be yours to give away (or sell) anyways. And if they are hiring you to get access to code you wrote before they hired you, then they should really pay you specifically for that.

    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...

    And that does hold up in court... And so would submitting code as part of a job interview process.
    Of course it all depends on the wording of the clauses under which the code is submitted, but corporate lawyers are good at such things.

    Submitting code that doesn't belong to you in the first place (like code written for some prior employer) would be a good indication not to hire the person submitting it as they're not to be trusted with company secrets...

  5. #20
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    I guess the company won't bother to claim your code as theirs unless otherwise it is one of the projects that a client has asked for or a project that is currently under development or likely to be developed in the future.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.

    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  6. #21
    Super Moderator
    Join Date
    Sep 2001
    My Dad wrote some code that his company ended up buying from him. It wasn't a project they had wanted to develop - it was a totally new idea. He took a ton of precautions to make sure his intellectual property got protected, but they stole an awful lot of it - very dirty business but they can get away withit if they try hard enough. Their lawyers are smarter than you - you can count on that.

  7. #22
    Join Date
    Nov 2004
    more important than them being smarter than you, they have more money than you do to fight legal battles (you could hire smart lawyers if you had the money).
    And of course they can always count on you not making too much of a fuss as it will damage your reputation in the business, making it harder to get jobs in the future.

  8. #23
    train spotter
    Join Date
    Aug 2001
    near a computer
    Quote Originally Posted by thetinman View Post
    Has anyone dealt with the issue of what type of code sample to submit to an employer?
    I have been on both sides of the table. I have been asked for sample code once.

    In my interviews I am more concerned with other things,
    will you fit my team,
    can I keep you motivated,
    will you melt if I take you on-site

    I give you a simple test (<20 lines to write) to make sure you have the skills you say you have.

    My systems are asset protection, so I look for
    error checking,
    logic errors

    In a code sample I would be looking for
    error checking
    readability (descriptive variable names etc)

    Quote Originally Posted by thetinman View Post
    I have a wonderfully complex algorithm that I wouldn't mind submitting. It's comprised of 11 source and header file and contains around 700 lines of code, plus a makefile.
    Too much code, don't submit this.

    Better IMO to show them one perfect file.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't get sample shell code to work...
    By jcafaro10 in forum C Programming
    Replies: 6
    Last Post: 07-07-2010, 08:04 AM
  2. Pre-Interviewer asking sample code
    By jayee_spicyguy in forum C Programming
    Replies: 3
    Last Post: 02-09-2009, 11:21 AM
  3. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  4. stricmp() where can I view the sample code?
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 06-28-2002, 08:40 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM