Lesboprof has a thought-provoking post on cursing in the classroom. It's honestly conflicted, which I think is probably about right.
I'm of divided mind on this, too. Back in my teaching assistant days at Flagship State, I had an early-morning class in a ground-floor classroom in the back of a building. The dumpsters were immediately outside the window. Every so often, the scooper trucks would come and pour the contents of the dumpsters into something else, right in the middle of class. They were shockingly loud, randomly-spaced, and maddeningly slow. (No, there weren't any other classrooms available. I tried.) Although I'm not proud of this, I'll admit that the third time it happened, I let fly a blue streak worthy of Chris Rock on a good day. Nobody complained, I think because the sentiment was clearly directed at something getting in the way of actually conducting the class. I wouldn't handle it that way now, but hey, I was 26 and making a big 10k per year, so there you go.
That said, I think classroom cursing can fall under 'useful,' 'excusable,' 'distracting,' or 'harassing,' depending on context.
Useful cursing can include very rare and strong emphasis; extraordinary passion for a given argument; disarming humor (be VERY careful here, though); direct quoting; or making a connection from something seemingly abstract to something very real. The key here is that it has to be either very, very rare, or inextricable from the subject matter. A single curse dropped over the course of a semester is memorable; curses dropped every twenty minutes are simply tedious. As with comedians, I don't think there should be a categorical rule against it, but outside of a few narrow contexts, it's usually a sign of laziness. As my confidence and fluency in my field have grown, I've noticed my cursing diminish dramatically.
Excusable cursing would cover things like the dumpster incident. (I recall a math teacher in high school letting one rip when a projector screen fell down while he was writing on the board. Nobody complained, as far as I know, since we all probably would have done the same thing.) It doesn't really help, but I couldn't really blame someone for it, either. On 9/11, as we watched the towers fall over and over again on tv, I recall some usually-decorous folks letting their guard down, but I really couldn't blame them. Obscenity as a response to obscenity made sense.
Most in-class cursing, I think, is distracting. It's bad form in the sense that anything distracting is bad form when you're trying to get people to concentrate and focus. I'd put it in the same category as fidgetiness or a weakness for digressions about the local team. On balance, it probably detracts from the overall effectiveness of the teacher, though most of the time it falls short of anything I'd consider actionable.
Harassing is different, although in any given case folks can disagree on exactly where that line is. To me, cursing directed at a particular student would cross this line, as would anything lecherous. In practice, I also think that simple repetition can eventually cross over from annoying to unprofessional, though again, the line is fuzzy.
(Outside of class is another matter altogether. If somebody were to bug my car on the drive home, they'd hear a WASPy version of Sam Kinison with Tourette's. I find that a bracing round of profanity on the drive home cleanses the palate, and readies me for dealing with young children.)
(I may be wasting my efforts. Yesterday The Girl got impatient waiting for The Boy. TG – all of two and a half – yelled “Open the damn door!” Adolescence is going to be a hoot.)
There are times when nothing short of cursing really rises to the occasion. When you hit a deer on the highway at night with your young children in the car, “fiddlesticks” doesn't quite cut it. I find hanging curtain rods uniquely frustrating – don't ask me why – and any task along those lines usually leads to a blistering tirade questioning the parentage and chromosomal makeup of whomever crosses my mind at the moment. And of course, there's President George W. Bush. I won't go into detail about the viewing ritual The Wife and I have developed for the State of the Union address, other than to say that it involves language that would make a British MP blush, and some partial nudity.
Masters of the form often develop intricate curses of their own, or become amateur curators of cool curses they've heard elsewhere. (My fave is “son of a motherless goat!,” though I don't remember where it came from.) I've long envied the bilingual, since they always have a batch of useful curses at the ready. (Since I grew up in a largely Italian neighborhood, I've heard my fair share of Italian curses. Judging by the body language, they're pretty florid.) A single, sardonic curse, surgically applied, can be absolutely devastating – think of Bill Murray saying “you slut” in Tootsie. Done well, it works.
Lesboprof couches her sense of cursing context in racial and gendered terms, and there's certainly something to that. Different disciplines are probably different, too; all else being equal, I'd expect more latitude for cursing in a sociology class than in a math class (although it's probably reversed among the students). Comic timing and a sense of the moment are key, and relatively few academics, in my experience, have much of either. I suspect, too, that different regions of the country probably have different expectations – I'd guess that Brooklyn is more indifferent to it than Salt Lake City – and that very religious colleges probably have stricter rules. Since I'm a denizen of the Northeast, ensconced in a secular institution, I can assume a certain level of indifference.
Have you seen a case of classroom cursing in which it really helped? Alternately, do you know of a really creative curse that, well, gets the job done? The State of the Union is coming up, and I need to expand my repertoire.