Tuesday, October 17, 2017

Verbals

We’re all familiar with verbs. They describe the action or state of being. For example:
I run. (“I” is the subject, “run” is the verb) 
They crashed. (“They” is the subject, “crashed” is the verb) 
I think, therefore I am. (“I” is the subject in each clause, “think” and “am” are the verbs) 
The plane is flying overhead. (“plane” is the subject, “flying” is the verb preceded by the helper verb “is”)
But sometimes, a verb is not a verb!

A verbal is a word formed from a verb that functions as a noun, adjective, or adverb. There are three types of verbals:
  • Gerunds
  • Participles
  • Infinitives

Gerunds

Gerunds end in "-ing" and act as a noun:
Flying is my favorite pastime. ("Flying" is the subject of the sentence) 
I love running. ("running" is the direct object of the sentence)

Participles

Participles act as adjectives. There are two types of participles: present and past

Present participles, like gerunds, end in "-ing", but they're used as adjectives, not nouns:
The flying squirrel was amazing. ("flying" is an adjective modifying "squirrel") 
The squirrel flying across the sky was amazing. ("flying across the sky" is a present participial phrase acting as an adjective modifying "squirrel")
Past participles usually end in "-ed" or "-en":
The crashed server made us frantic. ("crashed" is an adjective modifying “server”) 
The broken windows leaked a lot of rain. ("broken" is an adjective modifying “windows”)
Don’t confuse gerunds and present participles with verbs in the progressive tense, which come after a form of the verb “to be”:
The plane is flying overhead. (verb) 
The cat was running across the lawn. (verb)
Don't confuse past participles with verbs in the passive voice, which start with was/were:
The windshield was cracked. (verb) 
The windows were broken. (verb)

Infinitives

Infinitives start with “to” and end with the simple present form of a verb, such as “to fly” and “to crack”. They can act as nouns, adjectives, or adverbs.

Nouns:
To live is to adjust
I want to go
I love to fly.
Adjectives:
This is the best time to start. (modifies “time”) 
The first attempt to build the Panama Canal ended in failure. (adjectival infinitive phrase modifying “attempt”)
Adverbs:
You can tell an infinitive is acting as an adverb if you can put “in order” in front of it and get the same meaning.
To win, you need the highest number of points. (adverb modifying “need”) 
In order to win, you need the highest number of points. (same thing) 
We nailed plywood on the store windows to prepare for the storm. (adverbial infinitive phrase modifying “nailed”). 
We nailed plywood on the store windows in order to prepare for the storm. (same thing)
If you look at the noun or adjective examples of infinitives, however, you can't put "in order" in front of them and get the same meaning. "I love in order to fly" doesn't have the same meaning as "I love to fly", so you know in this case the infinitive is not an adverb.
Note that you use a comma after the adverbial infinitive when it starts a sentence:
To prepare for the storm, we nailed plywood on the store windows.
But you do not separate the adverbial infinitive from the rest of the sentence if it comes at the end of the sentence:
We nailed plywood on the store windows to prepare for the storm.
Don’t confuse infinitives with prepositional phrases. In infinitives, "to" is followed by a verb, whereas in prepositions "to" is followed by a noun.
I want to go. (Infinitive - "to" is followed by the verb "go") 
I went to the park. (Prepositional phrase - "to" is followed by the noun "(the) park")
So that's all you really need to know about verbals. And now I'm guessing (verb) you want to go (infinitive) to the bar (prepositional phrase) and forget all about them.

References

Tuesday, August 8, 2017

Prepositions, Pronouns, and Particles

In the last lesson, we took a side trip into the essentials of technical writing. Now, let's get back to some thorny grammar problems. Today, we will cover prepositional phrases, how to use pronouns correctly within them, and how to identify when a preposition is actually a particle (and why you might care). 

Prepositions

A prepositional phrase provides additional information such as when, where, and how. It always starts with a preposition like one of the following words:

