TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Using personal code at work

20 pointsby jskopekabout 16 years ago
I'm developing a number of web applications for my university over the summer months in PHP. I've been working with the language for years, and have developed a number of custom database and template handling classes that I can hardly live without. I want to integrate these into the projects I’m developing over the summer, but I don't want to get bit in the ass if I use them in a personal project in the months ahead.<p>Has anyone here run into the same sort of issue as me? Is it a legitimate concern, and is there an easy way to address it? I'm perfectly fine with opening up/sharing my code with the rest of the world if that might solve the issue. Would a simple confirmation with my boss hold up in court?

11 comments

bbuffoneabout 16 years ago
I would publicly open source the code, placing it in either Google Code or Github with a BSD or Apache 2.0 license. Doing this will protect both you and the university from using random (though your) unlicensed code in the project.<p>Placing the code in Guthub or Google Code will make it much easier to validate that it is truly open source and will allow the next developer on the project to download the latest updates.
评论 #612447 未加载
评论 #612559 未加载
评论 #612698 未加载
russellabout 16 years ago
I have done it before. I put my personal copyright in the code. Then I ask permission in a letter to to include it. I have never had a problem. This was in the days when every line of code was part of the crown jewels. It is a legitimate concern, but easily handled, very unlikely to appear in court.<p>You do need to give them pretty much open ended permission to use the code. A BSD license might make it easier, because they know how to deal with licenses.<p>If the code is closely related to their core competencies, it is much more complicated. For example, supplying trading algorithms to a bank.<p>If your code is really generic, maybe all you need is a comment telling where the code came from. Still mention it to your manager.<p>Aside: I consider it good professional practice to mention in comments the source of an algorithm or code snipit. Future maintainers will appreciate.
dctoedtabout 16 years ago
It wasn't clear whether the university is your employer, or whether you're a student. Some general thoughts:<p>A) Double-check your employment agreement for clauses that might give ownership of the code to your employer, even though you thought you were developing the code on your own time. (In some U.S. jurisdictions, overly-aggressive clauses along that line may be unenforceable.)<p>B) If you developed the code in question before going to work for your employer, keep an eye out for ways to demonstrate that fact. (In court, truth is always the goal, but what actually matters is admissible evidence.)<p>C) "Playing nice" is usually the best approach.<p>D) It's almost as important to be able to document that you played nice -- without being too self-serving in your writing -- as it is actually to play nice. That's because in court, judges and juries can sometimes be skeptical of the testimony of witnesses who have interests to protect; contemporaneous written documentation is often regarded as more reliable.<p>E) Assuming your employment contract doesn't contain any special language giving your employer the ownership of your code, a simple exchange of emails -- which you'll want to keep in your personal files -- may well do the trick. At a minimum, it would make a lawyer for your employer think hard before recommending taking any action against you.<p>F) If you're a university student, vice employee, the ownership issue might be a bit more complicated, but OTOH the university may be less likely to care about ownership than a company would.<p>(Usual disclaimer: Don't rely on this as a substitute for legal advice, consult a lawyer, etc.)
pjabout 16 years ago
I would suggest reading about "Work for Hire" it's a legal term. I'm not a lawyer, so don't take what I'm about to say as legal advice, just my personal experience.<p>In my understanding, in general, if you are paid to do it and there is no explicit contract that says the employer owns your work, then you own the work. However, you must look at your contract with your employer. I am guessing you signed something saying the University owns what you do while you work there, most do. Universities are smart like that. It may be a sticky issue to say who wrote what and when, so probably best to avoid using your own code at work if you want to retain ownership of it.<p><a href="http://duckduckgo.com/?q=%22work+for+hire%22" rel="nofollow">http://duckduckgo.com/?q=%22work+for+hire%22</a><p>If I were in your situation, I'd take the opportunity to solve the problem in /another/ way, one that may be better. Worst case scenario, your brain gets bigger and you can still do things the way you were doing them before you wrote the new way for the university.
JimmyLabout 16 years ago
Talk to you boss, and look at your contract (assuming you have one that covers this). Most will have some clause in there saying that if you use code that you created before your employment, by using it at work you're giving the University an unlimited and irrevocable license to use that code.<p>In terms of saving your ass for the future, I'd put a note in the source of the file saying where it came from initially, and keeping a copy of the email from your boss saying that it's OK to use that code (and expressly acknowledging that it's your code that you wrote before being employed with them).<p>Do watch out about transferring the other way, however - if you use these libraries and add to/modify them, you can't then add that new function to your "clean" version to use in the future (it belongs to the employer, even if you type it into your clean version off the clock). Also check the part of your contract/clarify with your manager about what happens to code you write for personal projects while employed - some companies have especially onerous policies about them owning that code, even if you weren't at work when you wrote it.
corewarriorabout 16 years ago
You need to check any contract you might be under with the University. If your code was developed on university time with university resources it probably doesn't belong to you! If you open source personal code then add it to the University code base you may be creating a problem if the code will ever be sold. Sadly you need to realize that todays market doesn't automatically assign ownership rights to your code even though you created it. In most cases ownership will be governed by any contracts or license restrictions you might be working under. Study everything very carefully!
pedalpeteabout 16 years ago
As far as the 'court' thing goes, I'm not sure why you would be concerned, as long as you can prove that you wrote the code before joining the company.<p>Seeing as you are open with sharing your code, you can do it in such a way that it builds your cred as a coder, and it could even be a bit of PR for your boss (if you want it to be).<p>But I'd definitely sit down with your boss, and explain the situation. If you're with a small company, I don't see why it would be an issue.<p>Best of luck
owinebargerabout 16 years ago
How much money will you be saving them by using your pre-existing work? I realize you're a college student with a summer job, but it seems that you've got the situation backward.
评论 #612420 未加载
radu_floricicaabout 16 years ago
The law usually says work done while you're employed belongs to the employer. Off topic: at least in my country this is a special exception to the general "author" legislation, which says for example a painting you make for a buyer will forever be "by you", and even after selling it you still retain some rights. In software, what you write belongs to the company, period.<p>Now depending on the specific wording of the law and in your employment contract you may or may not be able to work on something related on your own. The only solution I can think of which would not require a lawyer and/or reading a lot of legalese is making a piece of paper in which you grant the company the right to use your software and the company agrees it's yours, and get your boss to put the company's stamp on it. That would work in pretty much all cases I can think of, and it's reasonably easy.
ottoabout 16 years ago
One important distinction to make is:<p>Are you considered a contractor or an employee?<p>I'd recommend talking to the legal department, or contacting someone you know in IP law(an actual lawyer, not some random HN reader).
edw519about 16 years ago
I have run into this before and I have never put someone else's code, including my own, onto a customer's or employer's computer.<p>What I have often done, however, is write another version of basically the same thing, but only what I need for the job at hand. I never use the same program or variable names. I want it to look like I wrote it just for them, which technically, I did. Sometimes I bring a hard copy and sometimes I cut and paste a little from my gmail account, but usually I just rewrite most of it from memory (which is good practice, too.)<p>They're paying for me to write them software, they're getting it, and I keep what is already mine. Winners all the way around.
评论 #612493 未加载