Protecting/Encrypting Source Code
September 30, 2007 7:39 PM   Subscribe

I have reason to be concerned that source code I am turning in for programming projects at school might be being burgled for the professor's own purposes. I would like to protect my code some way. I am thinking this is a great place for DRM to actually be useful. Anyone have experience with this? What are my options?
posted by jxpx777 to Computers & Internet (17 answers total) 3 users marked this as a favorite
 
You can't protect source code with DRM.
posted by smackfu at 7:47 PM on September 30, 2007


It's hard to do this, especially if the grade depends on the professor making sense of the code.

I used to do this for my code, with basic code encryptors. However, this can be backwards-engineered by a particularly determined person, or a professor who writes a decryptor. Googling for "encrypt code" brings up a few encryptors.
posted by Xere at 7:52 PM on September 30, 2007


True, you can obfuscate code, but that kind of defeats the point of turning in code for a grade, since it makes it very hard to read.
posted by smackfu at 7:54 PM on September 30, 2007 [1 favorite]


Um, you have no options. If you're turning it in for a grade, she'll want to be able to read the code... that's one way professors grade computer programs. If you make it so that she can't read it, she'll just give you a poor grade on the lab and move to the next one.

Your only option is to sue him after the fact if he appears to be exploiting your code subpoena his program's codebase in court. However, this isn't going to happen. See below.

Do you seriously think your prof is taking your code? I can't imagine that any of my professors could have profited from the RPN calculator, workorder database, or 3D fractal demo I did (and assigned) in compsci classes. Besides, hate to break it to you, you probably aren't that good.

On the other hand, if you're an RA and he's failing to credit you, that's another issue completely. This happens all the damn time; to nearly everybody at some point. I would call her out on that.
posted by Netzapper at 7:55 PM on September 30, 2007 [1 favorite]


You should put some specifics. There's almost no way anything you write for an undergraduate programming class is useful as commercial code, and there's only slightly less of a chance it's commercially useless if it's say, your senior thesis.

On the other hand, I could imagine a lazy professor using your code as a textbook example, or your professor publishing a compilation of "programming mistakes made by noobs and how to teach them to do it right." But there's no practical technological way to stop that. Your code has to be viewable by the professor and probably has to compile - if you put it in some weird DRMed textfile format he probably can't view it easily, when he can view it he can copy it, and it certainly won't compile in the standard way. You'll just get an F.
posted by TheOnlyCoolTim at 8:51 PM on September 30, 2007


this question is impossible to answer without you laying out the bases for your suspicion. we will then be able to give you feedback on whether or not the information you provide does or does not amount to reasonable suspicion that your professor is engaged in nefarious pilfering if your amateur code.
posted by Mr_Crazyhorse at 9:01 PM on September 30, 2007


When I was at school there was some legal agreement that came with enrollment that gave the university ownership of anything I did for any of the courses I took. Your prof may not even be legally in the wrong here. This would obviously further limit your options.

You might want to check if you are affected by any similar terms before proceeding with whatever.
posted by ODiV at 9:30 PM on September 30, 2007


When I was at school there was some legal agreement that came with enrollment that gave the university ownership of anything I did for any of the courses I took.

You know, this is true. My college was even stricter on it: Any sort of business conducted on campus equipment (which included being in the dorms, or using the internet connection) was legally the college's. Not that it went around claiming everyone's stuff - but I expect that if I had come up with Amazing App Needed By World, they would have swooped in and seized all.
posted by Xere at 10:21 PM on September 30, 2007


Can you just slap an open source license on it? Then your projects can be evaluated and while it wouldn't absolutely stop your professor from lifting your code, it'd be something.,,
posted by the christopher hundreds at 10:56 PM on September 30, 2007


When I was at school there was some legal agreement that came with enrollment that gave the university ownership of anything I did for any of the courses I took.

You know, this is true. My college was even stricter on it: Any sort of business conducted on campus equipment (which included being in the dorms, or using the internet connection) was legally the college's.


Not to derail but would those types of "agreements" possibly stand up in court? If, say, you painted something for an art class and later became famous they could take your money if you sold that painting or take the painting from you? Or similarly if you composed a song on your computer and emailed it to someone through their network? That seems crazy and completely unconscionable.
posted by 6550 at 11:15 PM on September 30, 2007


You could add a string constant with some ridiculous value, like "SPIRO MULTIMAX 3000".
posted by panic at 1:28 AM on October 1, 2007


Can you obfuscate a date check with a simple email or finger function into the code, so that if the code is run after x date (months after the course has ended), it sends you a message. At which point you can find out what the prof is doing, and add his project to your resume :)
posted by -harlequin- at 1:46 AM on October 1, 2007


Best answer: @6550:
Yes.

There's a reason Universities let you use their equipment like that.
posted by disillusioned at 1:51 AM on October 1, 2007


Are you an undergrad? Then nobody wants your code. Seriously. Unless you're a one in a million genius. No one wants undergrad code. Even undergrads.

If you're a grad student, your prof already owns you. It's the real price you pay for getting into the academic inner circle.

Either way, protecting your code from your professor is pointless.
posted by GuyZero at 6:03 AM on October 1, 2007 [1 favorite]


@6550:
Yes.

There's a reason Universities let you use their equipment like that.


There's nothing in that link, disillusioned, that supports your "yes" answer to 6550's question about someone who painted something for an art class and later became famous, or a student who composed a song on her computer and emailed it to someone through their network. Do you have a better link for your claim that all student creations are now owned by universities? Because that's sure a new one to me.
posted by mediareport at 6:12 AM on October 1, 2007


When I was at school there was some legal agreement that came with enrollment that gave the university ownership of anything I did for any of the courses I took. Your prof may not even be legally in the wrong here. This would obviously further limit your options.

What others said. It's also a huge deal in the sciences where undergrads basically pay to do research for professors who really do get to use their minion's research for grants. Or at least that's how it worked at the very large university I went to.
posted by jmd82 at 6:15 AM on October 1, 2007


Judging by the OP's profile, I'm gonna take a guess that the "source code" in question is actually stuff like HTML/CSS/Javascript- basically page designs. Is that right? The "professor stealing my stuff" argument makes a bit more sense in this light.

Now, the real question to me is what the professor is doing with it. If he's using it for school-related purposes (like course materials), then as everyone's said- you're SOL.

If you're suggesting that the prof is using your classwork for freelance web development, then he's in violation of his work agreement with the school, since the school owns the code. You have to decide whether you want to pursue this, but be prepared for it to turn ugly for you if you do.
posted by mkultra at 9:34 AM on October 1, 2007


« Older Messenger bag shop in NYC?   |   Earning money on a web site Newer »
This thread is closed to new comments.