Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Software

Code Copying Survey for Developers 389

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."
This discussion has been archived. No new comments can be posted.

Code Copying Survey for Developers

Comments Filter:
  • Loop (Score:5, Funny)

    by andy666 ( 666062 ) on Thursday April 08, 2004 @02:07PM (#8805876)
    I think the first person to write a loop should complain a lot!
    • Re:Loop (Score:3, Funny)

      by RLW ( 662014 )
      Hey, I was the first to write an infinite loop. I should get infinitely more money than loop-boy!
      • Re:Loop (Score:3, Insightful)

        by Virtex ( 2914 )
        Infinite loop? Nonsense. There's no such thing. They're fairy tales told to scare young programmers into submission. I've been programming for 100 years and I've yet to see a loop that ran forever. One way or another, they always terminate, whether by a Control-C, hardware failure, or any of a million other ways. Infinite indeed.
    • by ChiralSoftware ( 743411 ) <info@chiralsoftware.net> on Thursday April 08, 2004 @02:53PM (#8806564) Homepage
      If software patents had existed thirty or forty years ago, there would be patents on the for loop, linked lists, the subroutine, use of buffers, storing text in the form of a sequence of bytes (an invention called a "string"), use of APIs, re-use of code in a form called a "library", the process of merging multiple files of executable code together known as "linking", and many other things, and the process of taking a file containing "source code" and turning it into executable (a novel invention known as "compiling"). All of these things would be patented. Non-commercial software could not exist because there's just no way to write a program without strings, lists and loops, unless your program just consists of a long list of NOOP instructions. But of course NOOP could have been patented too. In fact all these inventions are much more patentable than the stuff that is getting patented now, because when these software constructs were developed, they really were completely novel and non-obvious, unlike things like one-click ordering.

      --------
      Create a WAP server [chiralsoftware.net]

      • by torokun ( 148213 ) on Thursday April 08, 2004 @04:25PM (#8807963) Homepage
        If hardware patents had existed thirty or forty years ago, there would be patents on the transistor, the zener diode, pipelining architectures, bus architectures, and all the different approaches to RAM... All of these things would be patented. Non-commercial hardware could not exist because there's just no way to create a computer without transistors. unless your computer just consists of a bunch of relays. But of course relays could have been patented too. In fact all these inventions are much more patentable than the stuff that is getting patented now, because when these hardware constructs were developed, they really were completely novel and non-obvious, unlike things like using a blue laser instead of a red laser to read/write data.
        • by Anonymous Coward
          So where can I get non-commercial hardware then?
        • Transistor patent (Score:4, Interesting)

          by Latent Heat ( 558884 ) on Saturday April 10, 2004 @03:51PM (#8826168)
          The point about the transistor (or the bolt, or the lock washer) is that yes, the transistor is patented. But generally, I don't make my own transistors, I buy transistors from Digi-Key. And once I buy a bunch of transistors, I can do pretty much what I want with them, and Digi-Key doesn't collect a yearly subscription fee from me for every transistor out there in a product I have sold.

          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.

  • by tcopeland ( 32225 ) * <tom AT thomasleecopeland DOT com> on Thursday April 08, 2004 @02:09PM (#8805897) Homepage
    ...right here [rubyforge.org]. And here [sf.net], too.

    And lots of other folks contribute too. Good times!
  • by Anonymous Coward on Thursday April 08, 2004 @02:09PM (#8805906)
    Hell no, I like rewriting conversion and formatting routines. That's like a paid vacation!
  • Sure, Why Not? (Score:5, Insightful)

    by Saeed al-Sahaf ( 665390 ) on Thursday April 08, 2004 @02:10PM (#8805918) Homepage
    Yes, it's standard to keep a code lib, and take it from job to job. Why reinvent the wheel?

    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.

    • And when that happens, I wanna be in that platoon!
    • Re:Sure, Why Not? (Score:5, Interesting)

      by mrtrumbe ( 412155 ) on Thursday April 08, 2004 @02:32PM (#8806247) Homepage
      Because it's illegal?

      Seriously, though, would you really trust a person who completely relied on copy/pasting legacy code into current projects? Do you know where that person got the code to begin with? Did he write it? Does he even understand the code?

      While just about everyone I know keeps a personal code library containing *some* proprietary code, most don't actively use it. Those who are unscrupulous enough to copy/paste the code into current projects are not people you want around in the long term. I mean, did they even think about the best solution to the problem before doing that copy/paste?

      Most people I know use their library as a reference for future development. This allows them to take the best features/ideas of their historical library and integrate those ideas in new and better ways into their current projects. And I don't see a problem with this behavior. Any person with a decent memory would remember their best ideas and features, anyway, so the illegality of this behavior is questionable.

      Taft

      • Re:Sure, Why Not? (Score:2, Interesting)

        by Anonymous Coward
        > Because it's illegal?

        I do a lot of independent work, and I make sure that my contracts spell out the fact that I will be using and maintaining my own code library. Just don't sign an "All Your Base" contract if you don't intend on keeping it.

        Occassionally I get a client that doesn't like that arrangement, but then I get paid to rewrite boilerplate code, which is easy money.

        (OTOH, I have worked with guys who's "code library" consists of tons of (c) shithole.com stuff from their former employers.)
        • Re:Sure, Why Not? (Score:3, Interesting)

          by stevesliva ( 648202 )
          I once heard a lecture from some overpaid consultant type who talked about asking prospective devs to bring code samples to an interview. Anyone who brought copyrighted code from an ex-employer was given a lecture and shown the door. Pretty harsh, but perhaps a good screen if your highest priority is anal code-retentiveness.
          • Re:Sure, Why Not? (Score:3, Interesting)

            by scotch ( 102596 )
            Just because code is copyrighted, doesn't mean one isn't allowed to possess it or show it to others. These actions might have been expressly allowed by interviewee's former employer, or could possibly be covered under copyright fair use if not expressly prohibited by previous employer's NDA, contracts, etc.

            In short, if I ever meet that overpaid consultant type, I'll punch him in the throat.

          • Re:Sure, Why Not? (Score:4, Interesting)

            by dgmartin98 ( 576409 ) <slashdotusername AT gmail DOT com> on Thursday April 08, 2004 @04:36PM (#8808120)
            Ya know, I had an interview where at the end of the interview, the manager told me there's one more thing he requires for this interview: He wanted to see code samples, design documents, or presentations that I previously wrote.

            I looked at him kinda funny, and hesitantly said something like, "Ummm.... ok... I'll have to check with my previous employer and ask for the files and their permission."

            Of course, my previous employer thought that request was odd, and didn't grant it. I emailed the interviewer my thesis and a conference publication instead (publicly available).

            My question is: Has anyone else ever encountered this in a technical field?

            I've heard of artists, writers, and photographers presenting their portfolio to new employers or clients, but I assume they actually own their own portfolio.
            • Re:Sure, Why Not? (Score:3, Interesting)

              by Anonymous Coward
              Yes. I was being interviewed by a large, online brokerage house in San Fran. The manager wanted to see my programming from my previous job.

              I told them that the code in question involved priviledged information and was not available for review. I also didn't have a copy of it, and was 100% sure my previous employer would not give it to me.

              She got upset and kept pressing the issue. I tired to be reasonable and tell her I could write something tonight and send it in the next day if she needed to see my
      • Re:Sure, Why Not? (Score:5, Insightful)

        by dubious9 ( 580994 ) on Thursday April 08, 2004 @03:07PM (#8806751) Journal
        Which brings us upon an interesting question. Even if you didn't bring the same exact code, you're the same exact person. If you implement the code in the same way, if you have a good memory it could be almost verbatim. Same class/file name, variable etc.

        Is that illegal? To be legal can I never write a program with similar functionality? Or do I just have to do it in a different way? How different does it need to be to be legal?

        If you can defend reimplementing something very similar, then how different is that then copying the file exactly?

        I guess my point is that at some point a reimplementation by the same person for the same thing looks like you copied it exactly then changed things around.
        • 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!
        • 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 inheritan
        • Re:Sure, Why Not? (Score:4, Insightful)

          by revividus ( 643168 ) <phil...crissman@@@gmail...com> on Thursday April 08, 2004 @05:19PM (#8808757) Homepage
          Reminds me of when John Fogerty (orig of CCR) was sued by his old record company b/c they said one of his songs sounded too much like CCR. A bit about that here [johnfogerty.com] I like the line "Critics had a field day contending that Fantasy was suing John Fogerty for sounding like John Fogerty"

          On another slant, all the Safari sites, like this one [oreilly.com] have, right beneath the search function on the left a box you can check to "Search for code fragments only".... Of course, these are published expressly for the purpose of educating, so there's nothing illegal about using snippets of code from technical books. I wonder how much actual production code contains code from O'Reilly (or insert other publisher) books in it?

      • Re:Sure, Why Not? (Score:4, Interesting)

        by forevermore ( 582201 ) on Thursday April 08, 2004 @04:10PM (#8807691) Homepage
        Because it's illegal?

        Why is that? I make all of my clients aware (in the contract) that I have a code library, and will use it and add to it from the current project as I see fit, with a big exception for "private" code (specific to the project, which would belong to the client and not me). My code library is part of what they pay me for - it lets me get projects done in a fraction of the time than if I had to code everything from scratch. But then again, I do NOT consider private code as part of my library, even if I have a backup copy or two sitting around on my network.

        Seriously, though, would you really trust a person who completely relied on copy/pasting legacy code into current projects?

        Who's copying verbatim? Granted, I have some general utility routines (forking commands, javascript mouseover stuff) but most of my code library isn't generalized enough to do this, so I copy/paste where I can, and make modifications where needed (and then I debug it).

      • Re:Sure, Why Not? (Score:4, Interesting)

        by BlackHawk-666 ( 560896 ) on Thursday April 08, 2004 @05:01PM (#8808491)
        The part of my library I use most is the bread and butter stuff e.g. a template for accessing a database and calling a stored proc, etc. We've all done the code a thousand times, and we know how to do it, but using the template library saves having to type it all in again and possibly leave off 1 important feature. I don't feel in the least bad about this since I wrote all that code and know it backwards.

        OTOH, I also have a vast libary of various projects that I have worked on and use this to crib out solutions for current ones. I usually don't cut and paste from this since it is the form I am after, not the code.

        As for remembering it all...fuck me...can you really remember the 100s of thousands of API calls we all deal with now. I couldn't remember them all when it was just the Win32 API, let alone all the news ones - praise be to Intellisense!

      • Survey is biased (Score:4, Insightful)

        by Salsaman ( 141471 ) on Thursday April 08, 2004 @07:19PM (#8810064) Homepage

        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 ?

        • Re:Survey is biased (Score:3, Interesting)

          by Talonius ( 97106 )
          Yea, it seems that on every question they forgot the "..I have permission." argument. As I noted in my comments to them a great deal of the code posted on the web is done so with minor requirements for use. "Name in comments acknowledging source of code." For books you might find "Name in the about box acknowledging source of code." Some are posted as is.

          The crux of it is that most folks post code to a public repository because they want other people to critique and use it. If they didn't want others
    • Re:Sure, Why Not? (Score:5, Insightful)

      by somethinghollow ( 530478 ) on Thursday April 08, 2004 @02:36PM (#8806321) Homepage Journal
      1) Not only that, I think programmers should share. We are, after all, computer scientists. What if every other scientist locked up all of their secrets and just said, "Yeah the Earth moves around the Sun. I won't tell you why or how I know, though."

      2) In the beginning, people shared code to do common things (e.g. sorting algorithems). I wonder if they mean "Do you keep a copy of your sorting algorithems to use in other programs?" or "Do you keep a copy of your accounting software to recompile at your next job?"

      3) I agree w/ the parent. It's just plain stupid to re-write some things when you have a perfectly good solution already written. Besides, if you write it over enough times, you'll remember how to write it... then you are ALWAYS carrying around code from job to job. You can't not take it.
    • Re:Sure, Why Not? (Score:3, Interesting)

      by saden1 ( 581102 )
      I take all my utility functions with me but I have never taken nor will I ever take any code that is at the core of the software product. I mean it is useless because the effert of having to re-engineer the code is more cumbersome than starting all over again.

      Why re-write email or zip utilities? Also, any process flow control code is fair game.
  • by Anonymous Coward on Thursday April 08, 2004 @02:12PM (#8805932)
    ...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.
    • by Anonymous Coward
      Sounds like you don't really understand much of the code you put out . . . I just hope you're not "writing" anything critical.
    • Good reason... (Score:5, Insightful)

      by lukewarmfusion ( 726141 ) on Thursday April 08, 2004 @02:27PM (#8806185) Homepage Journal
      ...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.
      • Re:Good reason... (Score:3, Informative)

        by golgotha007 ( 62687 )
        Sorry, but a hack != programmer.

        indeed.

        i started out as a 'hack' basically finding code snippets that almost did what i wanted, but i found in every case that i had to modify these code snippets to perform the exact task i was after.

        do this for a few years and pretty soon you migrate from a 'hack' into a 'programmer'.

        from one employment to another, i keep all the code that i contributed. i don't do this to simply drop this code into another project, but i use it as a reference and how i did a particul
  • Anti-business? (Score:2, Insightful)

    by Anonymous Coward
    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.

  • Code library. (Score:5, Interesting)

    by FictionPimp ( 712802 ) on Thursday April 08, 2004 @02:13PM (#8805945) Homepage
    I maintain a code library. But its written very generic. I usually copy that code and use modify it to fit the project i'm working on. I dont see a problem with that because the code is technically different in each project and used in a different way. For example (this one is a little far fetched) Lets say I wrote a function to format a date. In 1 program I may use that function to only output as mm/dd/yyyy. In another program I may use that same function to only output mm/yy.

    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.

    • For example (this one is a little far fetched) Lets say I wrote a function to format a date. In 1 program I may use that function to only output as mm/dd/yyyy. In another program I may use that same function to only output mm/yy.

      I don't see that as farfetched. Don't forget that most of the calendar using world formats its dates as dd/mm/yyyy, not our American system of mm/dd/yyyy.... So if you plan on writing software for use outside of the U.S., this would be a really useful piece of code to keep laying

      • Re:Code library. (Score:3, Informative)

        by mr3038 ( 121693 )

        Don't forget that most of the calendar using world formats its dates as dd/mm/yyyy, not our American system of mm/dd/yyyy. So if you plan on writing software for use outside of the U.S., this would be a really useful piece of code to keep laying around.

        Actually, most of the world [qsl.net] is following ISO 8601 standard [cam.ac.uk], which says that you should use YYYY-MM-DD instead. The ISO 8601 time format is also recommended by W3C [w3.org].

    • Re:Code library. (Score:2, Interesting)

      by Anonymous Coward
      The difference is that code libraries are good engineering, while copy-n-paste code is just the sign of a hack.

      story: I got called in to this web project where the 'developers' copied tons of code and in most cases didn't even bother to change the name of the variables. So you got tons of spaghetti code that looked like this:

      var stolenVar1 = myVar1;
      var stolenVar2 = myVar2;
      var stolenVar3 = myVar3; /*
      copied code here
      */
      myVar1 = stolenVar1;
      myVar2 = stolenVar3; //!!

      The same blocks of code were copied several
  • by Future Man 3000 ( 706329 ) on Thursday April 08, 2004 @02:13PM (#8805951) Homepage
    For the most part, when you go into a new job you're maintaining or cleaning somebody else's work. A library of programming and style books is probably worth more than a code library.

    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.

    • ack (Score:4, Interesting)

      by TrekkieGod ( 627867 ) on Thursday April 08, 2004 @02:37PM (#8806328) Homepage Journal
      I completely agree with you on your first statement. Code libraries are often not helpful because you are most of the time maintaining something others have written.

      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)

  • Question 6 (Score:5, Insightful)

    by Anonymous Coward on Thursday April 08, 2004 @02:14PM (#8805966)
    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.
  • by Queuetue ( 156269 ) <queuetue AT gmail DOT com> on Thursday April 08, 2004 @02:14PM (#8805967) Homepage
    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.
    • I agree - that was a question similar to "have you stopped beating your wife?"

      I worked for a contracting company that 1) wrote and marketed its own software, 2) developed software at the request and for other companies, and 3) developed software for its own use to accomplish work tasks for other companies. Depending on the nature of work, either the client owned it (also, we contracted with the Federal gov - which, by law, requires software developed by them to pass in the public domain) or the company re
    • by eddy the lip ( 20794 ) on Thursday April 08, 2004 @02:39PM (#8806363)

      I'm pretty sure that this is what you meant, but just to clarify (under US law at least - it's the same in Canada, but I couldn't find a reference quickly) - if you're an independent contractor, the copyright only belongs to the guy with the cash if it's explicitly stated in the contract that this is a work for hire.

      Only certain kinds of work actually qualify as a "work for hire" under the copyright statute. For example, it is a common misconception that software qualifies as a work for hire. It is not, however, one of the enumerated categories of works that qualifies as a work for hire in the copyright statute.

      Source [irmi.com]

      When freelancing, or representing my company, I never assign the copyright to the buyer, unless:

      • they understand that all code used will be written from scratch,
      • that this will dramatically increase the development time of the project
      • that $x is the price if it's not a work for hire, and that $x + $bignum is the price if it is.

      Part of what people get when they hire me or my company is a big-ass code library. It's impossible to be competitive these days without that. I'm not about to assign any part of that to someone else, and I'm not going to be giving them copyright on anything I might develop for them without appropriate compensation.

      As for the survey, yeah, most of the questions were maddeningly vague. They didn't include most of the copyright situations I've been faced with, including the one where I had an employee contract stating that they could use anything I wrote for them as they saw fit, and so could I.

    • by civilizedINTENSITY ( 45686 ) on Thursday April 08, 2004 @02:48PM (#8806499)
      When you improve or extend GPL-ed code, don't you then own the changes you made? Wouldn't you and the orignal author then have copyright interests in your derived work?
      • by Queuetue ( 156269 ) <queuetue AT gmail DOT com> on Thursday April 08, 2004 @02:53PM (#8806562) Homepage
        I don't think you hold copyright on a derivative work - not even the "diff" you created.

        I generally just turn over copyright to the owner, so it does not come up, but I believe you would have to do significant, original work, in order to hold the copyright.

        But in that case, it's not derivative anyway and you hold copyright alone.
        • Informative????

          "I don't think you hold copyright on a derivative work - not even the "diff" you created."

          No you don't own the collective work, that generally is held by the original author, but you most certainly DO own the code which you actually wrote if said code is copyrightable. Which is why you must explicitly contribute it and there are no shortage of projects which require you to turn copyright over to them or at least sign some sort of legal permission slip.

          "I generally just turn over copyright
  • Choice? (Score:5, Interesting)

    by sploxx ( 622853 ) on Thursday April 08, 2004 @02:15PM (#8805996)
    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'?
    • Re:Choice? (Score:3, Insightful)

      by woodhouse ( 625329 )
      Wow, this survey will produce helpful results. For some reason I'm guessing it'll conclude that 100% of programmers would copy code. Genius.
    • Re:Choice? (Score:4, Insightful)

      by bolverk ( 31238 ) on Thursday April 08, 2004 @02:29PM (#8806202) Homepage
      How about c) If the license permitted it? I've written code for employers under the GPL and the BSD licenses. (My current project is to work on BSD-licensed code). I've even worked under contract where part of the terms were my retaining copyright on the code I wrote. Of course, I'd re-use any of this code in a heartbeat. Just yesterday, I got special permission to use code I wrote on contract three years ago. I'll re-use that code too. This is an extremely poor survey. I can't answer honestly with this survey since there is no option for me to do so.
    • I had the same problem. I stopped doing the survey right there. This appears to me to be a trick question to always get the desired result. Its like asking a question like:

      Q) Do you enjoy killing people?

      A) Yes
      b) Some of the time
      C) never

      No matter how you answer it you can only guage that you have had some experience here (killing people) that would allow you to pick the answer.
    • Also:

      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


      Where is I wouldn't copy a single line without permission? (I would be nuts to, if everything you write is open sourc
      • Hehe.. yes. And it's even better. You'd be giving the right answer by selecting anything on that page. The ones who would use the 5% answer are a subset of the ones for the 10% choice and so on. So, this question is somewhat pointless.

        I wrote these two complaints into their feedback box.
    • I think it's a grammatical error, b) should be:

      "No, Whether it would be found out or not"
    • Re:Choice? (Score:3, Interesting)

      by Ben Hutchings ( 4651 )

      d) Only with permission

      I've worked on Boehm's garbage collector [hp.com] at two employers, with their blessing. The changes I contributed back while at Roundpoint [roundpoint.com], are also usable in the code I'm working on at Business Web Software [businesswebsoftware.com]. A former colleague at Roundpoint also sent me some incomplete changes I made there that hadn't yet been contributed back. Since my managers had a clue about FLOSS, this reuse was all perfectly OK with them.

  • Every collection of people has its underground economies. They often perform an important function so long as:

    1. The consumers don't abuse the system
    2. busybodies don't start poking around and trying to hold people accountable for what everybody is doing.
    Balance the two and nobody really gets hurt.
  • bad questions (Score:4, Interesting)

    by Sharth ( 621005 ) <william AT lynch DOT us> on Thursday April 08, 2004 @02:17PM (#8806022)
    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...
    • Re:bad questions (Score:3, Insightful)

      by CanSpice ( 300894 )
      To risk using a Slashdot cliche, you're new here, aren't you? Thinking that the mods are going to do anything is rather naive around here. Most of the time they can't even be bothered to spell or grammar check submissions, and now you're expecting them to edit another person's survey?
  • Sure, why not? (Score:3, Insightful)

    by PlatinumInitiate ( 768660 ) on Thursday April 08, 2004 @02:17PM (#8806023)
    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!
  • Game Creation (Score:2, Insightful)

    by PaloDeQueso ( 769669 )
    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?
  • Just to be safe... (Score:3, Insightful)

    by tallpole ( 723263 ) on Thursday April 08, 2004 @02:19PM (#8806050) Homepage
    ... 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).
  • by BillFarber ( 641417 ) on Thursday April 08, 2004 @02:19PM (#8806054)
    Why would I keep a library of code to help me get the job done faster and for less money?
  • And you REuse the code. If I had to I'd reimplement it but in the end it would be the same way. (How many ways can you think to write a parser?)
    • You don't get all of the source with SmallTalk. At some point it ends up calling something in C. It's been too many years since I used SmallTalk, but aren't these the "primitives"?

      That said, you get most of the source to the class library. But then again, I get most of the source from MSFT for their class libraries runtime environments - I regularly debug in to the Microsoft Visual C runtime, MFC, ATL and WTL code.
  • by jcrash ( 516507 ) * on Thursday April 08, 2004 @02:20PM (#8806077)
    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.

    • You're lucky. At my University, the school owns the rights to any and all intellectual property you create while an employee (unless it meets very strict rules of how you did it, when, etc.).... there are a couple of exceptions, but they are upfront contracts stating otherwise.

      It's pretty standard for your employer to own the work they pay you to do for them... so even if there's no outright agreement, they can still make a strong case that it is implied/understood. Gotta cover your own ass these days.
  • by 4/3PI*R^3 ( 102276 ) on Thursday April 08, 2004 @02:21PM (#8806090)
    Overly simplisticly, coding is like painting. All painters use the same colors over and over again. What differentiates a painting is the order and placement of the colors.

    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.

  • by flossie ( 135232 ) on Thursday April 08, 2004 @02:23PM (#8806115) Homepage
    There are many implicit assumptions evident in the survey questions.

    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.

  • Taught in College (Score:4, Interesting)

    by millahtime ( 710421 ) on Thursday April 08, 2004 @02:24PM (#8806133) Homepage Journal
    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.
  • by Chromodromic ( 668389 ) on Thursday April 08, 2004 @02:25PM (#8806148)
    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 ...
  • by Hockney Twang ( 769594 ) on Thursday April 08, 2004 @02:27PM (#8806177)
    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.
  • by Featureless ( 599963 ) on Thursday April 08, 2004 @02:27PM (#8806179) Journal
    ...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...
    • Block quoth the original poster...

      Our intellectual property laws, when interpreted strictly, are a bit of a farce...[A]s a society, we have never ever, even for a day, played by the basic copyright rules "100%."

      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,

  • ...in my brain.

  • If you maintain a library that you take from job to job just make sure that your core code is under a BSD-style license (and that your employer is aware of this). That way, a few jobs down the line your past employers can't come screaming that you or your present employer are using "stolen" code.
  • code arsenal (Score:3, Insightful)

    by gfody ( 514448 ) on Thursday April 08, 2004 @02:32PM (#8806261)
    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
  • by Queuetue ( 156269 ) <queuetue AT gmail DOT com> on Thursday April 08, 2004 @02:35PM (#8806300) Homepage
    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.
  • Larger companies (Score:3, Informative)

    by BCW2 ( 168187 ) on Thursday April 08, 2004 @02:40PM (#8806370) Journal
    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.
  • I reached a question with no possible answer that would fit my situation. It wanted to know how much code I would steal from someone else's code without permission, and the answer is NONE. I'd reuse small chunks of my own code, but never anyone else's without clear permission.

    Well, looks like there's no need to bother checking out the results once they're done since they're going to be seriously skewed.
  • by mattwarden ( 699984 ) on Thursday April 08, 2004 @02:40PM (#8806379)
    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.
  • by meshko ( 413657 ) on Thursday April 08, 2004 @02:41PM (#8806387) Homepage
    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.
  • Not only do I have a personal library, I have an extensive library of "Learn by Example Books". Perl Cookbook etc. Why would someone create the same function, over and over again? What would it accomplish if I did? Chances are I would do it almost exactly the same way each time. And the more times I did it the more uniform (structure, variable names etc.) it would become. The main thing I think it would accomplish is less comments. Why document what I've written many times before, I certainly know what it d
  • by kbonin ( 58917 ) on Thursday April 08, 2004 @02:44PM (#8806430)
    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.
  • by Koyaanisqatsi ( 581196 ) on Thursday April 08, 2004 @02:57PM (#8806627)
    Don't forget to look at this demo of things to come w/ software patents:

    http://webshop.ffii.org/ [ffii.org]

    And if you're an European citizen, please sign the petition:

    http://petition.eurolinux.org/ [eurolinux.org]

  • MS Astroturfers! (Score:5, Informative)

    by Queuetue ( 156269 ) <queuetue AT gmail DOT com> on Thursday April 08, 2004 @03:07PM (#8806752) Homepage
    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 [out-law.com] that shill Didio from the Yankee Group.

    The survey is full of misleading questions and will *force* you to admit you steal. Watch out.
  • by ChaseTec ( 447725 ) <chase@osdev.org> on Thursday April 08, 2004 @03:56PM (#8807490) Homepage
    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 [javaalmanac.com]. 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.

  • Oh yeah (Score:5, Insightful)

    by ENOENT ( 25325 ) on Thursday April 08, 2004 @04:07PM (#8807639) Homepage Journal
    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.

  • by bhmit1 ( 2270 ) on Thursday April 08, 2004 @05:32PM (#8808908) Homepage
    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.

BLISS is ignorance.

Working...