Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Microsoft Programming IT Technology

Is Wizard-Code a Derived Work? 75

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

Is Wizard-Code a Derived Work?

Comments Filter:
  • Now they know they can possibly do it, and I guess they think it's worth a couple of big ones to try it out.
    • Not that they'd actually try it, but they'd lose if they did. So what if the code was generated by the IDE? It was still you who was controlling it. That would be just as if Microsoft started asking for royalties on books written in word, because hey...they probably used the spellchecker to generate the correct words in it.

  • by Dr. Bent ( 533421 ) <ben@@@int...com> on Wednesday July 30, 2003 @05:34PM (#6574364) Homepage
    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".
    • by Electrum ( 94638 ) <david@acz.org> on Wednesday July 30, 2003 @06:14PM (#6574839) Homepage
      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.
      • Actually, I've used both. A lot. And every time I got a new version I thought. OK...this is going to be the GUI designer that doesn't suck.

        And it sucked.

        Sure. If you never muck with the generated code, they work great. The problem is that you have to change the code in order to get some stuff to work, because the GUI designers are always one version behind the programming libraries. That's why those GUI designers generate code and not a resource file or a complied class. They know that you're going to hav
        • Huh? Both Delphi and C++ Builder produce .dfm files that contain all the data for your objects. You can edit them or you don't. The source code files themselves hardly contain any generated code at all.
          • In my best Phil Hartman as Ed McMahon to Dana Carvey's Johnny Carson, you are correct, sir!

            I find it interesting that Anders Hejlsberg reverted to wizard-generated code for Visual Studio .NET. I think it is more restrictive than the .DFM model, because with the .DFM model all the object properties are data in the .DFM file, and you (if you know what you are doing!) can override object methods in terms of how stuff is written and read from the .DFM file. If you want to do comparable fancy stuff with .NET

    • by ConceptJunkie ( 24823 ) on Wednesday July 30, 2003 @08:53PM (#6576097) Homepage Journal
      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.

      • by ConceptJunkie ( 24823 ) on Wednesday July 30, 2003 @08:58PM (#6576125) Homepage Journal
        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")...


      • Do you suppose you can write an ActiveX control without Wizard support? I think we all have read Petzold and understand enough of the inner workings of the Windows API to write our own class framework for it or to use your cleaned up version of MFC for it. But ActiveX takes the Baroque period of computer programming into the Roccoco. Most how-to books tell you about IUnknown and after that they are cookbooks into the wizards. Can you (easily) do an ActiveX control without wizard support?
  • subject (Score:5, Insightful)

    by inerte ( 452992 ) on Wednesday July 30, 2003 @05:36PM (#6574387) Homepage Journal
    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.
    • Re:subject (Score:4, Interesting)

      by Otter ( 3800 ) on Wednesday July 30, 2003 @06:17PM (#6574880) Journal
      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 [slashdot.org] prohibit the use of the Mobile Internet Tools SDK for making GPL-licensed apps.

      • Yes, GPL. But not every Free Software license.
        • If they can ban one license they can ban any other license by just creating a list. Admitting the ability of a toolmaker to how you legally license the code you create using that tool means that you no longer own how that code can be licensed.
          • Sure, they could. But why would they? Microsoft has a strong interest in people writing software for its operating systems regardles of whether they are for commercial or non-commercial use. How are you going to get High School and college students interested in becoming Windows developers if you don't let them write free software?
            • Michrosoft has a history of screwing developers. They lied about a lot of things along the way and have developed an ample record as a nasty customer. Depending on MS charity is a sucker's wager.
        • Yes, GPL. But not every Free Software license.

          So what if "GNU General Public License and a couple others" of one version's EULA becomes "any license requiring publication of full or partial source code of derivative works" of the next, or worse yet "any license approved by the Open Source Initiative"?

      • Re:subject (Score:3, Interesting)

        by ray-auch ( 454705 )
        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
  • by iangoldby ( 552781 ) on Wednesday July 30, 2003 @05:40PM (#6574433) Homepage
    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.
  • Read the license. (Score:3, Informative)

    by Tomun ( 144651 ) on Wednesday July 30, 2003 @05:40PM (#6574437)
    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.
    • That just begs the question of whether the license actually has the power (or the right) to exempt the generated code or not.

      Exemption or not: who wrote the code? Is it even a creative expression at all?

      • no it doesn't (Score:1, Informative)

        by Anonymous Coward
        http://alt-usage-english.org/excerpts/fxbegthe.htm l
    • Looks to me like the generated code is a derived work from your expression of ideas which you made by positioning the widgets on the window and editing their properties.

      And if it is indeed a derived work, there's no way the IDE publisher can claim copyright over it; it is your code, since it was made by the IDE using your creative direction.
  • April Fools? (Score:5, Insightful)

    by Elwood P Dowd ( 16933 ) <judgmentalist@gmail.com> on Wednesday July 30, 2003 @05:41PM (#6574449) Journal
    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?"
    • Re:April Fools? (Score:3, Interesting)

      by evalhalla ( 581819 ) *

      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 y

      • How about if I used some Microsoft template included in Word for writting my novel? Would that be copyright infringment?
        • If they are text template and not layout template it wouldn't be copyright infringment as long as you respect their license. Being a template it would probably be quite permissive, but this does not mean that you will be able to do everything.

  • Wizard Code (Score:2, Funny)

    by joshsnow ( 551754 )
    Is Wizard code a derived work?
    Is Harry Potter a Wizard?
  • is it possible? (Score:1, Interesting)

    by Anonymous Coward
    I've wondered about this. Not that Microsoft would do it, but maybe a smaller stupider company in a subtle way: claim copyright on the output of the program.

    if the program spits out code that's already written (i.e., it copies a template and replaces some variables) I'm sure you could say YES of course it's possible.

    But what if the program spits out, say, machine code? What about compilers? what if the code is generated from your input only.

    I remember reading an interview with electronic musicians Autech
  • lex and yacc? (Score:3, Insightful)

    by Sloppy ( 14984 ) * on Wednesday July 30, 2003 @06:08PM (#6574791) Homepage Journal
    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!

    • So, just copyright your stream of mouseclicks into the Microsoft IDE. They're your clicks; you invented them.

      There are an almost infinite number of mouse clicks and keystrokes that could lead to exactly the same result.

      First, you can re-order many steps.

      But secondly, many mouse clicks are to a sensitive rectangular area, like a button or drop down menu pad. Take the number of pixels of the first rectangular button, times the number of pixels in the second rectangular button, and this is the uniq
  • by AdamBa ( 64128 ) on Wednesday July 30, 2003 @06:21PM (#6574931) Homepage
    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 [gnu.org]:

    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

  • 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 [fsf.org]

    I have a problem where someone tries to charge the developers. That's extortion.
    • Primarily because the wizard user has already paid for the creative elements of the development environment by purchasing the IDE.

      The wizard will usually copy a library of boilerplate code into the generated program. This boilerplate code is copyrighted. The IDE's EULA specifies under what terms the boilerplate code is licensed for distribution.

      then stick that in a library and charge for the library.

      This is exactly what some IDE publishers are doing. The terms under which the wizard's library is l

  • Microsoft could write a license that says developers using their products must wear funny clothes and send all their money to Bill Gates, but it would be meaningless until tested in court.

    Open source developers would be better off coding better apps than Microsoft instead of playing amateur lawyers. Give users something they think is better than Microsot and the market will settle these "what if" questions.
    • Actually, you have that backwards. You actually have to assume that Microsoft's licenses are valid until a court finds them to be invalid. After all, what happens if Microsoft decides to choose you to be the test case? Unless you can afford to go to war in the courts with Microsoft you can't really afford to pretend that their licenses are nonsense (even if they are).

      Like it or not, legal issues are becoming a large part of software development. You can hide your head in the sand if you want, but the

      • 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.
        • Uh, I think that we agree. Although it is possible that I wasn't clear in making my point.

          Most programmers have to assume that the licenses that they accept are legal. You might believe that a particular section of your software vendor's click-through license is invalid, but unless you are willing to accept the risk of an expensive legal struggle you had probably better do what the license says.

          Likewise, coders should assume that autogenerated code falls under someone else's copyright. The FSF believ

  • 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)?
    How about just don't use proprietary tools if you can't be 100% sure that you're safe? Since you're asking, you're not sure, and no one here is going to be able to answer your question. If you want to know the real answer, spend the $200 to consult with a lawyer who specializes in copyright, or just use Free software.
    • You know, IANAL, but not long ago I read an IAAL slashdot comment (as opposed to IANAL), and he said that if you ask about your chances in any lawsuit, the lawyer will say "50%: it depends on how good I am vs. how good the other lawyer is, and what the judge is like."

      So any question you ask, still has to be answered in a court of law if you get sued, and at that point, your chances are 50%. Except against Microsoft, which is likely to have a much better lawyer than you. Or engage in barratry. Or sponso
  • if this is a major sticking point for you, there's no reason to use wizard generated code. i know that a lot of people find it useful, but for me personally, i would rather write this stuff by hand. of course, i've never built anything with more than maybe four dialogs...

  • this is entirely a contract law problem

    (1) read the license agreement that comes with the development tool in question, check what the terms are regarding this sort of code. if you don't like those terms, goto the next tool.

    (2) have accepted the license agreement (say, in 1), then also check to see whether either party is allowed to vary the terms of the agreement - i.e. is there a provision that allows for the terms to be altered without explicit agreement between the parties ? if there are problems here
    • But what about how EULAs can change, retroactively? As I understand it, Virginia has passed such a law, allowing this. So the EULAs in reality have no meaning, or rather are rendered meaningless because the law has no meaning.

      Gag, I read this and it sounds like babble, but I can't find a better way to say it.

      Virginia and some other states specifically allow the EULAs to float, which puts us in a specifically feudal situation. But Congress also periodically considers adding such a law, at the behest of
  • It's a programming tool. By design its output is expected to be distributed -- except in the case of the Educational versions that don't allow commercial use. For Microsoft (or any other toolmaker) to claim that after the fact is like Stanley Toolworks claiming that since you built a house using one of their hammers and sold it to someone, that means they can put a lien on that house. I'd like to see that stand up in court.

    That said, there are some DLLs that come with Visual Studio that can't be redistribu
    • Re:How? (Score:4, Informative)

      by MisterFancypants ( 615129 ) on Wednesday July 30, 2003 @11:10PM (#6576857)
      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.
      • I bought VC++.NET Standard a few months ago and read the license. From what I recall, a developer can redistribute anything they create with no conditions. The only conditions were for "redistributable binaries" that have been created by MS (for eg: MSVCRT.DLL). For redistributing MS's binaries, the developer is required to include a EULA requiring the users of *his* software to only run MS's "redistributable binaries" on a licensed MS platform.

        I'm a newbie to VC++ but I think C++ code that uses MFC requir
  • The stuff that Visual C++ generates is probably not copyrightable because it is not very expressive. (Indeed, it is generated by a machine!)

    Also, you can use Visual Studio without it generating crap. That is how I always build my projects, because the wizards go wrong too often to be worth it.
    • I think a EULA whereby a user of VC++ agreed to assign the copyright in code generated with the program might fly but there is a constitutional problem with a EULA that makes code generated by the program a derivative work. For something to be eligible for copyright protection, it has to be: an original work fixed in a medium of tangible expression. Leaving aside an, in, a and of, all the remaining words have highly specific meanings. If something is original, it has to have an author. Machines cannot b
    • I'd like to add here that under fair use you can use tiny bits of a copyrighted material. Would this qualify as unsubstantial?

      That would seem to easily cover any copyright portion of the question.
      • Well, the "work" in question would be the entirety of the inserted stubs. It's difficult (but not impossible) to claim fair use exemption if you copy the whole work. But, like I said, it's unlikely that those stubs are protectable under copyright.
  • As I am generally adverse to Microsoft and every ultra-bloated software package that comes out of the unholy lair in Redmond, WA, I had to find myself a semi-useful, similar alternative to VC++ for my C++ programming class this semester. What I found is Dev-C++ [bloodshed.net] from Bloodshed Software. From their website regarding Dev-C++'s features:

    Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as it's c
  • to be honest, i don't understand the motivation for using vc++ in a non-professional (read: outside of work) capacity in the first place. i realize the $99-$129 "professional version" price tag that i've seen, and the even cheaper academic pricing, are not too shabby compared with "enterprise" pricing... but they're still more expensive than $0! there are more than several freely available alternative compilers for win32 machines - cygwin [cygwin.com] gcc, borland [borland.com] (debugger also), djgpp [delorie.com], open watcom [openwatcom.org], lcc [virginia.edu], MinGW [mingw.org], and Dig [digitalmars.com]
  • by jo42 ( 227475 )

    Read the EULA, Luke!

To invent, you need a good imagination and a pile of junk. -- Thomas Edison

Working...