Slashdot Mirror


Sentence Spacing — 1 Space or 2?

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?"

118 of 814 comments (clear)

  1. False assumption by tedgyz · · Score: 4, Insightful

    we all agreed that tab indenting for code was properly two spaces

    Say what?!?? Who made that decision? In the java world, 4 spaces is pretty standard.

    --
    "No matter where you go, there you are." -- Buckaroo Banzai
    1. Re:False assumption by biryokumaru · · Score: 2, Informative

      Microsoft used to be pretty fond of 8 spaces... that was painful...

      --
      When you're afraid to download music illegally in your own home, then the terrorists have won!
    2. Re:False assumption by conteXXt · · Score: 4, Informative

      I think this is the joke.

      --
      The truth about Led Zep should never be told on /. (Karma suicide ensues)
    3. Re:False assumption by chebucto · · Score: 5, Funny

      It's a well-known fact that God uses 3-space tabs. I don't want to go to hell, so that's what I use, but your eternal soul is your own call, buddy.

      --
      The English word fart is one of the oldest words in the English vocabulary.
    4. Re:False assumption by Cryolithic · · Score: 5, Insightful

      The linux Kernel is (was?) 8 spaces. The idea between 8 space tabs is that if your code is indented so far as to be a pain to read, then you should probably look into why it's so nested.

    5. Re:False assumption by bcat24 · · Score: 2, Interesting

      However, Google also says that Android code should use four-space indents.

    6. Re:False assumption by ronocdh · · Score: 3, Informative

      The best jokes are never understood on first telling.

      Back to the subject at hand, however, why not consult the Chicago Manual of Style? To cut to the chase:

      So, in our efficient, modern world, I think there is no room for two spaces after a period. In the opinion of this particular copyeditor, this is a good thing.

      Seems pretty reasonable to me, and it's from quite a credible source. Read the full page for justification (no pun intended).

    7. Re:False assumption by rickb928 · · Score: 2, Informative

      ASCII back when there was 'just' ASCII, was an 8 space tab. MS adopted that where it was needed, and in my world, 8 spaces for a tab is standard.

      If you're just indenting, whatever you like. If your envirenment or prefers a different standard, either adopt it or be prepared to cause problems.

      I tend to indent 1 or 2 spaces, because I can make sense of it. But some editing software has its own ideas.

      And this is not the most important topic for us to consider.

      --
      deleting the extra space after periods so i can stay relevant, yeah.
    8. Re:False assumption by Obfuscant · · Score: 4, Informative
      ASCII back when there was 'just' ASCII, was an 8 space tab.

      ASCII when there was just ASCII had a tab character which was commonly interpreted as "tab to the next multiple of 8 column". If you were in column 4, a tab would not look like 8 spaces, it would look like 4 spaces.

      On the keypunch I used, TAB meant "advance to the next tab column as indicated on your drum card." For FORTRAN, that meant the first tab skipped to column 2 (line number), the next tab to column 6 (continuation), the next to 7, a few every four spaces, and then off to column 72 (card number).

      Every reasonable typewriter I used had tab stop settings so you could define what columns a tab took you to.

      If your envirenment or prefers a different standard, either adopt it or be prepared to cause problems.

      Thus was created "indent", which converts code from all those other people's atrocious formatting styles into your preferred on and back.

    9. Re:False assumption by HiThere · · Score: 2, 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.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    10. Re:False assumption by Civil_Disobedient · · Score: 5, Insightful

      So, in our efficient, modern world, I think there is no room for two spaces after a period. In the opinion of this particular copyeditor, this is a good thing.

      Efficiency has nothing to do with it. In fact, efficiency is a complete red-herring, since presumably in our efficient, modern world we could simply write software to be intelligent enough to automatically add a space between sentences when it detects a period-space-word starting with a capital letter.

      The reason you add two spaces is because the additional space aids your eyes in determining individual sentences. If you only use a single space to delineate words and sentences, all paragraphs merge into a jumble. Two spaces gives the eyes an additional visual cue, and thus is far easier to parse.

      and it's from quite a credible source

      An appeal to authority is less argumentatively valid than an appeal to reason. The Chicago Manual of Style gives no reason except some hand-waiving about our "efficient, modern world," which is a huge, steaming pile of bunkum.

    11. Re:False assumption by Chris+Burke · · Score: 2, Informative

      With tabs each person can set their tabstop however they want.

      And if they want it to look right, they need to set it to exactly what the original author did. Every time you decide to break up a line of code, you're making a decision that locks the reader into a particular spacing in order to have legible code.

      Do you want to have legible code? Yes? Use spaces then. And if you can't handle reading code that doesn't use your "preferred" spacing, then it is you, not the code author, who has the puppy-killing control issues.

      --

      The enemies of Democracy are
    12. Re:False assumption by afabbro · · Score: 3, Insightful

      Kernel is 1 tab, which is always 8 spaces. This is completely different from 8 space indent.

      Thank you. People who indent with spaces should be shot. Indent with tabs all you want and I can view it the way I want (2 space, 4 space, etc.).

      If you use spaces instead of tabs, I'm going to have to take two seconds to run some elisp to fix it ;-)

      --
      Advice: on VPS providers
    13. Re:False assumption by ronocdh · · Score: 2, Insightful

      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.

    14. Re:False assumption by BasilBrush · · Score: 4, Informative

      The reason you add two spaces is because the additional space aids your eyes in determining individual sentences

      That was the reason in the days of typewriters. And it continues to be the reason if you are writing in a text editor using a monospaced font. But a word processor will space a document properly, such that the space between sentences IS wider than a space between words.

    15. Re:False assumption by networkBoy · · Score: 5, Informative

      because HTML is broken. There is two spaces after the preceding period but you can not see them.Now you can because I used   tags. (no you can't because /. is broken and does not render the tag properly...)

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    16. Re:False assumption by number6 · · Score: 2, Informative

      Thank you. People who indent with spaces should be shot. Indent with tabs all you want and I can view it the way I want (2 space, 4 space, etc.).

      If you use spaces instead of tabs, I'm going to have to take two seconds to run some elisp to fix it ;-)

      Problem with tabs is when you're lining up code on multiple lines (e.g., variables, where many people use whitespace between the type definition and the name to line up the names), a different tab size breaks the alignment. You either have to force everyone to use the same tab size, or suffer ugly code.

      If you're aiming to keep line length down (back in the days of 80 character displays), switching between tab sizes could cause code to become an unreadable wrapped mess if it'd been written using 2 space tabs (and fitted nicely into the editor window) and you viewed it with 8 space tabs (at which point it no longer did).

      These days it's almost irrelevant. Most IDEs allow you to reformat the whole file with a single keypress to whatever style you want. Then reformat back to project standard before submitting to source control.

      --
      I'm a number, not a free man!
    17. Re:False assumption by Korin43 · · Score: 2, Informative

      They probably have Slashdot set to "HTML Formatted", so any whitespace is converted to one space. Example: Look at the source for this post.

    18. Re:False assumption by onefriedrice · · Score: 2, 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?

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    19. Re:False assumption by cfulmer · · Score: 2, Insightful

      Computers really aren't very good at figuring this stuff out -- how would it space "Mr. Smith" or "Prof. Jones" or "M. Chevalier"?

      Personally, I'd rather have the computers figure out "Oh... period followed by two spaces followed by Capital letter. Must have started a new sentence" and correct appropriately.

    20. Re:False assumption by Chris+Burke · · Score: 2, Informative

      No. You indent by tabs to the correct level, and add spaces for effect afterwards where necessary. Even if you end up adding more spaces than a tab width. That way it looks right no matter the tab width.

      And then they set their tab width to something less than you did, and then the next level of indentation is indented less than your split line. It no longer looks right, it now looks the opposite of right, as in wrong.

      Tabs break things. If you use any tab stop other than exactly 8 spaces, and mandate that everyone else does to, you will break code formatting for someone, somewhere (terminals and line printers use 8-space tabs). And mandating 8 space-tabs breaks the alleged "advantage" of tabs in the first places.

      Tabs are broken. Spaces are the only way to ensure anyone viewing your code will see it correctly formatted. This is vastly more important than being able to tailor other peoples' code to your preference.

      --

      The enemies of Democracy are
    21. Re:False assumption by pdjohe · · Score: 4, Funny

      Just set your slashdot comment setting to code.  Then you can get two spaces with all their glory.

      And you'll get monospaced characters also.  Speaking of which, comments in code are monospaced.  Are two spaces after a sentence more correct there?  Personally, I think it looks too expanded.

    22. Re:False assumption by qengho · · Score: 2, Informative

      Please explain why you used one space between all sentences in your post.

      He actually used two spaces. Unfortunately for him, browsers collapse multiple spaces into one. He lacks commitment; a true Double-Spacer would have used two non-breaking spaces.

    23. Re:False assumption by Traa · · Score: 4, Insightful

      People who indent with spaces should be shot. Indent with tabs all you want and I can view it the way I want (2 space, 4 space, etc.). If you use spaces instead of tabs, I'm going to have to take two seconds to run some elisp to fix it ;-)

      People who indent with tabs should be shot. Indent with spaces all you want and I can view it the way IT WAS WRITTEN.

      There, fixed that for you.

      Really, using tabs only works in theory. You need to be pretty anal to never ever layout anything using spaces or the tabs argument breaks down. God forbid I line up some stuff to make it more readable.

      Yeah, yeah...this is religion to some. My argument is as moot as yours. Kinda what I'm pointing out.

    24. Re:False assumption by Peach+Rings · · Score: 2, Insightful

      You can't just pick your own indent convention. Things get incredibly painful when people use editors that auto-indent to different widths.

    25. Re:False assumption by Moxon · · Score: 5, Informative

      The way around this is to _indent_ with tabs and _align_ with spaces.

    26. Re:False assumption by Co0Ps · · Score: 2, Insightful

      In the real world when working on collaborated projects indenting with tabs is a pain due to the people who mix up tabs and spaces making the source code look completely broken. Then people will fix what they think is broken in their editor, making it even more broken in others. It's easy to accidentally indent with spaces, and since most editors does not display the difference between spaces and tabs, having a "tabs only" standard is bound to create a mess, as people are not perfect. I've worked on many collaborative projects and what I have found best is a spaces only convention with a fixed length of 4. Telling people to set the IDE to automatically convert tabs to the required number of spaces does the trick. Also, it seems like you think people should be amazed that your are able to replace tabs with spaces in your IDE? Welcome to new millennium. Here we use graphical IDE's with something called "Find & Replace". It does not require you too read a manual to understand how too use, and it supports regular expressions. Just matching tabs however does not. You can actually copy paste tabs as normal characters.

    27. Re:False assumption by Grishnakh · · Score: 4, Informative

      God forbid I line up some stuff to make it more readable.

      You can do both: use tabs for indentation, and spaces to line things up.

      So, if you have a statement like this:

              printf("testing 1 2 3 %d %s",
                              var1, var2);

      the printf would have a tab, and that's it. On the second line, there would be one tab (to match the line above it), and then the rest would be filled in with spaces, like this: (underscore indicates a space)

      printf("testing 1 2 3 %3 %s",
      ________var1, var2);

      That way, you can set your tab stop to whatever you want (2, 4, 8, 3, 5, 16, whatever), and it will look correct.

    28. Re:False assumption by KlaymenDK · · Score: 2, Funny

      I use four-tab spaces. ...and write *very* concise code, or it won't fit on the lines.

    29. Re:False assumption by thoromyr · · Score: 2, Informative

      You are almost correct. The reason that two spaces *used* to be added after a sentence instead of a single space was that typewriters were monospaced. If you use a monospaced font and only use a single space after a period to indicate a sentence it *is* visually ambiguous due to the large amount of extraneous white space between the edges of adjacent characters. So much white space, in fact, that you can often insert a character between two others (I've done this in manuscripts rather than retype a page).

      If you are producing a document using a monospaced font then you *should* use two spaces to help the readability of the text. On the other hand if, like most people, you are producing a document with a proportional font then only use one.

      In summary: the "rule" about using two spaces after the period ending a sentence was for typewriters and arose because typewriters had a (wide) monospacing.

    30. Re:False assumption by RoccamOccam · · Score: 2, Funny

      we could simply write software to be intelligent enough to automatically add a space between sentences when it detects a period-space-word starting with a capital letter

      Mr. John Smith
      Ms. Jane Doe
      Dr. Thomas
      W. Main Street.

    31. Re:False assumption by LateArthurDent · · Score: 2, Insightful

      People who indent with spaces should be shot. Indent with tabs all you want and I can view it the way I want (2 space, 4 space, etc.).

      The ability for you to view it however you want is precisely what I'm trying to avoid when I set space indentations. Code should be no wider than 80 characters, so I can use cat in a standard terminal and see the results without them being wrapped around at illogical locations. That means we all need to agree on using monospace fonts, 2-space indentations to maximize available screen space, and you need to wrap your code manually at locations where it makes sense to do so, at or before the 80-char mark. If you edit it with your own custom view, you can't follow these guidelines. Then when I look at the code, it's going to suck in a way I can't fix with a script or style change.

      You're on my lawn. Get off it.

    32. Re:False assumption by Belizean · · Score: 2, Interesting

      I know that using two spaces between sentences is correct and leads the eye better especially in speed reading. Unfortunately broken technology has forced me to struggle to unlearn this. The software I use to pull the Word Press posts that I write and then display on my static htm website breaks the text display if I do it the "proper" way, thus I am compelled to use one space.

    33. Re:False assumption by Anonymous Coward · · Score: 2, Insightful

      Now all you have to do is set your editor to always do that for automatic indentation, instead of inserting tabs for 8-space multiples and filling the rest with spaces.

      And also remember to never use the TAB key, only the space bar, to create such spacing even if your function name is anImpossiblyLongFunctionName()

    34. Re:False assumption by Obfuscant · · Score: 2, Informative

      Quote: Indent only indents, it doesn't insert or delete newlines...

      Incorrect.

      if (foo) { a = x; } else { a = 5; }

      is trivially converted to GNU format by "indent -gnu a.c", and becomes:

      if (foo)
        {
          a = x;
        }
      else
        {
          a = 5;
        }

      Looks like some newlines  have been inserted. And running that through K&R indent:

      if (foo) {
          a = x;
      } else {
          a = 5;
      }

      Newlines deleted.

    35. Re:False assumption by Grishnakh · · Score: 2, Informative

      Whoops, I just noticed that my "tabs" disappeared. It should look like this:

      [tab]printf("testing 1 2 3 %3 %s",
      [tab]________var1, var2);

    36. Re:False assumption by Wolfling1 · · Score: 2, Funny

      Tabs,shmabs;Spacing,shmacing;Readability is for losers!;Every C programmer knows this;Cheers;Me;Winner,Cryptic C Competition,1987;

    37. Re:False assumption by The_Noid · · Score: 2

      Exactly. People who stick to spaces for indentation don't realise that there is a difference between indentation and alignment.

      But elastic tab stops are still the best: http://nickgravgaard.com/elastictabstops/

    38. Re:False assumption by xaxa · · Score: 2, Insightful

      It works fine. Using ____ for tab and . for space:

      if (thing) {
      ____do stuff;
      ____and do some really
      ________long stuff;
      ____but-here(I'd like,
      ____.........these arguments,
      ____.........to align);
      }

      Changing ____ to ________ (or whatever) isn't a problem.

  2. "tab indenting for code was properly two spaces" by glwtta · · Score: 4, Insightful

    Well fuck you too, then.

    --
    sic transit gloria mundi
  3. What does slashdot say? by girlintraining · · Score: 5, Funny

    [Insert one thousand opinions here]

    The only one that matters: Is it still readable?

    We have bigger problems in the world than "one space or two" ... for example, people's atrocious speling.

    --
    #fuckbeta #iamslashdot #dicemustdie
    1. Re:What does slashdot say? by Hatta · · Score: 4, Insightful

      Two spaces makes it easier to parse with a regexp. Any period followed by two spaces is the end of a sentence. If you use one space, you might pick up sentence fragments with titles (Mr. Mrs., etc.)

      Of course, the question is really moot. LaTeX ignores whitespace and just does what it thinks is right. I am willing to trust LaTeX.

      --
      Give me Classic Slashdot or give me death!
    2. Re:What does slashdot say? by elrous0 · · Score: 2, Funny

      Agread.

      --
      SJW: Someone who has run out of real oppression, and has to fake it.
    3. Re:What does slashdot say? by david.given · · Score: 2, Insightful

      Any period followed by two spaces is the end of a sentence.

      Or a newline.

    4. Re:What does slashdot say? by MattMattMatt · · Score: 2, Funny

      It's a good idea to use LaTeX throughout the sentence, otherwise there might not be a period at all.

  4. One space by GuJiaXian · · Score: 5, Informative

    I've been an editor (copy editor, proofreader, senior editor, etc.) for 10 years now. One space.

    1. Re:One space by morgan_greywolf · · Score: 3, Informative

      No, he's not loco. He's correct, at least if he's going by the AP style guide or, indeed, many other such materials. It's one space for any proportionally-spaced font. (Fixed-spaced fonts (Courier, American Typewriter, Lucida Console, Bitstream Vera Mono, etc.) aren't used in most professionally-published work, except for stuff like code in a technical publication.)

    2. Re:One space by Culture20 · · Score: 2, Insightful

      I've been an editor (copy editor, proofreader, senior editor, etc.) for 10 years now. One space.

      Oh yeah? I've been a typer for 25+ years now. Two spaces (but HTML will render it as one without manual spacing which has always bugged me since 1994).

    3. Re:One space by commodore64_love · · Score: 2, Insightful

      >>>I've been an editor (copy editor, proofreader, senior editor, etc.) for 10 years now. One space.

      No. Two spaces separate the sentences further apart, and make it easier to read the document without accidentally running two sentences together.

      --
      "I disapprove of what you say, but I will defend to the death your right to say it." - historian Evelyn Beatrice Hall
    4. Re:One space by Rob+the+Bold · · Score: 4, Insightful

      I've been an editor (copy editor, proofreader, senior editor, etc.) for 10 years now. One space.

      Why stop there? Really. Is even one space really needed? Doesn't a period, question mark or exclamation point denote the end of a sentence. Why go all redundant and put a space in at all . . .

      Oops, I guess an ellipsis can end a sentence too.

      I'm not being snarky here. But I am thinking that the answer to the question "Why not zero spaces?" would be "Because that would make it harder to read".

      --
      I am not a crackpot.
    5. Re:One space by Tacvek · · Score: 3, 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.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
    6. Re:One space by bluefoxlucid · · Score: 3, Informative

      It's one space for any proportionally-spaced font.

      I use a lot of proportionally spaced fonts, including Times New Roman and Arial from Microsoft's True Type Fonts as well as whatever open-source fonts come with Linux. I can tell you that not only is a space narrower than an 'n', but it's also the same width regardless of if it comes after a period or not. Spaces are wider when using justified alignment, but across a whole line rather than just at periods. Further, periods themselves are extremely narrow: the spacing after a period is non-existent, and kerning will make the situation even worse by placing the period inside a 'W' or 'Y'.

      As a result, single-space provides more of a problem for today's proportional fonts than fixed-width fonts, since spaces are extra-wide with fixed width fonts anyway (as in, not more narrow than an 'n'). It's hard to read either Courier New or Arial, in any case, with single spacing: my eyes wander while my brain processes a chunk of text, so I grab 3 or 4 words at a time and then have to identify where I am. Without the geographical landmarks of extra white space scattered about a paragraph, I have a lot of difficulty returning instantly to wherever I was every few milliseconds; it can take several seconds to reorient my vision sometimes if a bug or some other piece of movement distracts me for the briefest fraction of a second.

    7. Re:One space by Mongoose+Disciple · · Score: 2, Insightful

      But we all write all the time, if not intended for publication.

      Should 1% or less of all writing dictate what should happen to the other 99%+ of writing?

    8. Re:One space by Thinboy00 · · Score: 4, Informative

      Wikipedia's featured article on the subject (happens to be today's, actually).

      --
      $ make available
    9. Re:One space by utoddl · · Score: 2, Funny

      "Why not zero spaces?" Seriously, there's this guy who works in another building on our campus.He uses zero spaces between sentences.Whenever I see email from him I get angry.It's gotten to the point where I'm thinking where his building is would make a nice meteor crater.I know that's not healthy thinking.Zero spaces after sentences is annoying as all get out.

    10. Re:One space by fahrbot-bot · · Score: 3, Informative

      Oops, I guess an ellipsis can end a sentence too.

      In this case, 4 periods are actually used....

      --
      It must have been something you assimilated. . . .
  5. Monospaced or proportional by ThrowAwaySociety · · Score: 5, Informative

    Two spaces are appropriate for typewriters and similar monospaced fonts (Courier, Monaco, Andale Mono, Consolas, Vera, Deja Vu mono)

    One space for proportional fonts (Times, Helvetica, almost everything.)

    1. Re:Monospaced or proportional by Zocalo · · Score: 4, Funny

      You forgot about the special case where you should use variable amounts of spaces, at random, to add to the horror that is is Comic Sans.

      --
      UNIX? They're not even circumcised! Savages!
    2. Re:Monospaced or proportional by JesseMcDonald · · Score: 2, Insightful

      I disagree. Even with proportional fonts one space at the end of a period makes the text look crowded.

      If that's true, why do you only use a single space in your comments?

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    3. Re:Monospaced or proportional by Improv · · Score: 4, 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.

      --
      For every problem, there is at least one solution that is simple, neat, and wrong.
    4. Re:Monospaced or proportional by Tumbleweed · · Score: 2, Insightful

      No because a typeface is (should be) designed with spaces in mind.

      Yeah, the world should be a better place, but...

      I've seen all too many (very popular) proportional fonts that even with two spaces, LOOK like one. And kerning seems to be a lost art these days. Ugh.

    5. Re:Monospaced or proportional by arielCo · · Score: 2, Insightful

      Read above, re HTML collapsing multiple spaces into one. He'd have to type one of the two as  .

      --
      This post contains no rudeness or derision of any kind. All arguments are friendly. Terms and exclusions may apply.
    6. Re:Monospaced or proportional by SleazyRidr · · Score: 4, Insightful

      Probably because html strips out the second space, and slashcode won't recognize &nbsp.

    7. Re:Monospaced or proportional by Improv · · Score: 2, Informative

      Oh, p.s. if, considering my argument below, you really prefer standards bodies above the consensus route, "The Chicago Manual of Style (1), the AP Stylebook (2), and the Modern Language Association (3) all recommend using one space after a period at the end of a sentence. ", as noted by "Grammar Girl" at:

      http://grammar.quickanddirtytips.com/spaces-period-end-of-sentence.aspx

      (she provides references to back up that assertion).

      I should note that I'm more of a "rough consensus" guy myself and that this is a matter where I don't think there's a right answer between one and two -- I think reasonable people may disagree and that it comes down to style.

      --
      For every problem, there is at least one solution that is simple, neat, and wrong.
    8. Re:Monospaced or proportional by nabsltd · · Score: 2, Informative

      What about forestalled sentence termination due to interrup-- Hey, I'm talking here!

      I believe the correct way to format that last bit is: due to interrup—Hey, I'm talking here!

      Unlike the question of how many spaces should be used after a period, the n-dash and m-dash are punctiation marks. As such, they have rules for use that are much more hard and fast. One of those is that there should be no space between the letters on either side of the dash and the dash itself. This rule applies to all dashes (hyphen: twin-engine, n-dash: 9–5, m-dash: Shatner—is speaking).

  6. Twice by jockeys · · Score: 2, Interesting

    Old enough to have typed on a typewriter as a child, so twice.

    As an interesting note, the iPhone auto-enters a period when you double space, so the tradition is still partially alive, at least.

    --

    In Soviet Russia jokes are formulaic and decidedly non-humorous.
    1. Re:Twice by AndyAndyAndyAndy · · Score: 2, Informative

      As an interesting note, the iPhone auto-enters a period when you double space, so the tradition is still partially alive, at least.

      True, but it inserts a single space with that period.

      --
      It's always confirmation bias!
  7. Depends on the font by jpatters · · Score: 4, Informative

    It depends on the font. If it is monospaced (such as on a typewriter) it should be two spaces. If you are using a proportional font, use one space.

    --
    "Remember, there never were pineapple-almond cookies here."
  8. Not just problem for automatic parsers by CannonballHead · · Score: 3, Insightful

    It's easier for a human to determine sentence structure when sentences are set apart by two spaces, too.

  9. 2. Duh. But... by slgrimes · · Score: 3, Interesting

    I always put 2 spaces at the end of a sentence. Oddly, though, I've noticed that when I type, if it's a space between words I use my right thumb. For the end of my sentence, I use my left one. Something I didn't even realize I did until about 6 months ago, and I've been doing this for about 20 years!

    --
    What is popular is not always right; what is right is not always popular.
  10. The Slashdot Community Thinks... by Bieeanda · · Score: 5, Funny
    ...that you need to get out more. Adopt a dog. Maybe find a girlfriend.

    Seriously, dude. We're starting to worry about you.

    1. Re:The Slashdot Community Thinks... by noidentity · · Score: 4, Funny

      Adopt a dog. Maybe find a girlfriend. Seriously, dude. We're starting to worry about you.

      Oh damn, that's where I went wrong. I thought I was supposed to find a dog and adopt a girlfriend. The latter encounter didn't end well.

  11. OLD NEWS (1989) by starglider29a · · Score: 5, Informative
    http://www.amazon.com/Mac-not-typewriter-professional-level-Macintosh/dp/1877932051/ref=sr_1_4?s=books&ie=UTF8&qid=1280942506&sr=1-4

    The Mac is not a typewriter not only lays down guidelines, but explains the logic behind them, such as why punctuation should be hung, why there should not be two spaces after periods, why text set in all caps should be avoided.

  12. Word processor? by TheRaven64 · · Score: 4, Insightful

    If your word processor is using the whitespace that you enter, rather than typesetting your text according to whatever your style rules define, you need to get a new word processor. I tend to use two spaces at the end of a sentence, because I tend to edit text in monospace and it gives me a clear visual break between sentences, but that doesn't mean that I expect two spaces in the typeset output - even a web browser is more intelligent than that. Generally I find around 1.2-1.4 gives maximum readability. You want a slightly larger gap between sentences than between words, but double the width of a normal space gives too large a gap for easy reading. Of course, the width of a single space varies slightly from line to line when typesetting justified text.

    --
    I am TheRaven on Soylent News
  13. Use LaTeX. by R.Mo_Robert · · Score: 4, Insightful

    Use LaTeX (especially if you're typing technical things), then you won't have to worry about it. Type what you mean, and let the typesetter and styles handle the details.

    (I should note that if have a period followed by space that isn't a new sentence or a or a period following a capital letter that is, in which case you'll need to mark up the period with \ or @ to let it know, but these are generally fringe cases.)

    --
    R.Mo
    1. Re:Use LaTeX. by WillAdams · · Score: 5, Informative

      Not really fringe cases, and requires a bit of effort, unless one uses \frenchspacing (which is not the default) so one _will_ need to think about it, since TeX by default adds more space after a period, so one must indicate which periods do not require additional spacing, e.g.:

      Dr.\ Knuth was very concerned with the typography of his published articles and books. This resulted in his development of \TeX\ when early systems for page composition were unable to match the old styles. While it handles many things automatically, it does require a certain attention in the preparation of the text, i.e.\ indicating normal width spaces by preceding them with a backslash.
      \vfill\eject\bye

      William

      --
      Sphinx of black quartz, judge my vow.
  14. One by mseeger · · Score: 4, Funny

    During the early area of the internet (around 1990) i held courses and taught new users, how to use the "blank" correctly. Rules were:

    • no space before ")" and ",",
    • no space after "(" and
    • one space after "." and ",".

    People who didn't followed the rule were convicted for excessive blanking.... at least here in germany.

    CU, Martin

  15. Depends on format by Geisel · · Score: 4, Insightful

    Myself, I'm a two-space typer. My finger know a sentence-ending period is followed by two spaces and they just do it. However, in certain formats, such as HTML, white space is ignored anyway and then formatted by the format-processor (obviously a web browser in the case of HTML).

    While I'm a two-spacer, the medium in which we type is largely making this a moot point.

    -geis

  16. TAB is the one true indentation by ejtttje · · Score: 4, Insightful

    This diverging discussion is the perfect example of why it is clear the ideal code indentation is a TAB. Set your editor to display whatever indentation width you like, don't expect to inflict that choice on everyone else. Plus it eliminates the possibility of sloppy partial indentations, and it's fewer keystrokes to boot. Win, win, win.

    1. Re:TAB is the one true indentation by gstoddart · · Score: 4, Interesting

      This diverging discussion is the perfect example of why it is clear the ideal code indentation is a TAB. Set your editor to display whatever indentation width you like, don't expect to inflict that choice on everyone else. Plus it eliminates the possibility of sloppy partial indentations, and it's fewer keystrokes to boot. Win, win, win.

      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.

      --
      Lost at C:>. Found at C.
    2. Re:TAB is the one true indentation by noidentity · · Score: 3, Informative
      Yes, tab represents the intent, rather than the implementation. And before anyone complains that the code will format wrong if you do view it with the wrong tab spacing, that's because you're using tabs wrong. Where horizontal alignment between lines is important, you should be sure they align no matter what the tab spacing.

      But I think this discussion is about putting spaces after the period that ends a sentence, not whether to use one or two spaces for indention. Applying the above here, you should represent sentences in a way that your typesetting program can apply its stylesheet to sentences, rather than individual characters.

    3. Re:TAB is the one true indentation by Ragzouken · · Score: 5, Interesting

      Elastic tabstops (http://nickgravgaard.com/elastictabstops/) are the future.

    4. Re:TAB is the one true indentation by ejtttje · · Score: 3, Informative

      Ah, yes that setting avoids spaces-per-tab issues by not using tabs, but your personal spaces-per-indent setting is still being hardcoded in the source.

      The original question was: how do I tell it to use tabs for indentation instead of spaces? Best solution I know is to go into each mode (c++-mode, java-mode, etc.) and tweak the indentation setting to match the tab width, which looks like:
      (defun my-mode-hook ()
      (setq tab-width 2)
      (setq truncate-lines t)
      (setq c-basic-offset 2))
      (add-hook 'c-mode-hook 'my-mode-hook)
      (add-hook 'c++-mode-hook 'my-mode-hook)


      (ugh, why do I need to 'program' my editor to configure a setting... sigh.)

    5. Re:TAB is the one true indentation by tuffy · · Score: 2, Informative

      That was my fault for misreading the question. SmartTabs is probably best for a "tabs everywhere" approach that degrades gracefully on other editors, regardless of tab width.

      --

      Ita erat quando hic adveni.

  17. Ok by Thyamine · · Score: 4, Funny

    So I started reading this, thinking oh this sounds interesting to ponder. And then I got about halfway through the wiki entry and realized, ok no it's not. I learned with two spaces. Let me know when the discussion is done and I'll just do that.

    --
    I will shred my adversaries. Pull their eyes out just enough to turn them towards their mewing, mutilated faces. Illyria
  18. Re:a suggestion by Anonymous Coward · · Score: 2, Informative

    Actually, there are multiple types of spaces in typesetting, with multiple widths. A properly typeset book will use a single em-space (a widened space approximately the width of the letter "m") between sentences and a narrower space between words. FWIW.

  19. How to get out of work on a progeamming team by AnonymousClown · · Score: 5, Funny
    1 .Attend meeting with some sort of electronic device.
    Ask "Should I use spaces or tabs for newlines?"
    3. Hang out and serf web.
    4. Discussion settled? Ask "Should there be brackets around code even if there's only one line? Like this:

    If( foo == true)
    a=x;

    Or is it:
    If( foo = true)
    {
    a=x;
    }

    sit back and surf web for a few more hours.

    --
    RIP America

    July 4, 1776 - September 11, 2001

    1. Re:How to get out of work on a progeamming team by maxwell+demon · · Score: 4, Funny

      "Should I use spaces or tabs for newlines?"

      Neither. Depending on the system you're working on, use either a carriage return, a line feed, or a line feed followed by a carriage return. Fortunately the return key usually generates the correct newline marker for your system.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:How to get out of work on a progeamming team by orasio · · Score: 2, Insightful

      Number 4. :
      Yes.

      Not leaving brackets around one-liners is an invitation to mistakes.
      If you want to add a debug line to the one-line block, you need to add brackets.
      If you remove it, then remove the brackets.
      Using them always gives you one less thing to think about.

    3. Re:How to get out of work on a progeamming team by yotto · · Score: 2, Funny

      That only works when there's not a coding standard in place at said company. A good coding standard covers all those points and much, much more, leaving developers to debate the problems that actually matter to the company.

      I read this as "...leaving developers to create the problems that actually matter to the company." which makes your comment absolutely hilarious.

  20. Typesetting vs typing by toby · · Score: 3, 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).

    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.

    --
    you had me at #!
  21. Semantic markup by itsdapead · · Score: 5, Funny

    <posting target-moderation="funny">

    <sentence tone="exclamation">silly boy</sentence>

    <sentence>you <contraction>should not</contraction> be mixing content with layout</sentence>

    <sentence>use an <acronym>extended markup language</acronym> schema that removes the ambiguity and allows the viewer to determine <alternative-list><item>his</item><item>her</item></alternative-list> preferred layout and punctuation <aside>or even see it presented in <abbrev>text message</abbrev>format allowing accessibility by teenage people</aside> </sentence>

    </posting>

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
  22. Re:One space between sentences by bwintx · · Score: 2
    +1. Especially this part:

    PITA for the Quark/InDesign/Scribus operator.

    --
    Discussion System prefs link: http://slashdot.org/users.pl?op=editcomm
  23. Re:Quick fix by vlm · · Score: 3, Funny

    Find: ".__"
    Replace "._"

    Find morse code W and replace with morse code A? Ahy aould I aant to do that? (bad) fake british accent?

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  24. "...we all agreed that tab indenting for code... by John+Hasler · · Score: 5, Interesting

    ...was properly two spaces."

    Like hell we did.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  25. Re:Two spaces, bitches. by gstoddart · · Score: 2, Insightful

    Yeah, if you are a douche bag. It's 1 space. WTF is the reason for 2? Your eyes so poor you cant see the delineation?

    Because some of us are old and spent many years in a monospace font, and liked it.

    Seriously, I've been doing two spaces after a full-stop for so long that I'd never be able to stop doing it (I've been typing since the early/mid 80's). It just becomes part of how you do things. The reality is, it may or may not render in such a way as anybody will notice it -- that doesn't mean I'm going to stop doing it.

    If you were taught to use the two spaces, you're likely to always use that.

    --
    Lost at C:>. Found at C.
  26. We're talking text, not code by ProppaT · · Score: 4, Informative

    If you read the question, we're talking about text, not code. I couldn't care less what you do with your code; however, as a professional writer, the new standard is one space.

    If you really want to get into the the theory behind it, it's actually quite simple. We now use one space to avoid "rivers of white" in text. In short, if you look at a sample of documents that have been double spaced after the punctuation, you'll start to notice lines of white that run throughout the document. This distracts the reader and lowers the readability of the document. In typewriter days, two spaces made a lot of sense. Due to the large variation of widths in characters, it helped keep a more uniform space between sentences. With modern word processors and fonts, the need for the double space as been eliminated.

    Now, when you get into typography and design, you're dealing with aesthetic and this will vary on a case by case basis. Letter spacing, kerning, and leading all come into play and it's less about the number of spaces you use and more about how you're using your spaces. In coding, I could see the use for even more than two spaces.

    *NOTE* - It might seem contradictory that I'm advocating single spacing, yet I've double spaced between all my sentences. I'm an old school typewriter guy and old habits die hard. This is why modern technology is so great. I have all of my software set to only allow single spacing between sentences. I always do document searches for double spaces. All of my professional writing goes out single spaced. All of my personal writing goes out double spaced, completely out of laziness.

    --
    Wise men say, "Forgiveness is divine, but never pay full price for late pizza."
  27. Re:Two spaces, bitches. by John+Hasler · · Score: 5, Funny

    Your eyes so poor you cant see the delineation?

    Not only that, they're so bad I can't even see the apostrophe in your sentence.

    Notice when you read shit on the internet it is single spaced after punctuation, and not double spaced?

    One of the many deficiencies of HTML.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  28. Consulting the Book of Armaments by Brett+Buck · · Score: 5, Funny

    Three is the number of the counting, and the counting of the number shall be three.

  29. The bible says One by mretondo · · Score: 3, Informative

    When the "Fifteenth Edition of The Chicago Manual of Style" (the bible on grammar) came out around eight years or so ago, the authors were on WGN radio in Chicago promoting the book and taking questions. Someone called in asking this very question about one or two spaces at the end of a sentence (I wanted to call and ask the same question). The authors were very clear, one, even for mono space fonts.

  30. Space for readability by Tungbo · · Score: 3, 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.

  31. Re:Two spaces, bitches. by selven · · Score: 2, Interesting

    Try 's/\. / /g'. I can't think of any code that would get screwed up by that.

  32. Re:Two spaces, bitches. by Audacitor · · Score: 2, Insightful

    You could have entered tons of spaces after that period. Depending on which comment post mode you're using, it may be using standard HTML behavior, which strips out superfluous white space, including double spaces between sentences.

  33. When in doubt, Search your Chicago Manual of Style by tyrione · · Score: 2, Informative

    I don't care if you're a casual writer or developer, having the Chicago Manual of Style [15th Edition myself] on hand will teach you to become a much better typesetter in your work.

  34. Re:Two spaces, bitches. by HTH+NE1 · · Score: 5, Informative

    Notice when you read shit on the internet it is single spaced after punctuation, and not double spaced?

    That's only because HTML decided that consecutive whitespace should be compressed to a single character. I may put two spaces after full stops followed by new sentences, but I'm not going to make one of them &nbsp; to (try to) force it.

    HTML, also by not employing indentation at the start of paragraphs by, has steered people toward double-spacing between paragraphs. Print media prefers not to waste the line between paragraphs and sticks with indentation of the first line of paragraphs. Books tend to reserve double spacing between paragraphs for a change of scene within a chapter, and if it occurs at a page break, a line with one to five asterisks, spaced, is employed, on whichever page it will fit.

    --
    Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
  35. From the Chicago Manual of Style, 15th ed. by OldeTimeGeek · · Score: 2, Informative

    "A single character space, not two spaces, should be left after periods at the end of sentences (both manuscript and in final, published form) and after colons."

  36. The answer (though it's not very satisfying) by bfootdav · · Score: 2, Informative

    I've given this a lot of thought over the years and I believe you can break it down into three circumstances

    1) If you're using a monosaced typeface or a typewriter, use two spaces. It's the convention and I personally think it makes reading the text much easier. Of course how often does this situation arise these days? Not very.

    2) With a typesetter or typesetting software a "space" has no specific length as it varies depending on the needs of the typesetter. That said some typesetters pad the space after a period and some don't. Either way it will look good and consistent. Trust your typesetter. Though if you use TeX you have your choice of which style to go with. It doesn't matter which you choose, it'll look fine.

    3) If you're using a word processor it doesn't matter. Word processors produce crap for output. By using one you are stating up front that you don't care how the final product looks. By definition you are producing an informal text and as such you can use as many spaces as you want since it's not going to affect the aesthetic value or readability of the text any more than the decision to use a word processor in the first place. If you do care about how it looks and reads use typesetting software.

  37. Re:Two spaces, bitches. by Rob+the+Bold · · Score: 4, Funny

    End of discussion.

    Awesome.

    Next topic: emacs or vi.

    --
    I am not a crackpot.
  38. Re:HTML decides for you by eln · · Score: 2, Insightful

    The fact that HTML decides for you is irrelevant anywhere that isn't using HTML. HTML strips out any repeated whitespace, regardless of whether or not it's at the end of a sentence. HTML also does all sorts of other nutty things with formatting that may or may not make any sense depending on what you're trying to do.

  39. Re:Two spaces, bitches. by computational+super · · Score: 2, Informative

    Actually that ought to be: s/\([.?]\) /\1 /g Since you don't want to lose the "." or the "?". You also need to do: s/\([.?]["']\) /\1 /g

    --
    Proud neuron in the Slashdot hivemind since 2002.
  40. Re:Two spaces, bitches. by 19thNervousBreakdown · · Score: 3, Informative

    Slashdot doesn't strip the spaces, your browser's HTML parser does. <-- There's two spaces there, look at the source.

    --
    <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
  41. Re:Two spaces, bitches. by horigath · · Score: 2, Informative

    HTML, also by not employing indentation at the start of paragraphs by, has steered people toward double-spacing between paragraphs. Print media prefers not to waste the line between paragraphs and sticks with indentation of the first line of paragraphs. Books tend to reserve double spacing between paragraphs for a change of scene within a chapter, and if it occurs at a page break, a line with one to five asterisks, spaced, is employed, on whichever page it will fit.

    For the last decade we've had a thing called CSS and you can indent your first lines to your heart's desire. Typesetting software for books doesn't do it unless the designer asks for it either.

  42. XML To The Rescue by Fantom42 · · Score: 3, Funny

    <paragraph>
      <sentence>
        <word>The</word>
        <word>only</word>
        <word>way</word>
        <word>to</word>
        <word>fix</word>
        <word>this</word>
        <word>is</word>
        <word>with</word>
        <word>XML</sentence>
      <sentence>
        <word>Totally</word>
        <word>human</word>
        <word>readable</sentence>
    </paragraph>

  43. Re:Two spaces, bitches. by larry+bagina · · Score: 2, Informative

    TeX is the one true typesetting program. By default, it indents paragraphs (except for the first paragraph in a section).

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  44. 1, dear god, 1 ... today just write semantically by gig · · Score: 2

    The first thing I do when I edit an article or manuscript is run a find/replace to find 2 spaces and replace with 1. Same as every other editor. So your spaces are all wasted work.

    In the past it was correct to use 2 spaces when typing fixed-width type, and it was wrong when typing proportional type. Today, 2 spaces is always wrong because we don't use typewriters. Today, you just write semantically, not for presentation, because we have infinite varieties of presentation, your writing will certainly not always be published in fixed-width type. In other words, put in good data (a complete sentence followed by a space and then another complete sentence) and leave out bad data (extra spaces.)

    > typewriter

    There is your problem. Note that the year starts with a "2". There are these things called computers. They are garbage-in-garbage-out. 2 spaces after a sentence is garbage that someone will have to clean up.

  45. Not a readability thing. by tempest69 · · Score: 3, Interesting
    A person who is having issues reading with one or two spaces causing problems needs to stop whining. However, I like the double space after the sentence. It provides me with a better cadence for capitalization. The sound gives me that nice feeling that a chunk of writing is completed. As a single space makes it feel as if the entire paragraph is one uninterrupted stream of thought.

    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.

  46. Abbreviations, such as Dr., Ms., etc. by tomhudson · · Score: 2, Informative

    Two spaces after a period that ends a sentence.

    Otherwise, Dr. Ms. Mrs. Mme. Mr. Mlle. etc. eng. fr. and all those other abbreviations look like they end a sentence.

    Tab, of course, is ASCII 9, not "n * 0x20", where n==some value between 1 and whatever. Look at python code, where leading white space counts - mixing tabs with spaces is dumb.

  47. Re:Two spaces, bitches. by Kazoo+the+Clown · · Score: 2, Insightful

    Notice when you read shit on the internet it is single spaced after punctuation, and not double spaced?

    One of the many deficiencies of HTML.

    Perhaps. I'm in the habit of putting an &nbsp; after periods when I write for HTML. Problem would be solved, if it wasn't for comment editing code that strips them out (such as here on Slashdot which you can see here since I put 4 nbsp's separated by spaces after the periods in this paragraph, and despite the fact they are preserved through the preview, they are having no visible effect). The deficiency is not strictly with HTML, but with some of the editors that work with it.

    Though I agree that HTML does not make it easy to maintain double spaced sentence separation. I hate reading single-spaced sentence text, I always notice it and it looks ugly. Perhaps I should insert

    <br>

    after every sentence, and while that would look ugly too, at least it would show my displeasure with the sentence police who have apparently decided that we will not use two spaces...