Do parentheses need spaces either side?
Solution 1:
The first. Parentheses should have spaces on either side, just like words. For example (taken from The Punctuation Guide):
Parentheses (always used in pairs) allow a writer to provide additional information. The parenthetical material might be a single word, a fragment, or multiple complete sentences.
Solution 2:
Yes, parentheses have spaces before and after the enclosure (your example #1). However, there is never a space between a closing parenthesis and another piece of punctuation (like the period in this or the last sentence).
Unrelated to your question, the actual word for an acronym is normally used first and then is followed by the acronym presented in parentheses. This is to establish what the acronym will mean for the rest of the paper.
The lecture encouraged us to adopt Data Mining (DM), but I was still on the fence. DM is an important feature in...