I don't understand hyphens

I disagree on both counts. The goal of any writing should be both clarity (which is not achieved by using one mark for quite differing purposes — as noted by another poster, potentially to link or to separate) and as little opportunity for confusion as can be achieved.

I will confess to being perplexed about the use of an en-dash to connect compound adjectives but not compound nouns. I’ll also confess to using a hyphen in both instances. It would make more sense if the en-dash were reserved solely for the other three purposes, all of which involve numerals.

And I agree that it’s a style matter as to whether spaces should appear on either side of an em-dash. I personally think using spaces looks a lot more elegant. I would argue for doing this on the basis that distinct words (that is, those that are not part of a compound noun or adjective) are nearly always separated by spaces. It seems jarring to me to suddenly see unrelated words appear without a space at the end or the beginning.

Firstly, it’s an extremely tortured example that’s hardly worth requiring an entire punctuation mark to resolve. I dislike making general statements but I don’t think a reader will often run across the second version very often as it verges on ungrammaticality if it’s not outrightly so. Secondly, it’s easy to make any sentence ambiguous.

I like ambiguity more than other people.

But far more likely is that context will serve to draw out the intended meaning.

It was the best I could think of in a few seconds.

But you CAN see that this could be an issue, right? The example was meant to show how words that can be connected in two very different ways depending only on a little dash.

“Eats Shoots and Leaves” is another example of such a sentence. Nobody would likely see that combination in real life either, but it sure made for a good book about punctuation and grammar. In fact, it was a fucking NYT bestseller.

Panda - Eats, shoots and leaves.

If an obvious example doesn’t come immediately to mind then the problem is probably not worth the effort to solve.

I’m familiar with the book. In fact, it’s where I got my username from. The title is a joke, not an actual issue people are contending with. There are lots of ways you can clarify it. The easiest would be to give it a subject. That is to say, it’s hardly surprising that when you skip out on an actual grammatical constraint of english what you’re left with tends to be ambiguous.

Bullshit.

Going from a principle to an example, rather than the other way around, isn’t always easy on the fly. Doesn’t mean the problem doesn’t exist.

EXACTLY. Just like my example.

So we have:
Hyphens
Minus signs
En dashes
Em dashes
And something nobody’s mentioned: nonbreaking hyphens

It seems that on the keyboard, the first 2 are the same.

You’re forgetting “soft hyphens,” which appear only when there is a need to break a word at the end of the line.

There’s also figure dashes.

It’s all stylistic, but the way I learned it is generally no spaces for either. You certainly wouldn’t put a space around an en dash when it is used to denote a range (the most common use for it, in my experience, and I still have alt+0150 etched into my brain for this reason). However, some styles prefer to use an en dash instead of an em dash for what you might call parenthetical or asides or breaks of thoughts mid-sentence or whatnot. In those cases and for those typesetters who prefer the en dash instead of an em dash, it’s invariably, so far as I have seen, surrounded by spaces.

Personally, I find the distinction between en, em, and figure dashes to be of dubious utility, more of a typesetter’s concern like making sure an “fi” gets the appropriate font ligature instead of being printed as individual “f” and “i” characters. However, the distinction between hyphens and dashes in general I do find useful.

I can sum it all up. Typography is not the same as word processing, and typesetting is not the same as using a (traditional) typewriter.

Yes, but the issue is that we now have computers, which are not typewriters and have nearly all the capabilities of typesetting (in 2014, word processing and typesetting are almost the same thing). We should learn to use this new capability as best we can.

This is a good, simple book about that (a bit dated but it works):

(There’s also a Mac version).

I use this book whenever I’m trying to get someone to drop the ancient, annoying habit of putting two spaces between sentences.

Ha! I knew it had to be (the other) Robin Williams’ book you were referencing before I ever followed the link.

The Mac is Not a Typewriter was among my bibles in the earlier days of my career, and her other Mac-related books were very helpful and entertainingly written.

I recall getting into a dispute with someone on an old newsgroup about the “annoying” habit of putting two spaces after a period you mention. I cited Williams’ book as a reference, and he pooh-poohed the whole concept with “just because some lame Mac book says so.”

I wonder how that guy feels today.

I’m sure he’s still doing it. He’s also still typing “Enter” at the end of each line of text. He also gets up out of his chair to change the channel on his TV, and heats up his lunch on a stove instead of the microwave.

Much better usage. I stand by my claim that the original example was poor. As I said, I agree with Poe’s explanation, which your example here follows.

Why should I trust you?

The original was inelegant, but it was a perfectly legitimate and grammatical use of the dash.

I use em dashes alot. And words. Plus, just look at me - would I lie?