Will it confuse my puppy if I first say "NO!" when he's doing something bad and after that cheer him? Should positive motivation be used in such cases at all? What should be the delay between "NO!" and "Good boy!" ?
The important thing is that your puppy understands what he's being punished or rewarded for. The "Good boy!" should come after the puppy has clearly stopped whatever bad behaviour he was exhibiting, and before he starts doing something new - or he'll think the new thing is what he's being encouraged to do. With puppies, that can be a very short timespan!
You don't have to praise them after they stop doing something bad, but you'll want your young and impressionable puppy to know that you still love him. Consider talking to him gently ("that's better, now") rather than outright praise in these cases.