This forum is in permanent archive mode. Our new active community can be found here.

English vs. Programming

edited July 2012 in Everything Else
There are rules in the English language pertaining to how to position punctuation in relation to quotation marks. Programming has caused these to not make sense to me anymore, and I want to know how all of you handle this kind of thing.

I had to send an email to a tester explaining something like this:

Searching "D56PFN" will give you the same results as searching "D 56 PFN", but searching "D-56-PFN" will not.
The comma is supposed to go inside the quotes. I don't want to confuse the reader as to the actual contents of the string I am describing, so I incorrectly put the comma outside the quotes.
Post edited by lalanl on

Comments

  • I leave commas outside of quotation marks when I am quoting code, passwords, or other things of that nature.
  • edited July 2012
    Commas go inside the quotes for dialogue, not when using quotes as a way of precisely demarcating an item of language, as in your case. You did the right thing, lalanl.
    Post edited by Victor Frost on
  • edited July 2012
    Normally, it doesn't bug me and I just follow standard English rules when writing normal prose. It is a problem when writing something about programming, at which point I throw standard punctuation rules to the wind in situations where they may result in ambiguity, such as this. Given that said audience tends to consist of other programmers, it's usually not a problem.

    Apparently British English does give you the choice of putting the punctuation outside the quote marks if it has nothing to do with the quote itself.

    Edit: FWIW, the American Bar Association has been using the British style, which is akin to the programmer's style, since 1951, to minimize ambiguity. Apparently, many other industry/profession-specific style guides also do the same thing.
    Post edited by Dragonmaster Lou on
  • The purpose of rules for language is, or at least should be, to allow people to communicate clearly and efficiently without having to parse everything on a case by case, word by word, letter by letter basis. If the rules in a specific case go against that cause, then the rules should be ignored.
  • edited July 2012
    There are rules in the English language pertaining to how to position punctuation in relation to quotation marks. Programming has caused these to not make sense to me anymore, and I want to know how all of you handle this kind of thing.

    I had to send an email to a tester explaining something like this:

    Searching "D56PFN" will give you the same results as searching "D 56 PFN", but searching "D-56-PFN" will not.
    The comma is supposed to go inside the quotes. I don't want to confuse the reader as to the actual contents of the string I am describing, so I incorrectly put the comma outside the quotes.
    Searching for
    D56PFN
    will give you the same results as searching for
    D 56 PFN
    but searching for
    D-56-PFN
    will not.

    Problem solved.
    Post edited by Apreche on
  • Commas go inside the quotes for dialogue, not when using quotes as a way of precisely demarcating an item of language, as in your case. You did the right thing, lalanl.
    I tried to explain this to my coworkers, but despite understanding my point, many of them say they would prefer I stick to The Rules of English.

    I'm astounded in general how many tech people (but mostly programmers) I see that can't spell properly. I don't understand how that happens.

  • Problem solved.
    Oh yeah for places this is available, absolutely. Much of my documentation is expected to be in paragraph or outline form, so doing that would feel weird.


  • Edit: FWIW, the American Bar Association has been using the British style, which is akin to the programmer's style, since 1951, to minimize ambiguity. Apparently, many other industry/profession-specific style guides also do the same thing.
    Interesting. Thanks!
  • We've had this discussion before. Personally, I prefer the British style due to generally lower ambiguity.
Sign In or Register to comment.