in
of
to
with
on
after
for

(For a list of more prepositions, go here.)

For example, consider this simple sentence:
I drove.
If you want to say where you drove, add a prepositional phrase:
I drove to the store.
You could also use a prepositional phrase to say when you drove:
I drove to the store after midnight.
If you want to say more about which route you drove, put the prepositional phrase after the verb “drove”:
I drove on highway 101 to the store.
If you want to say more about where the store is located, put the prepositional phrase after the noun “store”:
I drove to the store on Broadway.
Notice that you’ve now nested a prepositional phrase within a prepositional phrase, which is perfectly fine. You can use several prepositional phrases to add lots of details:
After midnight, I drove with Sam on highway 101 to the store on Broadway.
A simple prepositional phrase has just a preposition followed by a noun (midnight, Sam, highway 101, store, Broadway) and any modifiers (e.g., sleepy Sam, busy store). 

If the words following the preposition include a subject and verb, though, it’s called a subordinate conjunction.

For example, here are two sentences that use the preposition “after”:
I drove after midnight. (prepositional phrase) 
I drove after Sam fell asleep. (subordinate conjunction)

Pronouns

In prepositional phrases, the words that come after the preposition make up the object of the preposition. In a subordinate conjunction, however, the words that follow the preposition make up a clause, which must include (at minimum) a subject and verb. Why does it matter if it’s a prepositional phrase or a subordinate conjunction? Let’s look at an example:
I’m going with whomever
I’m going with whoever wants to go.
In the first sentence, you don’t have a verb after the preposition, so it’s a prepositional phrase, and the pronoun that follows the preposition must be an object. This means that if you’re using a pronoun like “whoever”, you have to use the object form “whomever”, not the subject form “whoever”.

In the second sentence, however, you have a verb, so it’s a subordinate conjunction. In this case, you use the subject form “whoever” instead of the object form “whomever”.

This causes a lot of confusion. I see this incorrect construction all the time:
Wrong: I’m going with whomever wants to go.
This is wrong because “whomever” cannot be the subject of the verb “wants”. You need the subject form “whoever” instead. 

Now, let’s make things even more confusing:
I’m going with whomever I want.
This sentence is correct! Why? Because in this subordinate conjunction, the subject is “I” and the verb is “want”. It also has an object (“whomever”), which appears at the beginning of the clause in a subordinate conjunction. If you were writing the clause as a sentence, it would be:
I want whomever.
But when the clause is subordinate, the object comes first, which can make it harder to spot the subject vs. the object:
I’m going with whomever I want.
Take another example:
I’m addressing the letter to whom it may concern.
This is a subordinate clause with a subject (“it”), verb (“may concern”), and object (“whom”). 

Here’s another construction that causes problems all the time:
Shiraz and I took the candy. 
She gave the candy to Shiraz and me.
In the first sentence, “Shiraz and I” is the subject of the sentence, so you use the subject form of the pronoun “I”. But in the second sentence, “Shiraz and me” is the object of the preposition, so you use the object form and write “me” instead. You could also say:
She gave Shiraz and me the candy.
In this case, "Shiraz and me" is the indirect object, so you use the object form "me". 

People often say “Me and Shiraz took the candy” or “Shiraz and me took the candy”, which are both wrong and make my ears hurt. But it’s even more painful when people try to sound correct and use the subject when they should be using the object, such as “She gave the candy to Shiraz and I”. (No, she didn’t. She gave it to Shiraz and me.)

So how can you remember all this? First, identify the subject by asking yourself who or what is doing the action. You will then have a much easier time figuring out which word, if any, is the object.

For example, in the candy sentence, here’s what’s going on in my head:

“Okay, she’s giving the candy, so ‘She’ is the subject of the sentence and ‘gave’ is the verb. What did she give? The candy. So that’s the object of the sentence. Now I see a preposition (to), so what follows is either a prepositional phrase or a subordinate clause. I just see nouns, no verbs, so this is a prepositional phrase, which means I need to use the object form ‘me’. The pronouns 'I' and 'me' always come after the other person, so the sentence is: She gave the candy to Shiraz and me.” 

