Using personal code at work
dctoedt: It wasn't clear whether the university is your employer, or whether you're a student. Some general thoughts: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.)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.)C) "Playing nice" is usually the best approach.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.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.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.(Usual disclaimer:  Don't rely on this as a substitute for legal advice, consult a lawyer, etc.)