Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Code Samples and Previous Employers

by perrin (Chancellor)
on Mar 21, 2005 at 02:14 UTC ( [id://441102]=note: print w/replies, xml ) Need Help??


in reply to Code Samples and Previous Employers

Well, I have to say I totally disagree with you, and with nearly everyone who has posted on this thread. It's one thing to make a copy of the nuclear missile launch program you've been contracting on and send the whole thing with an operating manual to a new prospective employer as a sample. It's an entirely different thing to keep some code you wrote to do some random database-backed website, and show a little isolated piece of it to an interviewer.

The guy who interviewed you had expectations that don't surprise me at all. Most people keep some code that they've written for work, and most people I interview bring samples of things they wrote for work.

All this talk about "ooh, it's proprietary!" and companies wanting to steal from another company's codebase by taking it from you is frankly totally out of proportion. I think you guys are being far too deferential to annoying corporate attitudes here. Sure, it's nice to have some CPAN code to show, and I would encourage anyone to pursue that, but I certainly don't consider it a character flaw if a programmer wants to show me some random chunk of code from a previous employer.

  • Comment on Re: Code Samples and Previous Employers

Replies are listed 'Best First'.
Re^2: Code Samples and Previous Employers
by talexb (Chancellor) on Mar 21, 2005 at 02:37 UTC
      All this talk about "ooh, it's proprietary!" and companies wanting to steal from another company's codebase by taking it from you is frankly totally out of proportion.

    Certainly there's one monk here who found out the hard way that an agreement with one's employer can have a real impact on how you're supposed to behave.

    From a technology point of view, I agree with you -- seeing someone else's script that does input validation then puts data into a database, or takes stuff out and displays it, is all pretty boring.

    From a legal or ethical point of view, things change. That's the part that carries more weight in this situation -- is it ethical for me to show off some of my current employer's code if I'm under an NDA? I'm pretty certain the answer is, "No, I'm not allowed to do that".

    One solution is to write some code that you own alone, maybe even samples that have been posted on this site. My local example is something I really did write myself and shows that at one time I was able to wrap my brain around writing some Object Oriented Perl -- albeit just a single module. I am currently working on something that's a bit more complicated, but it's not done yet.

      I certainly don't consider it a character flaw if a programmer wants to show me some random chunk of code from a previous employer.

    Perhaps with the previous employer's blessing that would be OK -- or possibly for some code that's way out of date -- like some C code I write wrote 15 years ago. Otherwise, I disagree -- proprietary code is proprietary code.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

    Update: Fixed typo.

      This has only the most superficial similarities to tilly's case. It's not about releasing code or contributing to a public forum, it's about taking a couple of pages of code along to an interview.

      It should be obvious that I'm not talking about work involving security clearances or explicit NDAs. I'm talking about the kind of work that most of us spend our time on -- data munging, HTML parsing, server monitoring, e-mail manipulation -- all that good stuff. Also, code samples are supposed to be short chunks of code that demonstrate your knowledge of programming concepts like encapsulation and good variable names. There's no need to bring in a complete program, or even complete file.

      If someone walked into an interview with a bunch of code that handles money transfers for a major bank, I'd consider that pretty disturbing, but bringing in a snippet of code that calculates the right justification on a column in a PDF for some daily report is reasonable and does no real harm to anyone.

      If it worries you, then don't do it, but you'd better find another way to create some code samples then. Hiring a programmer without a code sample is like hiring a writer without reading any of her work.

Re^2: Code Samples and Previous Employers
by sfink (Deacon) on Mar 21, 2005 at 23:43 UTC
    I have been on the other side of this -- I've asked a candidate for a code sample, and received obviously proprietary code in response. In fact, it was proprietary code that was very closely related to what my company was working on. Consider this from my point of view: by sending that code to me, the candidate was exposing me personally to a lawsuit from his previous employer! At the very least, it forces me to be much more cautious about how I implement that same feature for our system.

    In this case, I felt that the candidate was being unprofessional (I highly doubt he was being malicious). He simply didn't think through the ramifications of his actions. I also blame myself, because it's an easy mistake for a candidate to make and I should have been very explicit when I made the request in the first place.

    That said, it's also easy to take this too far. If everyone were to go by the strict legal interpretation, then very few people would have anything other than silly class projects for code samples. (I see very few CPAN authors applying for our open positions. /msg me and ask for a job if you want to prove me wrong!) The way I see it, I spend enough extra time working that I can ethically claim that some portion of the code I write for my job really belongs to me, and I am simply giving my company unlimited free reuse rights. That of course does not apply to anything directly related to what my company does. But I don't really care if I used company resources to develop the code; I develop plenty of code for my company without using its resources, and I'm only talking about stuff that's never going to hurt them to reveal. I'm sure that I have no legal ground to stand on, but I will always follow ethical rules over legal ones when I can get away with it.

    I'd also think that the OP's interviewer was being neither idiotic nor malicious. His expectation was not an unreasonable one given his personal experiences. It was just mildly dumb and flat-out wrong. The OP told him his opinion of the situation, and it was both reasonable and legally correct. "Maybe so, but I still want you to break the law for me" is not an appropriate response.

    Oh, and if you're looking for a job and haven't previously squandered away a stash of sample code, then you'd better sit down and write something. If I were the interviewer, I won't accept the lack of any non-proprietary code as an excuse to not provide a sample at all. But I'll be fine if you write something new, especially if you explain to me that you did that because you didn't have anything legally available. (Or just anything that you weren't too embarrassed to show.) I don't care if it ends up with way more comments and much more thought in it than a realistic code sample would. Those things are easily noticed, and I always interpret code samples more as what the candidate things good code should look like rather than what they actually write day to day. I can still get a good handle on the candidate's maturity of expression. (Imagine reading an essay written by someone who has only taken three years of English lessons. No matter how long they spent on it, you'll be able to gauge the level of sophistication. Unless they cheat using a fluent speaker.)

Re^2: Code Samples and Previous Employers
by autarch (Hermit) on Mar 21, 2005 at 16:20 UTC

    I think people are mixing two things together here. If we're talking about full time employment, it's safe to assume that whatever work you did is not shareable, absent an agreement to the contrary.

    For consulting/contract work, things are more complicated. When I was doing consulting, I tried to avoid signing agreements giving my clients ownership of the code. If they insisted on it, I made it clear that much of the code would probably be generic and generally the same as previous projects I'd done, and that I'd reuse similar pieces in the future. I also made them sign an explicit disclaimer on all my free software projects.

    So if you're doing consulting, then I'd say that being asked to produce code samples based on previous work is entirely reasonable. But the original post sounded to me more like a full time job situation.

      I think we would all agree that taking a complete project's worth of code from an employer and giving it to another company would be a gross violation of copyright. That isn't what we're talking about here.

      People who I interview routinely bring me code snippets from previous employers. These are on the order of "this chunk of code searches a big text file for these fixed-width fields and sorts the records on this key" or similar. They are nearly meaningless without context, but are plenty good enough to get a sense of the person's basic coding practices.

      I would never ask someone to bring code from a previous employer, but I do ask them to bring code samples, and that's usually what they bring. Some of them bring CPAN stuff, or code they write specifically for the interview that is tailored to the tools listed in the job ad (a good strategy if you can do it), but most bring stuff they wrote on the job, and I'm fine with it.

Re^2: Code Samples and Previous Employers
by Anonymous Monk on Mar 22, 2005 at 23:47 UTC
    I certainly don't consider it a character flaw if a programmer wants to show me some random chunk of code from a previous employer.

    It's not a matter of "character flaws": it's just that it's not legal to copy code in violation of copyright!

    Suppose you're the guy in the interview chair. If I tell you how I violated your previous employer's legal rights, why should you think I won't violate yours someday? If I don't have the discression to keep the illegal things I've done quiet, why should you believe that I'm discerning enough to trust with confidential company information? If, during the interview, when I'm putting my best foot forward, I still end up suggesting that I can't be trusted, why on earth should you trust me?

    I agree that corporate attitudes are annoying, and I have a firm desire for copyright reform: that's why I write my Member of Parliment, and lobby for change. However, I don't selectively break the aspects of laws that I dislike: and I certainly don't expect a potential employer to be sympathetic if I do.
    --
    AC

      If you don't selectively break copyright laws now and then, you must be a real stickler for following rules. Most people feel fine about photocopying a page they need from a book, or taping a song from a friend's CD, despite the technical illegality of these acts. Showing an isolated snippet of code from a previous employer is of about the same magnitude as these standard violations.

      If I found out that someone who worked for me in the past was using bits of code he wrote for me when applying for jobs, it wouldn't bother me in the slightest. Giving a complete copy of a company project to a competitor who might actually be interested in it would be a different issue, but that's not what we're talking about here.

        Are you sure that everything you think is technically illegal actually is illegal? The examples that you give that most people run afoul of might well, in the right context, be considered fair use.

        However I'd be far more dubious that the isolated snippet of code from someone's proprietary code base would be considered fair use. (You clearly feel it to be fair use, but I'm suspecting that a court would consider the circumstances around the use to be very different.)

        Of course, as with all things copyright, you only get in serious trouble if the copyright holder comes after you. Which in this situation is rather unlikely to happen.

        If you don't selectively break copyright laws now and then, you must be a real stickler for following rules.

        It's called "being a law-abiding citizen". Look into it.

        Most people feel fine about photocopying a page they need from a book

        Depending on why they "need" it, and whether they cite appropriately, this may or may not be legal under "fair use" doctrines. How a lawbreaker may "feel" about breaking the law, however, is not an excuse for breaking the law.

        If I found out that someone who worked for me in the past was using bits of code he wrote for me when applying for jobs, it wouldn't bother me in the slightest.

        What if he stole from his company, but "they deserved it"? What if he killed someone, but you felt that guy "really needed killing?" What if he cheated someone who you felt deserved to be taken down a notch? Would you hire him then? If not, then you're not consistant in your support for vigilante justice.

        If you would, well, it's no wonder that there are so many criminals running around. After all, well, they all "had their reasons"... -- AC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://441102]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found