I often hear co-workers saying to each other, "That's a horrible, horrible hack."

What I can take away from that is that it's not good. When I asked them if it works they say "yes, but it's not good". Does that mean it's not a good solution? How is a solution bad if it works? Is it due to good practice? Or not maintainable? Is it using a side effect of code as a part of your solution?

It's interesting to me when something is classified as a hack. How can you identify it? 

It's applying a temporary band aid to a large gaping wound. It's fixed for now, but it is going to cause even more problems later.

An example I've recently seen: You want a person named "Jim", to always appear first in an alphabetical list. To quickly solve it, you rename him to " Jim". This is a hack that will surely come back to bite you later.
