Mentioning "hacking" as a hobby without the negative connotation

If you are speaking in tech circles, people understand when you say something like, "I hacked together a prototype on the weekend just for fun". Usually "hack" here is used as a verb. And it connotes that you, as a programmer, understand software best practices, but just "hacked" something together quickly as a proof-of-concept for fun or to demo a concept.

On a resume or cover letter, I'd recommend you label yourself as a "software engineer" or "experienced programmer" or something along those lines. "Hacker" is definitely not good as you've mentioned. In addition, you can then mention you enjoy "working on side projects" or "experimenting with new software technologies" or "working on weekend fun software projects". Any of these communicate that you have a passion for programming and enjoy working on fun projects.