OK, but don’t forget about the dash—I prefer it for many asides, especially ones which are too off-topic to fit into a parenthetical statement (plus, parentheses feel too cordoned-off for me sometimes—but it is nice to be able to fit multiple asides into a sentence, through a combination of dashes and parentheses: you can make a real mess that way).
Put the punctuation outside the parenthesis all the time, unless the parenthesis is its own sentence (i.e., the parenthetical statement isn’t part of a larger sentence in any way).
(This is its own sentence, within parentheses. Useful if my paragraph is on another subject and I want to introduce a long aside.)
Normally, though, the punctuation goes outside the parenthesis (like anyone cares about grammar anymore anyway).
But I wanted to put an exclamation mark within that aside. That’s OK. I still need an period after the parenthesis (as if anyone cares about proper punctuation these days!).
Maybe those examples help? Or maybe I’m making it too complicated. This page explains it a little better than I have.