Lesson 3: More on Commas
This lesson dives deeper into commas and helps you avoid common pitfalls.
Separating independent clauses
As we learned in the previous lesson, an independent clause has both a subject and a verb. When there are two independent clauses, you can separate them in the following ways:
- Use a period if they stand alone as separate ideas:
The server has started. Log in using your credentials.
- Use a comma and a conjunction if they are connected ideas:
The server has started, and you can now log in.
- Use a semicolon if they are closely related ideas:
The server has started; you can log in.
(You could also use dashes, but we wonât cover that until the next lesson.)
When separating two independent clauses, do not use a comma without a conjunction. This is called a âcomma spliceâ. For example:
â Incorrect:
The server has started, you can now log in.
The first clause has the subject âThe serverâ and the compound verb âhas startedâ. The second clause has the subject âyouâ and the compound verb âcan log inâ. Therefore, they are both independent clauses. To fix this sentence, keep the comma and add the conjunction âandâ as shown in the second bullet above.
Semicolons can lead to long and somewhat ambiguous sentences, so we tend to avoid semicolons in technical writing. Itâs better to create two separate sentences with a period, or use a comma and a conjunction that clearly shows how the ideas are connected. For example, consider this sentence:
The server is starting; you can log in now.
Does this mean you can log in because the server is starting or in spite of the fact that itâs still starting up? A comma and conjunction make the two different meanings clearer:
The server is starting, so you can log in now.
The server is starting, but you can log in now.
Using commas with adverbs
An adverb modifies a verb, an adjective, or another adverb. Adverbs often end in â-lyâ, which makes them easier to spot. For example:
He ran swiftly.
(âswiftlyâ is the adverb modifying the verb âranâ)
The really fast connection made surfing the web a lot more fun.
(âreallyâ is the adverb modifying the adjective âfastâ, which is modifying the noun âconnectionâ)
He ran incredibly swiftly.
(âincrediblyâ is the adverb modifying the adverb âswiftlyâ, which modifies the verb âranâ)
As you can see, you do not use commas between adverbs and the words they modify. The exception is when you repeat an adverb for emphasis, such as:
The really, really fast connection made surfing the web a lot more fun.
But donât repeat adverbs like this in technical writing, please!
Put the adverb as close to the word it modifies as possible. For example, âSwiftly he ranâ is fine in poetry, but it sounds awkward in technical writing. Worse, moving the adverb away from the word itâs modifying can also create confusion in more complex sentences. An exception is when you put it at the end of an imperative (command) sentence to add emphasis:
Return to the front desk immediately.
You could also write âImmediately return to the front deskâ, but it sounds more like a general instruction and less like an urgent command.
This brings us to sentence adverbs, which usually do appear at the beginning of the sentence and are followed by a comma. A sentence adverb modifies the sentence as a whole instead of a specific word. It is useful for expressing an opinion. For example:
Incidentally, your father dropped by earlier.
Sadly, the party was canceled.
When I write these sentences, Iâm expressing the opinion that the information Iâm giving you about your father stopping by is an incidental aside, and Iâm expressing sorrow that the party was canceled. You can also put sentence adverbs in the middle or end of the sentence to put less emphasis on them:
Your father, incidentally, dropped by earlier.
The ball was canceled, sadly.
Notice that regardless of where you put the sentence adverb, itâs always separated from the rest of the sentence by commas.
Using commas with imperatives
An imperative is a command, such as âType your password at the prompt.â The implied subject of this sentence is âYouâ, and the verb is âtypeâ, so it is an independent clause. Even the one-word sentence âGo!â is an independent clause, because the subject (âYouâ) is implied.
When you have two imperatives whose ideas are closely related, even though they are independent clauses, you donât need a comma between them. For example:
Type your password and press Enter.
Change the Foo property to BAR and click OK.
If the second clause is long, or if it is more of a separate step, you can use a comma. To avoid confusion, I often insert the word âthenâ when Iâm using a comma and conjunction between imperatives. For example:
Change the Foo property to BAR, and then select the action type.
Summary
You might be wondering why we have all these rules for commas. In technical writing, our goal is to get the information as quickly and accurately as possible into the readerâs brain, and using commas correctly helps a lot. Just remember that even if a sentence is punctuated correctly, you must rewrite it if it violates the hiccup rule.
In the next lesson, we will cover hyphens and dashes.
Additional resources
- http://www.quickanddirtytips.com/education/grammar/comma-splice
- http://theeditorsblog.net/2016/02/21/a-tale-of-adverbs-and-the-comma/
- https://writingwithsharonwatson.com/commas-compound-sentences-coordinating-conjunctions/