When I were a youngling, fanfic was a despised genre. The internet has made it less despised, more common and apparently more nearly legal in a “don’t ask, don’t tell” sort of way. To quote the link from TV Tropes above:
No statement on the legality of fanfic has ever been given in American formal law or in its courts. Some argue that it’s a form of copyright infringement; however, see “Legal Fictions: Copyright, Fan Fiction, and a New Common Law”, and note the above precedents.
Authors often have conflicted reactions to fan fiction set in “their” universe, which sometimes leads to a Fanwork Ban. J. K. Rowling has largely embraced Harry Potter fan fic, albeit with certain limitations, for example, and Tamora Pierce advises aspiring writers that fan fiction can be a good way to hone one’s writing skills. By contrast, Sir Terry Pratchett acknowledges it exists and is cool about it, pointing out that everything works so long as people are sensible about it. He adds two caveats: anyone doing Discworld fanfic shouldn’t even think of doing it for money, and authors should take care not to put it where he might see it. George R. R. Martin, author of the epic fantasy series A Song of Ice and Fire, expressed his disdain for the practice, saying that “creating your own characters is a part of writing.” He’s even gone so far as to threaten legal action should he become aware of any fan fiction set in the Westeros universe. In contrast, writer/journalist James Bow makes a rather firm case for supporting fan fic, pointing out that it forms a stepping stone towards creating your own characters and setting. As far as media businesses are concerned, reactions have ranged from Archie Comics demanding immediate removal to Paramount Pictures taking some of the better Star Trek fanfics and having them published in print books.
My impression is that fanfic has become like music downloads, a tide that washes past all breakwaters of law or justice. What do you think? What do you recommend? Come on, out with it! – what have you written?