Slashdot Mirror


Is Wizard-Code a Derived Work?

worldcitizen asks: "Now, with all the noise from the SCO case regarding copyrights, what constitutes a derivative work and who owns what, a question started creeping up: What would happen if Microsoft starts claiming copyright infringement or other Intellectual Property claims in the wizard-inserted code that Visual C++ generates? Would it be possible that even the simplest 'Hello, world' is tainted? Copyrights don't even require uniform enforcement. Could they selectively enforce it on Free Software projects for Windows that have used VC++ for development? Could they license it in such a way that makes it illegal to use Visual C++ for Free Software? Should this be a wake-up call to never use Visual C++ unless you have a cross-licensing agreement with Microsoft (obviously not for Free Software projects)?"

17 of 75 comments (clear)

  1. Code Wizards suck anyway. by Dr.+Bent · · Score: 5, Insightful

    Code wizards are way more trouble than they're worth anyway. Especially with GUI designers, the code they generate is totally un-maintainable. I've had GUI designers barf on me just because I reformmated the comments in my code, and once that happens, you might as well throw all your GUI code out and start over.

    Sure, writing it from scratch takes longer. But it takes a whole lot less time than re-writing the entire user interface when your boss says "move that button over there".

    1. Re:Code Wizards suck anyway. by Electrum · · Score: 4, Informative

      Code wizards are way more trouble than they're worth anyway. Especially with GUI designers, the code they generate is totally un-maintainable.

      You've obviously never used Borland Delphi or C++Builder. Those products are an excellent example of a GUI builder / RAD done correctly. They don't screw up if you change the code and don't make the code unmaintainable. I can't imagine a more productive environment for GUI development.

    2. Re:Code Wizards suck anyway. by ConceptJunkie · · Score: 4, Insightful

      Actually writing from scratch is _faster_, once you know what you're doing. Microsoft's code generators are completely useless and I've never met anyone with any real experience that uses them. At best, they could be used as a tutorial, but even still, I doubt you could learn much and code it produces is unreadably ugly. I mean REALLY UGLY. No consistent indentation. Tons of garbage comments that it needs because writing something that can grok MFC is obviously too much trouble for them.

      Of course, MFC becomes a lead weight the moment you try to do anything outside of Microsoft's extremely narrow idea of writing Windows code, unless you spent a great deal of time filling out all the stuff Microsoft has been too lazy to do in a product that's only been around for almost 10 years.

      Fortunately I have spent a great deal of time doing so, so I can function effectively and prolifically with MFC _and_ the code I've added on to it over the years.

      Here's what I did. I ran the code generator once for an SDI app and once for a DLL app. Then I cleaned up the code, removed the goat-spew comments, formatted the code (how ironic that machine-generated code is not formatted) and removed all the dead-weight functionality. I can now take these stripped down plain-vanilla apps and go to town, with my own classes, which add a lot of java-inspired ideas to MFC and hide some of the nonsense that MS is too lazy or stupid to encapsulate. At the end of the day, it's a good environment to work in and I do like using Visual Studio (version 6, 7 has some nice features but it is bloated and builds about 3 times slower with the same code on the same machine). Of course, improvements I have made have essentially been by replacing aspects of MFC... collection classes, string class, database support, ActiveX support, TCP/IP support, etc. Some day, I hope to replace GUI support and break away from MFC altogther, at which point I will be able to write apps with about a third of the code needed to use MFC.

      Anyhow, I didn't mean to ramble so long, but my point is that anyone who has any real experience isn't going to be using code generators anyway, and if he or she was, it would be easy enough to avoid it for project whose IP might be imperiled.

      Of course, there's nothing to stop Microsoft from sticking their new MNU MPL license (MNU == "Microsoft's, Not Yours", MPL == "Monopolist's Private License") in a service pack and 0wNzOring half the software industry overnight.

      --
      You are in a maze of twisty little passages, all alike.
    3. Re:Code Wizards suck anyway. by ConceptJunkie · · Score: 3, Funny
      I can see it now, the MNU MPL:


      This License is a contract between the Microsoft Corporation (hereafter known as "Thy God") and you, the customer, (hereafter known and "worthless technoserf")...


      --
      You are in a maze of twisty little passages, all alike.
  2. subject by inerte · · Score: 5, Insightful

    What would happen if Microsoft starts claiming copyright infringement or other Intellectual Property claims in the wizard-inserted code that Visual C++ generates?

    Nothing yet, since they currently don't do this kind of limiting with the wizard-code.

    Would it be possible that even the simplest 'Hello, world' is tainted?

    Yes, if they prove that your Hello World came from a Wizard instead of other method. (highly unlikely)

    Copyrights don't even require uniform enforcement. Could they selectively enforce it on Free Software projects for Windows that have used VC++ for development?

    If they make a license which says "Forbidden to use with Free Software", and someone uses it, then yes.

    Could they license it in such a way that makes it illegal to use Visual C++ for Free Software?

    Yes.

    Should this be a wake-up call to never use Visual C++ unless you have a cross-licensing agreement with Microsoft (obviously not for Free Software projects)?

    No. They won't do this.

    1. Re:subject by Otter · · Score: 3, Interesting
      Should this be a wake-up call to never use Visual C++ unless you have a cross-licensing agreement with Microsoft (obviously not for Free Software projects)?

      No. They won't do this.

      While a) you're most likely right and b) this is the sort of lazy question that gives Ask Slashdot a bad name (Hello! Read the license!):

      The fact is that Microsoft did prohibit the use of the Mobile Internet Tools SDK for making GPL-licensed apps.

    2. Re:subject by ray-auch · · Score: 2, Interesting

      Actually they don't need to explicitly prohibit GPL - if they just require you to use a binary redistributable component then GPL excludes itself.

      By my reckoning pretty much all GPL windows development is dodgy unless you use stuff like cygwin - because MS don't always ship C-runtime with windows OSes (even when they do it is typically several versions behind) and they only give you binary redistribution licence. That means you have a required library that you can't ship under gpl, or ship it's source, or treat it as system-exception library (since MS doesn't ship it with the OS) - so you can't write a GPLed app using MS C-runtime (or MFC or VB runtime or .NET runtime or...). But that's just IMHO and IANAL.

  3. Read the licensing terms by iangoldby · · Score: 3, Informative

    Usually, there are terms and conditions attached to the redistribution of code that came with the development environment, and that almost certainly includes code generated by wizards and so on.

    For example, the MSVC license tells you exactly which DLLs you can redistribute, and example code usually has a statement at the top. Wizard-generated code surely won't be any different.

  4. Read the license. by Tomun · · Score: 2, Informative

    Usually the software's license will exempt generated code but you will need to read it to check.
    In fact you should read the license before you pay for the software and certainly before you commit to using it.

  5. April Fools? by Elwood+P+Dowd · · Score: 4, Insightful

    This reminds me of the April Fools Day ask Slashdot question:

    "Isn't it possible that Microsoft is using GPL code in Windows, and we could NEVER KNOW ABOUT IT?! Since we'd never know, they're probably doing it already. Has anyone notified the FSF? What are we going to do about this!?"

    The obvious place to look for answers to this sort of question is in the VS license. If you don't like the terms of that license, use Emacs, dude.

    Hehe. "I wrote my novel using MS Word. Now that I'm selling it, couldn't MS come after me for copyright infringement, since I used their pagination tools?"

    --

    There are no trails. There are no trees out here.
    1. Re:April Fools? by evalhalla · · Score: 2, Interesting
      Hehe. "I wrote my novel using MS Word. Now that I'm selling it, couldn't MS come after me for copyright infringement, since I used their pagination tools?"

      This is slighty a different matter: copyright law does not cover what you do with other's tools, while it does surely cover the pieces of other's code that you put in your software when using VS wizards. In the first case you would have the right to do whatever you want with your work, unless forbidden by some contract or license; in the second case you wouldn't have the right to use those code parts, unless allowed by a proper license.

      Of course they could put some "wicked" clausole in MS Word, but until now they seem to have brain enough not to do so. Maybe they would if they had really all of the wp market, right now it would be suicide.

      As for the license part you're right: the right place to get an answer is the VS license, but that could change and one could be put in such conditions where it's only choices could be to change the license of his software, rewrite it from scratch with some other tool, removing all VB wizard parts or stop updating it. This should be considered before choosing a tool for development, I believe.

  6. Wizard Code by joshsnow · · Score: 2, Funny

    Is Wizard code a derived work?
    Is Harry Potter a Wizard?

  7. lex and yacc? by Sloppy · · Score: 2, Insightful
    People have probably been thinking about that since they started using tools like LEX and YACC to build compilers. (Probably even be older that that, I dunno.)

    In the few situations I've seen, the inputs to the tools are thought of as being the "real" source code, and the C output is conceptually treated as object code, as weird as that might seem.

    So, just copyright your stream of mouseclicks into the Microsoft IDE. They're your clicks; you invented them. And if someone else clicks on the pixel 51 down and 325 to the right of the upper left corner of their IDE's window, sue their ass off!

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  8. What about the same question with a GPLed compiler by AdamBa · · Score: 3, Interesting
    If you used a Wizard produced by a compiler licensed under the GPL...where obviously the source code that the wizard generates for you is contained *somewhere* in the GPLed source of the compiler...is the resulting code a "work based on the Program" and therefore the whole thing is covered by the GPL?

    For example consider this from the GPL FAQ:

    Can I use GPL-covered editors such as GNU Emacs to develop non-free programs? Can I use PL-covered tools such as GCC to compile them?

    Yes, because the copyright on the editors and tools does not cover the code you write. Using them does not place any restrictions, legally, on the license you use for your code.

    Some programs copy parts of themselves into the output for technical reasons--for example, Bison copies a standard parser program into its output file. In such cases, the copied text in the output is covered by the same license that covers it in the source code. Meanwhile, the part of the output which is derived from the program's input inherits the copyright status of the input.

    As it happens, Bison can also be used to develop non-free programs. This is because we decided to explicitly permit the use of the Bison standard parser program in Bison output files without restriction. We made the decision because there were other tools comparable to Bison which already permitted use for non-free programs.

    This makes it pretty unclear. A Wizard is certainly "copy[ing] parts of themselves into the output for technical reasons". It sounds like Bison has an explicit exception for this case, but that's just pragmatism because other comparable tools existed.

    - adam

  9. That wizards exist validates reverse engineering by Rares+Marian · · Score: 2, Interesting

    If a program can spit out code, notwithstanding code that does more than the minimum to complete the requested task, then the only creative element is the wizard user's decisions. Therefore it should belong to the user regardless what the license. Primarily because the wizard user has already paid for the creative elements of the development environment by purchasing the IDE.

    If the code does more or differently from what the wizard user asks (like efficient design, or using one piece of code, where the wizard doesn't actually do anything but give the wizard user a security blanket), then stick that in a library and charge for the library. Otherwise that wizard is a contradiction in itself.

    Stop trying to give users licensing heebie-jeebie, you can make your money otherwise (licensed libs), and quit trying to make creative people pay for their own creativity.

    I have no problem making a buck on Free Software. Neither does FSF

    I have a problem where someone tries to charge the developers. That's extortion.

    --
    The message on the other side of this sig is false.
  10. Re:Stop Playing Amateur Lawyer by reallocate · · Score: 2, Interesting

    I don't see much reason to play endless "what if" games.

    Back in reality land, if someone wants to violate a Micrsoft license, or anyone's license, for that matter, they'd better be prepared to deal with the legal consequences. Contrary to the commonly held opinion around here, a firm moral conviction isn't enough to win in court. The other side might just think they're right.

    --
    -- Slashdot: When Public Access TV Says "No"
  11. Re:How? by MisterFancypants · · Score: 3, Informative

    Generally the only DLLs you'd use with Visual Studio that you can't redistribute legally are the debug versions of all the libraries, and Microsoft prohibits distribution of those mainly to stop developers from shooting their own feet off.