Sentence Spacing — 1 Space or 2? 814
An anonymous reader noted an epic battle is waging, the likes of which has not been seen since we all agreed that tab indenting for code was properly two spaces. He writes "Do you hit the space bar two times between sentences, or only one? I admit, I'm from the typewriter age that hits it twice, but the article has pretty much convinced me to change. My final concern: how will my word processor know the difference between an abbr. and the end of a sentence (so it can stretch the sentence for me)? I don't use a capital letter for certain technical words (even when they start a sentence), making it both harder to programmatically detect a new sentence and more important to do so. What does the Slashdot community think?"
Twice (Score:3, Interesting)
As an interesting note, the iPhone auto-enters a period when you double space, so the tradition is still partially alive, at least.
2. Duh. But... (Score:3, Interesting)
HTML says 1 space! (Score:1, Interesting)
Typesetting vs typing (Score:4, Interesting)
Ever since proportional fonts came to the desktop, people have found it hard to decide whether they are 'typing' or setting type. (eventually, in the DTP era, there was even a book, The Mac is not a Typewriter [abebooks.com]).
In typesetting, all word spaces are treated equal (except by TeX, which implements a more typewriter-like convention after periods; it also subtly modifies spacing after commas, semicolons too). This may also be a European/North American distinction, similar to the spaced-en-dash versus unspaced-em-dash convention.
TeX, and the TeXbook, are where many geeks from the CS side of the fence got their first typographic exposure and education. Some of Knuth's aesthetic decisions, like this one, do smell a bit funny to professional typographers. But his implementation of math setting is probably close to definitive (damn it Jim, I'm a typographer not a mathematician).
Wait till they find out that German uses letterspacing for boldfacing, and that it used to be normal practice to have thin spaces before punctuation, etc, etc... The study of typographic conventions is easily a life's work.
Re:TAB is the one true indentation (Score:5, Interesting)
I'll grant you that on one condition ... if your fancy text-formatter is going to write in a consistent number of chars so that if it's rendered by another editor it still works, then fine. Otherwise, no.
A former co-worker and I got into this argument. His emacs would use a single "tab" char to display between 1 and 40 tabs because it "knew" what it meant to do, but any other editor might render it like shit since it didn't have the right number of actual chars and relied on a specific mode.
It caused huge problems with those of using different editors which didn't interpret the tabs the same way. Eventually, I locked him out of CVS until he fixed his emacs to adhere to our coding standard -- our manager agreed with me. :-P
If you mean it to be 8 levels of indent, you need 8 placeholder items. Not one which is interpreted by your *^&%* editor (and only your editor). Otherwise, you end up with vast diffs specific to whitespace, and not what was changed. The resulting document must be properly rendered in any text editor, and it must do it consistently.
But, yes. The Tab is the unit of measure, and your editor can render a tab as however many chars make you happy.
"...we all agreed that tab indenting for code... (Score:5, Interesting)
...was properly two spaces."
Like hell we did.
Re:False assumption (Score:3, Interesting)
However, Google also says that Android code should use four-space indents [android.com].
Space for readability (Score:4, Interesting)
If you are doing type setting, by all means use 1 spaces. But as you cut and paste your texts into different programs, you may be pasting into different default type faces. Sometimes it's proportional and sometimes it's monospaced. So why not use 2 spaces to be on the safe side? It's simple to programmatically replace 2 spaces by 1 space any way, if necessary. Let's be considerate of our readers rather than swear allegiance to a rule learnt in our youth.
Re:Two spaces, bitches. (Score:3, Interesting)
Try 's/\. / /g'. I can't think of any code that would get screwed up by that.
Re:Monospaced or proportional (Score:5, Interesting)
I was about to say the same thing. Because in fixed-width the period is so small, the space to the right of it in its block plus the space amounts to quite a lot of room. In proportional fonts, you don't need to worry so much.
I am accustomed to working with and thinking about text through a terminal window - as a result I always singlespace my sentences now.
Re:TAB is the one true indentation (Score:5, Interesting)
Elastic tabstops (http://nickgravgaard.com/elastictabstops/) are the future.
Re:One space (Score:4, Interesting)
The problem with two spaces is that there is not two spaces between a sentence logically. Professional typography uses one single space that is longer than the inter-word space, but shorted than a double inter-word space. Let your typesetting system determine the where the sentence ends, and adjust the space properly. TeX and LaTeX, are happy to do that.
Re:False assumption (Score:3, Interesting)
I code in Python too (among other things) and I ALWAYS use tab indents with the tab usually being set to 3 spaces for display purposes. (But if the code is deeply nested I may reset the display so that one tab == 2 spaces.)
OTOH, code deeply nested enough to require reseting the display is also deeply nested enough to be considered for refactoring.
N.B.: I use the same indentation whatever language I'm programming in at the moment. Python isn't a special case. (OTOH, this means I never use IDLE.)
Not a readability thing. (Score:4, Interesting)
As far as efficiency is concerned -WTF- people have a data density that they want in their communications, as the extra space allows for some time to comprehend the data, assuming that the reader is maintaining a pace.
LaTeX and full stops (Score:1, Interesting)
Efficiency has nothing to do with it.
The reason you add two spaces is because the additional space aids your eyes in determining individual sentences. Two spaces gives the eyes an additional visual cue, and thus is far easier to parse.
Please explain why you used one space between all sentences in your post.
Agreed. Use one space, and let the software figure things out. (La)TeX has been doing this for decades:
http://en.wikipedia.org/wiki/Sentence_spacing
Similarly with indentation with codes. Insert a character, and let the software figure out how to visually portray it (perhaps the project has a code style guide like FreeBSD's style(9)). I've heard of places that do a pre-commit run through lint(1) before allowing check-ins to enforce consistency.
Re:False assumption (Score:3, Interesting)
Efficiency has nothing to do with it.
The reason you add two spaces is because the additional space aids your eyes in determining individual sentences. Two spaces gives the eyes an additional visual cue, and thus is far easier to parse.
Please explain why you used one space between all sentences in your post.
Don't browsers generally reduce white space to a single space?
Re:False assumption (Score:2, Interesting)