Particles

Here's an interesting point that won’t usually affect your writing but is nice to know: sometimes words that look like prepositions are actually part of the verb. These are called particles. For example, in the verb “sign in”, “in” is a particle, not a preposition, and is an important part of the verb. Consider the differences in these two sentences:
Be sure to sign in before you continue. ("in" is a particle) 
The sign in the office welcomes visitors. ("in" is a preposition)
The main reason you might care about identifying a particle vs. a preposition is if you’re tempted to move the parts of the sentence around. The particle must not be separated from the verb, whereas the prepositional phrase can be moved. For example, you can say:
In the office, the sign welcomes visitors.
But you cannot say:
In before you continue, be sure to sign.
Nor can you say:
Before you continue, in be sure to sign. 
Even Yoda doesn’t do this. (Awkward his speech is. Yes. Yes! Yet wise Yoda is.) 

References:

https://www.englishclub.com/grammar/prepositions-list.htm

http://www.chompchomp.com/terms/preposition.htm

https://webapps.towson.edu/ows/prepositions.htm

http://www.quickanddirtytips.com/education/grammar/yoda-grammar

Wednesday, July 26, 2017

Essentials of Technical Writing

In this lesson, we cover some of the essentials you should keep in mind when planning, writing, and releasing documentation and training content.

Plan a release based on feedback

At the beginning of a release, don’t just figure out what new features will be in the product and plan to doc those—also check with the product team to find out what areas they think need improvement from the last version of the documentation, and check user forums and support queries for the questions people are asking. Start working on improving this content right at the end of a release, before the next release is really underway when your time will be mostly focused on documenting new features.

Work like an investigative journalist

When you’re first learning about a feature, work like an investigative journalist and focus on “getting the story.” Be curious and keep wondering what the user will ask next. Always ask and answer the question “why?”, and use the active voice wherever possible so that it’s absolutely clear who is doing what and when. For example, consider this sentence:
The configuration must be updated to ensure all new users can access the application.
How does the configuration get updated? Does it happen automatically when a user signs up? Does an admin have to do it?

Instead, write this:
When you add new users in the batch file, you must also update the configuration file to give the new users immediate access to the application.

Write for less-technical users

Developers often create products with a certain audience level in mind, and usually they assume the audience is a lot more familiar with the company's technology than they actually are. In reality, users often need more hand-holding and simple instructions than developers might think. As you’re talking to an engineer or reading their spec or initial write-up, keep an image of a less-savvy user in mind and ask the questions that person would ask.

Never assume the user has read the introductory material, as they probably landed on that page by doing a web search. So make sure there are links back to the introductory material, definitions, etc. If someone unfamiliar with the product can understand it, you’ve communicated your message clearly.

Structuring a topic

Start with the concepts they need to know (link off for more info), then how to do it, and then additional reference info. This follows the “inverted pyramid”:
most important -> less important -> least important
The first paragraph should follow this structure:
  • Basic overview of the feature
  • What problem it solves
  • Who needs this feature
  • Example (if needed)
  • Why this is useful (so what?)
  • Very brief overview of “how”
Then go into details after the intro. For example:
The foo feature enables you to remotely delete all data and applications from a user’s device (also called “wiping” the device). This feature ensures that the data on your users’ devices will not be compromised if their device is lost or stolen. 
A foo agent runs in the background on the user’s device and will therefore decrease battery life slightly, so it is most appropriate for users who a) have confidential data on their devices and b) do not need to maximize battery life. 
After you enable foo on your server and install the agent on the user’s device, you can run foo from the Admin dashboard when you need to wipe the device.
To enable foo on the server:
1. (instructions)
2. (instructions) 
To install the foo agent on a device:
1. (instructions)
2. (instructions) 
To remotely wipe a device:
1. (instructions)
2. (instructions)
Likewise, you should name the topic based on what someone is trying to do:
Remotely wiping a device
is more informative than:
Using the foo feature

