You use a comma before a coordinating conjunction (but, and, or) when a coordinating conjunction connects two or more independent clauses.
EXAMPLES
A correct example how to use a comma before a coordinating conjunction is:
Almost everyone hates doing math, but I enjoy it.
An incorrect example of this is:
A good teacher reads your paper, and makes comments.
HOW TO IDENTIFY HOW TO USE A COMMA WITH A COORDINATING CONJUNCTION
1) Don't place a comma somewhere because you think you here a pause. Know the rules how to place a comma and you will never be wrong.
2) You test for something to be an independent clause by seeing if it could stand alone as a sentence. If it can its an independent clause. One way to do this is to cover up the first half of the sentence, and if the second half sounds like it could be one, there is a good chance there is.
3) Examples of coordinating conjunctions are: but, and, or, nor, so, for, and yet.
4) If a coordinating conjunction connects two or more independent clauses --word groups that could stand alone as a separate sentence-- a comma must go before it.
5) Do not use a comma to separate coordinate word groups that are not independent clauses.
PRACTICE EXERCISES
Directions. Place a comma where it belongs.
1) Most children enjoy cartoons but I prefer movies.
2) Nearly everyone has beginners luck but I have good luck all the time.
3) On thanksgiving my favorite food is either the mashed potatoes or the pumpkin pie.
ANWSER KEY
1) Most children enjoy cartoons, but I prefer movies
2) Nearly everyone has beginners luck, but I have good luck all the time.
3) On Thanksgiving my favorite food is either the mashed potatoes, or the pumpkin pie.