Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Easier to Analyze or Change == More Maintainabl (Score 2) 247

So I have a method that brute forces something, then I go back and figure out how to do it with a better big 0, and the functionality doesn't change, but that still isn't refactoring, because ... ?

Because it violates the standard definition of "refactoring".

Refactoring is about changing the structure of the code, and not the algorithms used within the code. The goal is typically to reduce coupling, increase cohesion, and (frequently) to improve testability.

Replacing an algorithm with a better algorithm isn't "refactoring", it's "rewriting".

Taking your giant brute-force method and breaking it into smaller parts in a cohesive unit (source file, class, package, etc.) with lowered coupling (perhaps by genericizing previously tightly-coupled bits), in such a way that the individual units have a smaller testing surface -- but is otherwise the same algorithm -- then you've refactored the code, by definition.

Yaz

Comment Re:Easier to Analyze or Change == More Maintainabl (Score 3, Interesting) 247

I once took over 30,000 lines of code that had been written by a subcontractor and trimmed it to around 4000 LOC. And you better believe it ran faster! Not because refactoring is magic, but because once all the mind-numbing almost-repetition was mucked out you could actually see what the code was doing and notice that a lot of it wasn't really necessary. Ever since then I have always maintained that coders should never ever copy and paste code. I've had people disagree, saying that a little bit of copying and pasting won't hurt, but I say if it's really such a little bit then you shouldn't mind re-typing it. Of course if you do that very soon you start putting more effort into devising ways to stop repeating yourself, which is exactly the point. Repeating yourself should be painful.

That's I think a reliable litmus test for whether you should refactor a piece of software. If it's an area of code that's been receiving a lot of maintenance, and you think you can reduce the size significantly (say by 1/3 or more) without loss of features or generality you should do it. If it's an area of code that's not taking up any maintenance time, or if you're adding speculative features nobody is asked for and the code will get larger or remain the same size, then you should leave it alone. It's almost common sense.

I don't see why anyone would think that refactoring for its own sake would necessarily improve anything. If an automotive engineer on a lark decided to redesign a transmission you wouldn't expect it to get magically better just because he fiddled with it. But if he had a specific and reasonable objective in the redesign that's a different situation. If you have a specific and sensible objective for reorganizing a piece of code, then it's reasonable to consider doing it.

Comment Re:Parody (Score 1) 255

And time shifting doesn't use just one. Time shifting monetized (when done by a company) is almost always not fair use. Tivo is the only one that survived legal challenges.

Time shifting is typically something that the end-user does. Tivo, like Sony before it (The original time shifting lawsuit was against Sony for their Betamax), merely makes the machine. So long as there is at least a potential lawful use for the recording function of the machine, they can go on making them. The Supreme Court found that at least some time shifting would be fair, and that was enough.

Space shifting is another example, the original case was against Diamond for their Rio MP3 players, but Apple's iPod relied on it, as did basically everyone else.

But it meets more than just one criteria. It's non-commercial.

No, the purpose of the use for time shifting, while not precisely commercial, is to simply use the work in the way that an ordinary user, who did not time shift, would use it. It's not strongly against fair use, but it certainly doesn't weigh for it in the way that an educational or transformative use would. At best it is a wash.

Comment Re:Parody (Score 2) 255

I don't think the parody exemption for copyrighed works applies to things protected by trademark, which I wouldn't be surprised if the Power Rangers are.

It does.

(Though the question of parodying a mark directly is different from parodying a work which happens to contain a mark. Parodying Star Wars, which includes X-Wings, and the Millennium Falcon, and Lightsabers, and so on is different from parodying the Star Wars logo all by itself)

Also, remember that trademarks are inferior to, and cannot be used as a substitute for, copyrights. And that trademarks themselves are subject to various limitations to allow for certain types of unauthorized use.

Comment Re:Parody (Score 2) 255

Peter Pan is in the public domain in the US. You can absolutely have Peter Pan promoting drug use ('fairy dust' can be the street name; a side effect might be paranoid hallucinations of ticking crocodiles, etc.), and publish it widely enough to detract from Disney's ability to keep Peter Pan a wholesome character that they can make tons of money off.

Go nuts.

But because people can ignore that -- In fact, I'm confident that there are bad porn versions of Peter Pan floating around -- it doesn't really detract from the original, or from the Disney movies, unless you allow it to. It's up to you, the audience member.

