a) b) c)

These are all the same “rule.” In short, that rule is, read it out loud to yourself and where you find yourself stopping, or pausing, to indicate that pause to another reader (pause) , just put down a comma.

That’s all commas are: they’re stops, or rests, as in a musical score. They’re telling other readers to pause when they read it, to get the clearest meaning. They’re how you get the spoken voice into the written
reproduction of it. That is the way you want to go, for a natural flexible writing voice–make it like the human speaking voice, with a few pull-backs from informality, slang, and so on. So, do it with commas.

To read about this in more detail, and actually go through a training session without even knowing it,
click on:

the secret of commas

Meanwhile, to get John and uhm and yes we have no bananas too straight with their surrounding commas, here’s what they should look like:

Any time you’re talking directly to someone, Mary Lou, you need to put the commas down around their name. This goes for you, too, John.

Well, that should just about do it.
Uh, do what?
That should cover the bases, shouldn’t it? Nouns of direct address: set ’em off with commas.
Little hems and haws, and yeses and nos, set them off, too.

Yes, we have no bananas, we have no bananas today.
Oh, no, John, no, John, no, John, no. My father was a Spanish captain. Was yours? No, John, he wasn’t. He wasn’t even Spanish, I don’t think. Was he, Mom?