Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a hack? [closed]

I use the term all the time... but I was just sort of thinking that I don't really have a solid denotational sense behind the term (or at least the term in the sense I want to discuss here). I'm interested in the sense of the word related to code, not the anthropomorphic idea. I'm also not interested here in the sense of the word related to intentional malicious computing (i.e. a hack to unlock secret powers in a game). What I want to explore is what it means to 'hack' in terms of writing software to solve a problem

wikipedia's def of 'hack' to me is a bit vague, but a decent starting point. It considers a hack

  • can refer to a solution or method which functions correctly but which is "ugly" in its concepion
  • works outside the accepted structures and norms of the environment
  • is not easily extendable or maintainable
  • can be slang for "copy", "imitation" or "rip-off."

These traits of a hack conform to my usage of the word--when applied to code it is always a term of derision. To my mind, a hack

  • Is likely to be difficult to maintain & hard to understand in the context of the rest of the code.
  • Is likely to cause failure of the app.
  • tends to indicate a poor understanding by the coder either of the problem space, usage of the language or both
  • tends to be the byproduct of aggressive schedules
  • suggests potential changes in requirements that have not been fully incorporated into the architecture of the solution (requiring an 'inorganic' workaround).
  • smells

all bad, bad, bad. To me, a hack in this sense is always negative, indicating either lack of time, incompetence, or sloth on the part of the developer, though a decent percentage of hacks must be written to compensate for ill-conceived designs or systems that have gained requirements which their original design cannot handle 'organically'.

I don't think I've really captured it totally though--it's like pornography a bit: I can't really define it, but I know it when I see it. So I ask you: what does it mean to 'hack' when you are trying to solve a problem in software?

like image 935
Kevin Won Avatar asked Aug 19 '10 23:08

Kevin Won


People also ask

Why do they call it a hack?

If you call someone a hack, you mean they're not great at what they do — especially writing. A mediocre writer is called a hack. Once upon a time hack was short for “an ordinary horse,” and now it's an insult for writers. No one wants to be a hack!

What is an example of a hack?

These include financial gain, theft of personal data, access to confidential information, the desire to take down websites, as well as idealism and political activism. While some forms of hacking are completely legal, most of them are not and are considered criminal offenses.

Can you hack closed ports?

In theory - yes, your computer can still be hacked even, if all TCP and UDP ports are closed and you don't have any malware running on it. However, odds of getting your computer hacked, if all ports are closed, is way lower compared to a system where a web server is listening on publicly accessible port.

What does hack mean in social media?

Social hacking describes the act of attempting to manipulate outcomes of social behaviour through orchestrated actions. The general function of social hacking is to gain access to restricted information or to a physical space without proper permission.


2 Answers

I've always preferred Paul Graham's definition:

To add to the confusion, the noun "hack" also has two senses. It can be either a compliment or an insult. It's called a hack when you do something in an ugly way. But when you do something so clever that you somehow beat the system, that's also called a hack. The word is used more often in the former than the latter sense, probably because ugly solutions are more common than brilliant ones.

like image 148
Brian Willis Avatar answered Sep 21 '22 13:09

Brian Willis


From the Jargon File, the glossary of hacker slang:

The Meaning of ‘Hack’

“The word hack doesn't really have 69 different meanings”, according to MIT hacker Phil Agre. “In fact, hack has only one meaning, an extremely subtle and profound one which defies articulation. Which connotation is implied by a given use of the word depends in similarly profound ways on the context. Similar remarks apply to a couple of other hacker words, most notably random.”

Hacking might be characterized as ‘an appropriate application of ingenuity’. Whether the result is a quick-and-dirty patchwork job or a carefully crafted work of art, you have to admire the cleverness that went into it.

An important secondary meaning of hack is ‘a creative practical joke’. This kind of hack is easier to explain to non-hackers than the programming kind.

like image 26
polygenelubricants Avatar answered Sep 20 '22 13:09

polygenelubricants