Refine the content

Warnings, gotchas, and prerequisites should appear before you tell them how to do something, never after. For example, imagine the support calls you'd get if you wrote this:
To delete data:  
1. Navigate to foo > bar.
2. Enter your admin code.
3. Click Delete.
4. When prompted, click Yes to proceed.  
Note: Only click Yes if you want to delete all the data in your system. You should make a backup before you do this.
Instead, you should write something like this:
To delete all your data: 
WARNING! This procedure will permanently delete all the data in your system. 
1. Make a backup of your data.
2. Navigate to foo > bar.
3. Enter your admin code.
4. Click Delete.
5. If you are sure you want to delete all the data in your system, click Yes to proceed. 
For information on restoring the data from your backup, see Restoring Data.
Notice the intro now indicates this will delete all your data, making a backup is part of the procedure so it's harder to miss, and the confirmation step reiterates that this will delete all your data. Additionally, I've added a helpful link after the procedure that tells you how to restore your data in case you went through these steps and realized you didn't actually want to do this.

This approach puts the most important information first (there's that inverted pyramid again), adds cues to help remind the reader what this is going to do, and anticipates a scenario where someone made a mistake. By thinking through what the reader wants to do and may inadvertently do, you can refine the content to be as helpful as possible.

Simplify the language

Cut out all extraneous words. For example:
made arrangements for -> arranged

made the decision -> decided

made the measurement of -> measured
performed the development of -> developed
is working as expected -> works as expected
Break up long sentences and paragraphs. Use bulleted lists instead of listing options in a sentence, and use bold text to highlight the main points. Remember, readers aren’t here to read; they’re here to get the information as quickly as possible.

There's a very nice example of this here.

Keep the reader’s goal in mind

Why are they here, and what do they want to know? For example, look at this sentence:
This law was introduced in 2011, after a long, drawn-out process of appeals, to ensure that agency workers are given some of the same employment rights as their full-time counterparts.
In this example, the end goal is for the reader to find out about employment rights. The information about the legal appeals process is not essential, so remove it:
This law was introduced in 2011 to ensure that agency workers are given some of the same employment rights as their full-time counterparts.
Many developers want to provide as much specific detail as possible, but this can come at the expense of readers understanding the main point. For example:
The system can process multiple requests per second. One customer processed 5,165,345 requests per second. Another customer processed 10,725,335 requests per second.
Instead, write:
The system can handle enormous loads. One customer’s implementation regularly processes over 10 million requests per second, which was twice as much as their previous system could handle.
Remember, people want information, not just data. So give data as needed but always explain what it means. In this case, people want to know if it can handle very large loads, and giving the higher number as an example is sufficient, plus adding some info about why this number is significant (dig in and find out more about the example…in this case, it’s assuming you did your research and discovered that the load was twice the customer’s previous capacity).

Use the inverted pyramid for sentences as well. For example, instead of this:
You can enter the information manually each time, but it’s better to configure it as a property.
Write this:
Configure the information as a property so you don’t have to enter it manually each time.

Use graphics wisely

Use screenshots when needed to orient the user, but don’t include them in every single step, or they can easily get lost. Animated GIFs are especially nice for showing how to navigate somewhere that’s hard to explain in text, but keep in mind that you must also add Alt text to all graphics to describe what’s happening in the image for those who are visually impaired.

Examples are crucial

Have you ever noticed that you may read the first sentence describing a feature and still not really understand what it is, but then the next sentence gives a real-world example that helps you attach the concepts to something tangible? The best way to clarify your content is through examples. Not everything merits an example, while more complex concepts may need more than one example. When you’re documenting properties, giving examples of actual values helps a lot. And when describing how to write code, samples are essential.

Test all the steps

It’s critical that you test and document all the steps in a procedure and not just rely on the steps that were given to you. People who know the technology well will often leave out small but important steps (such as restarting the server after making configuration changes), which results in support queries.

Review your content

Walk away and then come back and re-read your work to catch mistakes. And then always get a second pair of eyes on your writing. No matter how experienced you are, you will always make mistakes you can’t see, so peer reviews are important.

Likewise, whenever possible, get someone new to the technology to test out the procedures you’ve written.

Lastly, get a subject-matter expert to review your content to make sure you didn’t miss anything, and also ask for best practices that users should know. This will take your content from covering the basics to being more deeply insightful and useful to advanced users.

Get feedback from users

Look at the support queries and questions on user forums to see what people are asking and where they’re running into trouble.

Summary

Our ultimate goal is to reduce support queries to zero, so: 
  • Ask good questions up front
  • Structure the content using the inverted pyramid
  • Write simple, accurate, fully tested content that gives information and not just data
  • Provide good examples and graphics where needed
  • Include best practices that will help users go beyond the basic steps
This approach will help ensure the users are successful and the support people are bored.

Additional resources

https://medium.com/@limedaring/five-tips-for-improving-your-technical-writing-and-documentation-47353723c8a7

http://www.copyblogger.com/technical-writing/

http://www.wikihow.com/Master-Technical-Writing

http://web.mit.edu/me-ugoffice/communication/technical-writing.pdf

http://idratherbewriting.com/2014/06/20/10-technical-writing-principles-to-live-by/

https://tech.co/tips-technical-writing-2015-11

Tuesday, July 4, 2017

Coordinate vs. Cumulative Adjectives

In the previous lesson, we covered hyphens and dashes. Now, we're ready to move on to a tricky topic: coordinate vs. cumulative adjectives.

Coordinate adjectives individually modify a noun and are separated by a comma. For example, look at “heavy” and “bulky” in the following sentence:
  • The heavy, bulky box was awkward to carry. 
You can tell that they're coordinate adjectives because they would still sound correct if you used “and” between them, such as:
  • The heavy and bulky box was awkward to carry. 
or if you changed their order:
  • The bulky, heavy box was awkward to carry. 
Also, if you have adjectives from the same category, such as two opinion adjectives or two size adjectives, you use a comma. For example:
  • The beautiful, elegant box sat on the mantle. 
  • The gigantic, enormous box was impossible to lift. 
Note that adjectives from the same category are rare in technical writing, as they’re mostly used to be emphatic. In tech writing, we aim to be precise but concise.

Cumulative adjectives are used when the adjectives are from different categories (e.g., age and size) or when the final adjective before the noun creates a compound noun. This is especially true when you specify origin (nationality/religion). For example, "and" sounds wrong between these adjectives, so you don't use a comma:
  • Correct: She was a smart Muslim woman 
  • Incorrect: She was a smart and Muslim woman 
But you could say “She was a smart and beautiful woman”, so these would be coordinate adjectives instead of cumulative:
  • She was a smart, beautiful woman. 
Here comes the crazy part: cumulative adjectives must be in a specific order based on their category. This order is as follows, with examples for each category:
  1. Opinion: good, attractive, delicious 
  2. Size: large, small, enormous 
  3. Age/Condition: old, new, modern, worn 
  4. Length or shape: long, short, square 
  5. Color: red, blue, green 
  6. Origin (nationality, religion): American, Muslim 
  7. Material: plastic, wooden, cotton 
  8. Purpose: electric (wire), tennis (shirt) 
For example, these are in the correct order:
  • An attractive young American lady 
  • A modern Japanese electric car 
  • A big square blue box 
But the following examples are NOT in the correct order and sound all wrong:
  • An attractive American young lady 
  • A Japanese modern electric car 
  • A blue square big box 
This is hard to memorize, and it just takes practice. Most native English speakers have no idea that this order even exists; they just do it naturally and know something is wrong when they hear them out of order. I recently told a friend about this order and he laughed at me, refusing to believe this rule exists, until I started rearranging adjectives in a sentence. His eyes got wide, and he quickly changed the subject.

There are sites that show a much longer and more detailed list of categories, but it's simpler to stick with the more concise list above. In fact, if you search for "cumulative adjectives", you'll find a different list on most pages. I've chosen the list that I think covers the most important categories.

Summary

Coordinate adjectives are separated by a comma and sound fine if you change their order or insert "and" between them instead of a comma. Cumulative adjectives are not separated by a comma and must be placed in a specific order based on their category.

In the next lesson, we'll take a break from punctuation and talk about the essentials of technical writing.

Additional resources

http://wilcoxediting.com/articles/2009/04/07/comma-between-adjectives
https://www.khanacademy.org/humanities/grammar/parts-of-speech-the-modifier/adjective-order-and-commas-with-adjectives/v/commas-and-adjectives

Hyphens and Dashes

In the last lesson, we took a deeper look at commas. In this lesson, we will explore the difference between hyphens, en dashes, and em dashes. 

Hyphens

A hyphen connects two words that are closely related and are acting as a single word. For example:
  • Two-thirds of survey respondents said they needed additional training.
  • This number is toll-free. 
However, in some cases, you only connect the words with a hyphen when they are acting as an adjective modifying the word that follows them:
  • This architecture supports high availability when traffic increases. (“availability” is a noun, and “high” is an adjective modifying it)
  • To handle traffic spikes, design a high-availability architecture. (“high-availability” is a compound adjective modifying “architecture”)
  • Next, you check in your files. (“check” is a verb, “in” is an adverb modifying “check”)
  • The server sends a check-in notification. (“check-in” is a compound adjective modifying “notification”)
Words that are hyphenated often end up as open compounds (that is, they have a space instead of hyphen). “Open source” is an example of an open compound:
  • This software is open source.
  • This open source software is free to use. (No hyphen between "open" and "source")
And eventually, they may even become a single word. For example, "email" evolved like this:
Electronic mail -> e-mail -> email

“Log in” is still two words when it’s a verb:
  • You can now log in to the application.
But it’s a single word when it acts as an adjective:
  • Your login information was sent to your email address. 
Note: Why wouldn't you say "You can now log into the application"? Aren't you supposed to combine "in" and "to" when they're next to each other? In cases like "Look into this for me", the answer is yes. But in this example, "log in" is a phrasal verb, meaning that the verb "log" and the adverb "in" must go together and act as a single verb. Therefore, if you combined "in" and "to" to make "into", you would be splitting the "log in" phrasal verb in half, and "log" would be sad that "in" ran off with that scoundrel "to".

The Microsoft Manual of Style (and some other style guides) instructs us NOT to use hyphens after “-ly” adverbs:
  • These are often-asked questions. 
  • These are frequently asked questions. (No hyphen after an "-ly" adverb)
Irritating side note: Some grammar guides say you DO hyphenate after an “-ly” adverb IF the second word in the compound is the past participle. In this case, “frequently-asked questions” would require a hyphen, since “asked” is the past participle of the verb “to ask”, whereas “frequently upsetting incidents” would not use a hyphen, because "upsetting" is the present participle (not the past participle) of the verb "to upset". Confused? Don't be, because we’re going to ignore that stupid rule and stick with the Microsoft Manual of Style!

Dashes

There are two types of dashes: en dashes and em dashes. En dashes are longer than hyphens but shorter than em dashes.

-    hyphen
–   en dash
—  em dash


En dash
En dashes are uncommon. They connect two things that are related to each other by distance, essentially replacing the word “to”. For example:
  • Take the San Francisco–New York flight.
  • I read this in the May–September issue of the magazine.
  • This certificate is valid 2017–2018.
Note: If you want to use "from" in the last example, use "to" instead of the en dash. For example:

  • This certificate is valid from 2017 to 2018.
OR
  • This certificate is valid 2017–2018.
But NOT:
  • This certificate is valid from 2017–2018.

To type an en dash, see: https://www.howtotype.net/symbol/en-dash/

Em dash
The em dash is longer and is more common than the en dash. It sets off and emphasizes additional information in the sentence and can be used in place of commas, a colon, or parentheses—as I just did in this sentence. For example:
  • When the car was finally delivered three months after it was ordered, she no longer wanted it.
  • When the car was finally delivered, three months after it was ordered, she no longer wanted it.
  • When the car was finally delivered—three months after it was ordered—she no longer wanted it. 
The second example uses commas to offset and emphasize the phrase. The third example uses em dashes to emphasize it even more, indicating how irritating it was that it took three months for the car to arrive.
Here's an example of an em dash replacing a colon:
  • The white sand, the warm water, the sparkling sun—this is what brought them to Hawaii.
To type an em dash, see: https://www.howtotype.net/symbol/em-dash/

Summary

Hyphens connect two words that are closely related. En dashes connect two things that are related by time and replace the word "to". Em dashes set off a part of the sentence to give it extra emphasis. 

In the next lesson, we will look at coordinate vs. cumulative adjectives.

Additional resources

Sunday, June 25, 2017

Using Commas - Part Two


In this continuation from the previous lesson, we will dig deeper into using commas in technical writing.

Avoiding the comma splice 

A "comma splice" is the incorrect usage of a comma to separate two independent clauses. (Reminder: an independent clause has both a subject and a verb.) For example:

Incorrect
The server has started, you can 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.

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.)

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. They 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 do 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 ball 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 ball 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 wherever 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/