Comment Re:Parody (Score 2) 255

a parody is allowed to use however much of the original work it wants to.

That's not quite right.

There's no special status for works which are parodies. Some parodies can be fair uses, but not all parodies are. And not all fair uses are parodies, though some fair uses are.

In any case, one factor in determining whether a use is fair or not is how much, and of that how substantial a part, of the original work is used. It's possible to have a fair use that uses all of a work, but also possible to have a use which uses very little of a work, but which is not fair.

While it all depends on the circumstances at hand, a good rule of thumb is to take only so much as you need. If you wanted to make a parody of Star Wars about how Luke waving the lightsaber around in Obi-Wan's house is dangerous, because Luke is a klutz, you could probably use some footage of that scene from the movie. You would have a harder time justifying using the entire movie, but only changing that one scene for the purposes of parody.

Comment Re:Parody (Score 2) 255

You're allowed to use copyrighted material to parody that specific material, but not to parody something else.

This is the oft-cited parody/satire dichotomy.

No seriously, some people really get into this stuff.

Anyway, it's not a bright line rule or anything, though some people like to pretend that it is. Satire is just as able to be a fair use as a parody can be, and a loss on the third fair use factor does not by itself prevent a use from being a fair use. There are no bright lines in fair use; it's all case-by-case analyses, utterly dependent on the specific facts at issue.

Comment Re:Parody is protected (Score 1) 255

Parody is protected; satire is not.

That's not really true. There is no hard and fast rule to this effect. Certainly fair use allows for both some parodies (but not all parodies) and some satires (but not all satires).

Courts generally are more likely to find fair use where the use was limited to what was needed, and generally find that satires don't need to use particular works so much as parodies do (because a parody is aimed at the work itself, whereas satires merely employ a work to aim at a different target altogether). But there's nothing in the law that prevents a satire from being a fair use depending on the overall circumstances. It's just a little harder to show.

Comment Re:Characters can be trademarked (Score 1) 255

No, he was right. It's not the character that's copyrighted per se -- though it can be a useful shorthand to talk as if it is -- it's the works containing the character that are copyrighted.

Using the character is no different from using any other part of the work that the character appears in.

Also trademarks are inferior to, and no substitute for, copyrights. When the copyright for Steamboat Willy ends, a significant amount of the trademark protection for Mickey Mouse will end with it. This is because the use of a trademark indicates that all such marked goods originate ultimately from a common source. If anyone is allowed to make new works which are derivative of public domain Steamboat Willy, as copyright permits, the MICKEY MOUSE trademark for such works cannot serve to indicate a single source. Therefore the trademark suffers genericide.

The mark can still survive in other contexts -- Peter Pan is both a public domain character in the US and also a trademarked brand of peanut butter and intercity bus services -- but the copyright does some serious damage to it.

Look into the Shredded Wheat case for a similar situation involving the expiration of a patent dragging down a trademark, and the Dastar case for trademarks not being permitted to serve as a substitute for copyrights.

Comment Re:Bennet is wrong (as usual) (Score 1) 255

If there is no original footage, there can be no copyright violation on the original works.
Fan-fiction, whether the author allows it or not, is not part of the original author's copyright. The author has legally no say in what other people can and cannot write (and any legal decision that says they do is unconstitutional).

It's a derivative work. Copyright includes an exclusive right to prepare derivative works. Good luck with your argument about it being unconstitutional.

Comment Re:TOTALLY fair use (Score 1) 255

But the copyright that we're talking about is not a copyright on the original work, it's a copyright on the characters.

Technically there is no copyright on the characters standing alone. The copyright is on the work the characters first appear in. (Or for later traits of the characters, the works in which those traits first appear) When you use characters, you're really making a new work which is derivative of that part of the previous work in which the characters are defined.

Character copyright is just a sort of shorthand for this idea, but it's not a distinct thing.

Comment Re:Parody (Score 1) 255

Any one alone wouldn't be fair use

Possibly not in this case, but fair use is not applied in a strict way. Consider time shifting: It's not creative, it uses fictional works, it uses all of the work, but it doesn't materially harm the market for the work. Only one of the four factors is in favor of fair use, but time shifting is generally considered to be fair.

Slashdot Top Deals

1 + 1 = 3, for large values of 1.

Working...