Code Copying Survey for Developers
Struan Robertson writes "With all the controversy surrounding SCO's allegations that its Unix code was copied into Linux, we're running a survey with ZD Net to gauge industry practice on code copying. Do you keep a code library? Do you take it from one employer to another? These are the questions we're asking. All answers will be anonymous. The results - with expert legal analysis - will be published free - we're not doing this to sell reports etc. If you're a developer and happy to help, see our
questions on SurveyMonkey.com."
I think the first person to write a loop should complain a lot!
...right here. And here, too.
And lots of other folks contribute too. Good times!
The Army reading list
Hell no, I like rewriting conversion and formatting routines. That's like a paid vacation!
This is one reason that software patents are just silly. At some point, virtually every technique will have been written, then software companies will indeed all become like SCO: A few developers and a fucking platoon of IP lawyers.
"Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
...you can build on view source followed by a cut-and-paste. I beg, borrow, or steal from wherever I can and I expect you to do the same from me. I am open to learning new techniques, code structure, and excellent documentation from the code I read and steal. I have never taken a core money making idea and used it as the central core of my own money making idea, but everything else is fair game as far as I am concerned.
we're not doing this to sell reports etc.
Not to troll, but why are so many people here opposed to business and money? The submitter probably knows (from experience) someone here will accuse him/her of greed in the first five posts if they didn't add that discaimer.
Its technically the same code, but I remove the the parts that are not used.
Besides, even if I didn't have the database. I will write a function to do something very close to the exact same way 90% of the time. Most of the developers I know have very reconizable styles. I can usually tell who on my team wrote what parts by the code alone.
Sorry for my spelling errors, I dont have time to spellcheck.
Besides, the parts of a code library that are most likely to be reusable are also most likely to be publically known algorithms (B-Tree, MD5 hash, etc.) and therefore published in some form already. It's probably wrong to take something that you were specifically paid to produce for one company along with you to another, so don't do it.
I never vote for anyone. I always vote against.
-- W.C. Fields
Is unreasonable. You are assuming I would reuse code but not saying if its in house or between companies. In my stats class this question would be deemed unethical and slanted. Thus, the results of the survey would be thrown out.
It asks
3. By law, who do you think owns the rights in a piece of software that you develop or in code that you write?
Me
My employer
The client who commissioned and is paying for the development
But never asks where I developed it, nor what legal documents exist to protect various parties.
Obviously, if I'm working on code under a work for hire agreement, it belongs to the guy with the cash. If not, It's copyright me. If it's OSS code that I need to improve for a client's benefit, of course it doesn't belong to either of us - it belongs to the original author.
Did I do it at home? Did I start it before or after getting involved with the company or client? Does the client mind freeing the source? Does it contain proprietary information?
This survey is worthless so far, except to publish articles.
Ah, good. One presumes then, that *you* will be writing and posting on the net a library of routines and snippets donated to posterity.
Didn't think so.
Emmm. Just got this question in the survey:
6. Would you re-use blocks of code written elsewhere
a) ( ) Only if you were confident that nobody would find out
b) ( ) Whether it would be found out or not
Where is 'c) I won't'?
Sounds like you don't really understand much of the code you put out . . . I just hope you're not "writing" anything critical.
Alot of these questions are very badly written. First off, I'm wandering through it, and I'm wondering if this question is referring to code that I have written, or is it code that I've just found along the way. This "survey" really needed to be beta tested (even in an irc forum or something) before being posted to slashdot. Heck, the mods coulda helped out a little and looked at the survey first...
Unless you specifically sign an NDA or it's in your contract that you are not allowed to do this, I don't see what the problem is. Writing everything from scratch every time you go onto a new project at a new company when you have code snippets that could be used would be ridiculous - it would be a waste of time and money for your employer. On the other hand, taking work that was done by you (and probably other programmers) and using it at another employer is certainly underhanded, especially if you've signed an NDA stating that you will not do it. If you haven't signed an NDA, check your contract. If nothing about code is mentioned, you are probably safe. Even a lot of "intellectual property" paragraphs can be invalid - people falsely assume that if the y have "intellectual property" protection, they are safe. Actually, the terms have to be very verbose and descriptive, incorporating either copyright rules or patent rules. A lot of NDA contracts that I've seen from prospective employees from their former companies (in the gaming arena, where NDAs are almost universal) were invalid!
Let's take a look at the game industry, the same code is often used over and over, or at least the same algorithms because you can't afford to loose efficiency in your engine. Especially with modern game engines where the best cards on the market still choke... FarCry? Doom3?. Sharing of code in games is not required, but as an earlier post said, why reinvent the wheel?
... I make sure that I write in a different programming language every time I change jobs.
Sriously though, the problem with coding, is that it is still more of an art than a science, and therefore the endproduct tends to reflect the style of the developers. It creates legal issues, but it's like asking Da Vinci to paint in a different style for a patron, "because we don't want those Sistine fellas complaining on infringement of copyright"- Ridiculous yes, but very real (IMHO).
Why would I keep a library of code to help me get the job done faster and for less money?
This question:
3. By law, who do you think owns the rights in a piece of software that you develop or in code that you write?
Me
My employer
The client who commissioned and is paying for the development
Is missing: Me AND My employer - as I share the ownership 50/50 due to our inhouse rules.
I do not fear computers. I fear the lack of them. Isaac Asimov (1920 - 1992)
Patenting or copyrighting an individual block of code is like patenting or copyrighting the color red. A painter would never be able to patent or copyright the color red and demand a royalty for all artists who use red. Painters copyright their entire image -- even a large enough sub section is copyrightable.
Coding should be the same. How many ways can somebody write a decimal to currency string formatting routine? How many ways can somebody write an RGP go greyscale conversion routine?
note: for those who say "what about Pantone?". Pantone does not copyright the color itself only the name and the Pantone color number is copyrightable. You are always free to use any RGB combination you want but Pantone will guarantee that their color system will always generate the same color on any printer that supports Pantone -- this is the value of Pantone.
The question that asks whether or not you think it is legal to re-use code for different employers needs another option: "it depends". For instance, code released under the GPL with a former employer's permission is free to be used elsewhere. However, the survey doesn't ask whether or not the code was supposed to be kept confidential.
flossie
Write now. Defend liberty
In college in one class they taught you how to do this well. The thought was that if someone else wrote it well then use that instead of rewriting your own. There was a project where you had to do the whole thing from "borrowed" code.
Evolution or ID?
It's pretty ridiculous to lament the current state of average software quality and then require developers to reinvent the wheel every time they're on a new job or working for a new client. It may not be lawful, in all instances, to copy code between projects and clients, but in order to meet requirements, especially time requirments, while ensuring a quality project that's as bug free as possible, copying is not only a necessity but a common practice.
...
Besides, what are we really talking about most of the time? Code libraries? What's the difference, really, if I copy code from my library or use routines from memory, things that I've been required to code over and over again, like validation routines, or basic algorithms?
No one is going to say that they go from client to client and write brand new code each time. Furthermore, if I were a client I would have to seriously question whether I'd even want that. If I were on a tight time constraint I wouldn't get it even if I did want it.
It would be like commissioning someone to build a bridge and then requiring that they only use brand new formulas anc techniques. Okay, but I'm not gonna be the first guy to test it
Chr0m0Dr0m!C
If I write a program that performs a particular function, and then later want to write a program to do the same thing, I end up producing an almost exact replica of what I coded previously. Maybe it's just me, but my coding style is basically set in stone.
So, in that key, I'm not physically keeping a code library, but I am reproducing code that may have become the property of another party.
...unless you really know what you're in for, and are ready to talk about reforming our laws.
Our intellectual property laws, when interpreted strictly, are a bit of a farce. Especially when it comes to thinks like patents, work for hire, the nebulous concept of derived works, "clean rooms..." all the way down to the embattled idea of fair use, backups, lending versus copying, onerous and unenforcable NDAs and employment contracts, and the end fact that, as a society, we have never ever, even for a day, played by the basic copyright rules "100%."
Our whole industry functions by ignoring the rules most of the time. I have never worked anyplace where all the rules (licenses, for instance) were followed. I always follow them myself to the best of my abilities - but it's impossible. I've probably unintentionally violated a license by now, and I've almost certainly infringed thousands of patents. I have never brought code from one client to another without permission or license, not even once, not even when it would have saved untold time and money and was simply the most obvious, easy thing to do... but over the years I received quite a bit of pressure under various circumstances to do it, and I'm certain that quite a few other people do.
That said, because the SCO issue (or non-issue, to be frank) is raised, let me say that it's a different thought process when you're going between the commercial and the free software world - both because the pressures to cheat don't exist (or hardly to any similar extent) in OSS, and because it is almost certain in OSS you'll be caught out. It's like parking a stolen car on the street in front of your house.
But commercial project to commercial project, yes, I bet it happens quite often. And also from OSS to commercial - I would be shocked if there were many large commercial projects that don't have stolen OSS code in them...
Want to Know How to Cheat the GPL? Read On!
...not to document your own code?
Sorry, but a hack != programmer. You can toss together a bunch of stuff other people have written, but when it breaks you'll need to be able to fix it. If you never learn how to do that, you'll never be more than a cut-and-paste drone.
It's great to be able to use resources like View Source to learn new stuff, see new techniques, even find quick examples of how something's done. But if you can't understand how to do it on your own (which may take much longer, granted) then you're not going to last.
...in my brain.
myself and every other developer I know it's common to build up an arsenal of code (written or otherwise collected/customized) for various things. more importantly there's the problems and how you solved them that you'll never forget but the problem may come up frequently regardless of where you work.
it's pretty rare that you find code that you can copy paste and compile. usually you need to read the code to understand the algorithm, then rewrite it to suite your application/variable names/coding style.
one-off hacks and throw away code probably all looks the same company to company programmer to programmer. it's the overall system design and high level architecture that I would consider the meat of the IP anyways.. and it would typically take more than a single developer to pickup and rebuild it somewhere else
bite my glorious golden ass.
It's written by someone who either doesn't understand the issues involved, or is interested in 'interesting news' not a legitimate survey.
Most questions don't take into account the varying ways that code gets licensed and work gets done. They assume you're either giving the code to your employer or stealing it, when there is a whole universe of licensing paths in between those two nodes.
I completely agree with you that the parts of a code library that are most likely to be reusable are known and published algorithms. That and other trivial things is pretty much all I have in my code library.
Then you went and drew two conclusions that were completely different from the ones I drew out of the same facts we both agree with.
First you say "code libraries aren't that helpful" in the title. No, they won't be a significant portion of the code you right for the new company, but they're helpful enough in preventing you from reinventing the wheel every single time. Do I really want to rewrite everything I use again and again everytime I need it? Heck, I find them very helpful in preventing me from doing that.
Second, you say "it's probably wrong to take something you were specifically paid to produce for one company along with you to another, so don't do it." It's not that black and white, and it really depends on what exactly is in that code library (ethically at least. IANAL so I couldn't tell you legally). Without question, only code you wrote yourself is ethical for you to take with you. Other than that, in my opinion anything not directly related to the project you were working on is fair game. How likely is it that you're not going to be using certain primitives in your new job? How likely is it that if you write it again from scratch it will be different? You're just saving time, not giving away company secrets (which would be unethical)
Warning: Opinions known to be heavily biased.
In most large companies with their own programmers, when a program is needed to do a specific funtion, they look at their old code to see if something comes close and then modify it as needed. This saves much time and $. If something is already there just use it if it works, save debugging and writing time.
But this is pre-existing company code, not from a personel library. Many do keep a personel library of generic modules that can be assembled to do many things in many ways. None of this would be considered proprietery IP by anyone. Although I'm sure some companies and Universities would try. There are only x number of ways to do any function in any language. Similarities will abound between programs that do the same thing, written in the same language. You can't avoid it.
Professional Politicians are not the solution, they ARE the problem.
You never ask whether the person wrote the code in their code library on their own time. It seems like you assume that it is all written on someone's dime and then reused in someone else's project.
It does. Stupid questions of the type "have you stopped drinking whiskey in the morning?". I got really aggravated after answering 5 questions.
I have a "code library" (whatever they mean by that) which I wrote in my spare time. It is released under GPL. I'm the copyright holder. I can assign any other license to that code. Therefore I can embed parts of this library in any proprietary code I write for my employer.
I also reuse other people's code released under BSD, MPL etc. This is all legal, but the survey doesn't know about this stuff.
I passed the Turing test.
I am perfectly okay with the idea that my employer owns the former and that I can't treat that as a portable code library, and they're perfectly okay with me including my code library's code in their products, as long as my license (the BSD license, as it turns out) allows it with minimal encumberance.
It can complicated to decide which base I'm writing the code for, but I typically use the rule that if I'm in the office it's theirs, and if I'm at home it's mine. I write in Java, so I use package names to further delineate which is which.
Everybody wins this way : they get more code, I get code that makes my life easier throughout my career.
I maintain at home a library of code under an open source (BSD style) license. Once an employer has given me permission to use and contribute back into that library, THEN I use it at work, and I take it with me when I go. If they want to pay me to reinvent the wheel, its on their dime, no problem! If they want the advantages my existing code, then they have to let me keep improvements. Sort of an informal LGPL license, without the "lesser" wording that smacks of posturing.
To the point - This survey did not allow me to clarify that my code library brought between jobs was legal, and it bugs me that it may be used to support the position that more people ignore the law than may actually do so.
--------
Create a WAP server
Don't forget to look at this demo of things to come w/ software patents:
http://webshop.ffii.org/
And if you're an European citizen, please sign the petition:
http://petition.eurolinux.org/
7. If you ever use blocks of code in your development that were written by someone else, do you check that you have permission?
A: Always
10. How much code would you take from the source of a single program without permission?
Blocks of code comprising up to 5% of the program
Blocks of code comprising up to 10% of the program
Blocks of code comprising up to 25% of the program
Blocks of code comprising up to 50% of the program
Blocks of code comprising more than 50% of the program
Duh?
The main reason this survey is so poorly designed is that it ends up directing you to fill 'marketroid' information, which is the only way you will get to see the end results of the survey.
Nice marketing ploy.
I'd think pretty long and hard before answering these questions. This group appears to be a MS astroturf (false grassroots) organization, going as far as quoting that shill Didio from the Yankee Group.
The survey is full of misleading questions and will *force* you to admit you steal. Watch out.
At my very first programming job, I had the opportunity to work with a few very skilled developers, and I held on to the code they used to to prototype a data management system. Is it illegal for me to have it? I'm guessing, strictly, yes. But I'll never implement that code elsewhere, because it was a very specialized client/server application for a very specialized client. I couldn't use it elsewhere, even if I wanted to...and quite honestly, most people code for applications and clients that are so specialized, that in most cases, it would be illogical to try and carry that over to another company (or even project). On the otherhand, it's useful for me to hold on to examples of "good" code and object architecture. And as far as the code I write for a particular company, it's useful for me to hang on to so that I can see what I'm now doing intelligently and what I'm still doing stupidly.
Good coders just use "design patterns" ;)
I can say that as a Sun Certified Java Instructor one of the most common questions I see from entry level developers is "are there any gode sites I can copy and paste from?". I usually point these type of people to JavaAlmanac. In more advanced classes we end up spending more and more time talking about design patterns because there really is no point to reinventing the wheel. A this level most developers treat design patterns as more of a framework then anything else, mantaining a code library for examples but writing new code to tailor to the need at hand. After all the end job of most developers is to implement business logic and since business processes always change you're never going to be able to copy and paste for any decent sized business app.
My Hello World is 512 bytes. But it's also a valid Fat12 boot sector, Fat12 file reader, and Pmode routine.
I really want to haul the same old bloated and broken code that I wrote 5 years ago from job to job, like an albatross around my neck. That would really make me happy.
The biggest tempatation in looking for new jobs is being able to forget the current code base forever, and never have to add YET ANOTHER feature onto already-baroque code that nobody wants to take the time to rewrite.
That's "Mr. Soulless Automaton" to you, Bub.
I think the parent comment is a lot more accurate than you might first think, for people with both good AND bad memories. My memory sucks - as is true of all good C++ coders - wrap and forget. :> I often search for instances of variables with names I can't remember using the name that seems most reasonable, and I'm constantly surprised by my success.
Then again, now that I think about it, maybe I'm just the type that's constantly surprised, period. Ha!
You've just summed up a major point that Lawrence Lessig makes in his new book, Free Culture.
For those who don't know, Dr. Lessig argued "our side" before the Supreme Court in Eldred v. Ashcroft.
In his new book Dr. Lessig discusses that case, how every new content industry (radio, film, cable, etc..) has "pirated" an existing industry, how our government willingly allowed this to happen, and many other excellent points.
The entire book is available for FREE (as in speech) as a PDF here.
Those who want to buy a hard copy and have the referrer commission go to Creative Commons can do so here.
- Neil Wehneman
My legal education, in nifty podcast format
For writing applications, I've taken to following a coding standard. Class names begin with an uppercase C (eg. CString, CList). Members of a class are prefixed with 'm_'. Base list classes end with List (similarly for trees). Nearly every class has an Init function, along with either an Allocate or Deallocate functions, so an object can be reused without being completely destroyed. Pointers are prefixed with 'p' Functions are prefixed with the class name, so that there isn't confusion when using inheritance or base clases.
. For lists, I have the standard, Add, Delete, Append, Duplicate functions. After doing all of this, practically every application wherever I've worked will look identical. How do you go about proving that this code is original, apart from using file logging, a personal log, or some other technique.
I fully admit to using knowledge from previous employers (be it a script, program, or documentation) to recreate something for someone else. That being said, I keep the direct cut and paste to a minimum and stay quiet about the whole thing.
On the other hand, every US government employee is happy to announce that they share things explicitly all over to other parts, devisions, or branches. In their own mind, once it's labeled as government property, it's free to give away. Now this sounds pretty reasonable at first, until you consider the consultant who is paid to do a small project for a single branch. Once finished, they can now go and try to make some money doing the same thing for the other branches, and even reference the other branch that they did this for. At which point, the client picks up the phone, calls the reference, and has a copy of everything you've done sent to them. They see that they have everything they need, and tell you to have a nice day, since it's their property.
Before we start running around on a big witch hunt, let's have the US Government take a look at their own practices.
6. Would you re-use blocks of code written elsewhere
Only if you were confident that nobody would find out
Whether it would be found out or not
So where is the 'only if it were legal' option ?
It fails to distinguish what the code they're asking about does. If a developer copies snippets of mundane code like sorts, that's one thing. If they're copying in-house developed algorithms specific to the client/employer, that's a whole other ball of wax.
Part of this is that the transistor is a physical thing, not easily made without a large investment in equipment. If I am a little guy, I just buy transistors and I am free and clear. If I am a big enough guy to make my own transistors, I pay whatever tribute money to the transistor patent holder to set up my transistor fabrication plant.
You could say that a compiler, while not a physical thing is not an easy to make thing, so if compilers were patented, I would just pay the license holder for the use of compiler just as I do now. But a linked list is not a tangible thing -- I don't buy a supply of linked lists to incorporate into customer products. A linked list simply comes into being when I order instructions in a special way.
The hardware store sells an apple picker that is a basket with prongs on the end of a stick. I suppose that device is patented -- if I want to build my own stick with a basket on the end, I suppose I could and just not tell anyone about it, or I could buy the patented gadget from the hardware store and pick without recrimination.
Suppose the patent wasn't for "basket with prongs on end of stick that proves useful for harvesting fruit" but on the "process of removing apples from high branches by using a mechanical device to make contact with the apples" and someone went around sending cease and desist orders to people picking fruit.
Or how about if someone discovered that digging holes in your lawn on a three foot grid prevented weeds. I wouldn't have any problem with someone patenting a "lawn rejuvenator device" for sale at the hardware store, but suppose I heard of this idea and started digging those holes with an ordinary shovel (which I had already paid for) and someone sent me a letter that I couldn't do that without paying a fee?
I say that there is a difference in kind between hardware and software patents and that software patents stink.
I know a lot of people hate job interview exams, but those are perfectly legal, ethical, reasonable assessments of fitness for a job. But asking to see already-written code is just asking for trouble -- how do you know they even wrote it?