Given the negative connotation of the term today, I recall my surprise when I first read (alas, the source has long been forgotten) that in the world of mainframe computer in the 1960's, where the principal revenue stream were licensing fees for the hardware, "hacker" referred to a person who was encouraged to tinker with the software to improve its performance. After all, there was no or little money to be made in the software per se, so that any improvements in performance would only serve to enhance the value of the mainframe itself. Hacking appeared to be a beneficial activity in support of the hardware.
But it transpires that the earliest adoption of the term with respect to the computer industry occurred in the 1950's. Ben Yagoda, writing in the March 6, 2014 issue of The New Yorker, notes that the term was used in the 1950’s at MIT “to mean fussing with machines”, a benign sort of activity. The negative connotation that we have come to associate with the term apparently only began to creep into our lexicon in the 1970’s. Thus, in a 1975 glossary for computer programs, one of the meanings given is “[a] malicious meddler who tries to discover sensitive information by poking around. Hence password hacker, network hacker. The correct term is cracker.” Any reference to “cracker” in this context seems to have disappeared, leaving us with “hacker” in the negative sense that is prevalent today, conjuring up a “digital trespasser.”
Lest one think however that "hacker" has come to connote only nefarious intruders into computers, software and networks, the meaning term has further developed so that are, in fact, under certain circumstances, "good" and "bad" hackers. Consider the following definitions that appear on technopedia.com.
"A white hat hacker is a computer security specialist who breaks into protected systems and networks to test and asses their security. White hat hackers use their skills to improve security by exposing vulnerabilities before malicious hackers (known as black hat hackers) can detect and exploit them. Although the methods used are similar, if not identical, to those employed by malicious hackers, white hat hackers have permission to employ them against the organization that has hired them."
"White hat hackers are usually seen as hackers who use their skills to benefit society. They may be reformed black hat hackers or they may simply be well-versed in the methods and techniques used by hackers. An organization can hire these consultants to do tests and implement best practices that make them less vulnerable to malicious hacking attempts in the future."
"For the most part, the term is synonymous with "ethical hacker." The term comes from old Western movies where the cliché was for the "good guy" to wear a white cowboy hat. Of course, the "bad guys" always seemed to wear a black hat."
Yagoda traces this black/white dichotomy back to the 1960’s in connection with intruding into telephone lines, but the understandings quoted above are largely of more recent vintage.
What is “hacking” and who is a “hacker”? It very much depends upon whom you ask.