Using a comma before "but"

Solution 1:

Larry Trask's Penguin Guide to Punctuation makes it clear that it is permissible to use a comma before 'but'. The OWL Perdue Writing lab does the same. The BBC Learning English site likewise.

You were misinformed.

Solution 2:

That rule sounds very odd. Few people would never use a comma before but. I believe many follow this rule: use a comma before but if (and only if) it introduces an independent sentence. This applies to the other coordinating conjunctions too (and, or, and so).

She liked him but refused to marry him.

She liked him, but she refused to marry him.

I find that I do not always stick to this rule: I sometimes use a comma before but-dependent when I feel a pause would somehow improve the flow of the sentence (vague, I know).

In very short (informal?) sentences, the comma is sometimes left out regardless, though some might object to this:

It's true but it sucks.

Solution 3:

Visit the Corpus of Contemporary American English, and search for but. You will find many sentences where a comma precedes but.

This is a useless, artificial rule, one of the type that misguided English teachers love so much to invent.

Solution 4:

It depends on the actual sentence. Often but is used before a contrasting element and thus should be set off by a comma. This conflicts with the no comma rule before the conjunction for dependent clauses - to be on the safe side use comma before but, and convert a dependent clause into an independent one by adding a subject.

Example:

I can do most of the things the software would do for me but am unclear on the symbiosis of it all.

should be

I can do most of the things the software would do for me, but I am unclear on the symbiosis of it all

to avoid the conflict.

Source.

Solution 5:

General rule of thumb: if "but" is used as a coordinating conjunction (one that combines two independent clauses), then it should be accompanied by the preceding comma.