Saturday, June 17, 2017

Using Commas - Part One

(This post is part of a series on writing fundamentals aimed primarily at technical writers, but creative writers should find it useful as well. For more context, see The Hiccup Rule.)

Commas can be beastly. In this post, I'll cover some of the most common scenarios where people run into trouble with commas.

Don't use a comma to separate the subject and predicate

The subject of the sentence describes who or what the sentence is about. The predicate describes the action of the subject. For example, in the sentence "Sandra went to the park," "Sandra" is the subject, and "went to the park" is the predicate. 

Sometimes, I see writers put a comma between the subject and predicate, which is incorrect. For example:

Correct:
Sandra went to the park.
The writers and editors are learning to use commas.

Incorrect:
Sandra, went to the park. 
The writers and editors, are learning to use commas. 

Addressing someone specific

You do put a comma after the subject if you are addressing the person directly, such as in an email:

Sandra, have fun at the park today! 

As another example, both of these sentences are correct and mean two different things because of the comma:

Writers, take every opportunity to learn about commas. (I'm addressing the writers directly and am telling them to go learn about commas.)
Writers take every opportunity to learn about commas. (I'm making an observation that writers in general are driven to learn about commas.)

Separating a dependent clause from an independent clause

Let's get into something a bit more complex. Clauses have a subject and a verb. An independent clause forms a complete thought and can stand on its own as a sentence:

Sandra went to the park.

A dependent clause (also called a subordinate clause) provides more information about the independent clause and cannot stand on its own as a sentence. Consider this dependent clause:

When Sandra went to the park

When she went to the park...what? What happened? Because it starts with the dependent word "When", it's not a complete thought on its own and needs an independent clause to finish the thought:

When Sandra went to the park, a pack of wild dogs appeared. 

Now we have the dependent clause (When Sandra went to the park) followed by the independent clause (she saw a pack of wild dogs), and the thought is complete. 

Notice that there is a comma between the two clauses. Here comes the tricky part: when the dependent clause comes first, use a comma, but when the independent clause comes first, don't use a comma. (English is ridiculous sometimes.)

Using our previous example, the dependent clause is first, so there's a comma. If we reverse the clauses, though, you do not use a comma:

A pack of wild dogs appeared when Sandra went to the park

Why do we need the comma when the dependent clause is first? Well, consider this sentence:

Before configuring the server, users must download the correct version of the JDK.

If you didn't have the comma, a reader would see this at the beginning of the sentence:

Before configuring the server users

Can you see how readers might think this sentence is talking about server users? If so, readers will become confused when they get to "must download" and will pause and reread the sentence. And that breaks the hiccup rule, which is a big no-no in technical writing. 

Using that vs. which

This is an important topic that happens to fall within the discussion of commas, so let's tackle it!

Figuring out when to use "that" or "which" before a clause can cause writers to tear their hair out. Here's how it works: if the information is essential to understanding which thing you're talking about, use "that". For example, if you have two cars, and you want to tell me about the car in the garage, not the car in the driveway, you would write:

The car that is in the garage is broken down. 

This is an example of a restrictive clause, also called an essential clause, because it's required in order for the reader to know which car you're talking about. Use "that" to introduce restrictive clauses.

However, if you only have one car, and you are simply mentioning its location as an aside, you would write:

The car, which is in the garage, is broken down. 

This is an example of a nonrestrictive or non-essential clause. The information is not required for the reader's understanding and is just additional information.

Notice that when you use "that", you do not use any commas, whereas when you use "which", you surround the phrase with commas. Look at what happens if I omit the commas in the second example:

The car which is in the garage is broken down. 

Now, the reader has no way of knowing whether "which is in the garage" is essential (there are multiple cars, and I'm talking about the one in the garage) or non-essential (there's only one car, and it happens to be in the garage). So whenever you use "which" to introduce a non-essential clause, be sure to surround the clause with commas.

If you're talking about a person instead of a thing, use "who" instead of "that" or "which", and use commas to indicate whether it's essential or non-essential information. For example:

The agent who read my book called me yesterday.  (I sent my book to multiple agents, but only one read it, and she's the one who called me). 
The agent, who read my book, called me yesterday. (I sent my book to only one agent, and she called me yesterday. As an aside, she actually read my book!)

You can see a nice blog post entirely devoted to restrictive and non-restrictive clauses over at the Grammerly Blog

Using serial commas

People are damn passionate about this topic, so I'm about to alienate half my readers. Into the fray!

The serial comma, also called the Oxford comma, appears after the second-to-last (penultimate) item in a series. For example:

The server receives the request, sends the response, and logs the activity.

That comma before "and" is the serial comma. Because it can make a difference in meaning, we always use it in technical writing, and I use it in my creative writing as well. However, AP Style dictates that you do not use a comma after the penultimate item, so you'll notice its absence in news articles, marketing content, etc. So if a marketing piece were to write the same sentence, they'd usually write:

The server receives the request, sends the response and logs the activity.

This might not seem like a big deal until you consider more complex sentences or a series where the word can mean two different things. For example:

Every day after work, he drinks a beer, eats a burger and fries an egg.

Did you pause for just a moment after "fries", because you were grouping "burger and fries" in your mind and thought "fries" was referring to french fries? There goes the hiccup rule! With a serial comma, there's zero confusion:

Every day after work, he drinks a beer, eats a burger, and fries an egg.

Let's look at another example:

In his speech, he thanked his parents, Elvis and Madonna.

This makes it sound like Elvis and Madonna are his parents. With a serial comma, though, it all becomes clear:

In his speech, he thanked his parents, Elvis, and Madonna.

To see a really hilarious (and not quite safe for work) illustration that drives this point home, check out this Verbicide post. Read the comments if you want to see how worked up people get over this topic. 

Summary

Commas are very important for communicating clearly. When used correctly, they break up complex sentences, set off non-essential information, and help avoid the dreaded hiccup rule. 

In the next post, Using Commas - Part Two, I'll talk about more pitfalls with commas. But for now, let's take a pause. 

Additional resources