Others

[Writing for CS] 8. Punctuation

  • Comma
    • Commas can be used to give the reader time to breathe. Cutting this into several sentences would undoubtedly improve it further.
    • Minimal-commas rule: Use the minimum number of commas needed to avoid ambiguity. Sentences with many commas often have strangulated syntax; if the commas seem necessary, consider breaking the sentence into shorter ones or rewriting it altogether. Another exception to the minimal-commas rule is in lists.
  •  Colons and Semicolons
    • Colons are used to join related statements / introduce lists / Semicolons can be used to separate the elements in a list
    • A semicolon can also be used to divide a long sentence or to set off part of a sentence for emphasis.
  • Apostrophes ("," stuffs)
    • Singular possessives require an apostrophe ex. "the student's algorithm" 
    • Plural possessives require an apostrophe ex. "students' passwords"
    • Pronoun possessives do not require an apostrophe ex. "its", "hers"
    • Contractions require an apostrophe ex. "it's", "can't"
  • Exclamation: avoid exclamation marks! Never use more than one!! It would be better to omit the exclamation and add emphasis some other way.
  • Hyphenation (-)
    • Make sure you are consistent.
    • Hyphens are used to override right associativity. ex. randomized data structure > randomized data-structure
  • Capitalization
    • Only proper names are capitalized. ex. Prolog
    • Theorem, Figure, Section and headings
    • It is acceptable to use maximum capitalization for sections and minimum capitalization for subsections.
  • Quotation
    • One convention for quotations is that some punctuation marks are placed inside the quotation even when they are not part of the original material > place a punctuation mark within the quotation only if it was used in the original text.
  • Parentheses
    • A sentence containing a statement in parentheses should be punctuated exactly as if the parenthetical statement was not there.