Popping in for a quick thought about cursing in books. I write romance so my thoughts will apply best to that genre. Sometimes a flaming "f" word fits right in and suits the text. Other times, even a milder word, like "s**it" or "da*mn" can jerk me out of the story. What fits where?
There are few absolutes in life or fiction. For every rule, there is a reason to break it. But, since a writer never wants to throw reality in a reader's face, a rule should never get broken without thought, planning, and a sound literary motive. Given all that, my "almost always" rules revolve around the period of the book. In a historical, most curses can make use of more archaic - and more poetic- curse substitues like "arse" for ass. A historical polluted with profanity takes the reader out of the period and back to the present. And that's where profanity belongs. A contemporary romance or romantic suspense can take some tough talk. Cops or detectives, lawyers discussing a case, an intense board meeting, a fight with a colleague - all of these may be primed with some down and gritty language. The story might require it.
Most of the time, instead of tossing in a four-letter word, a writer can get creative - and make the reader smile or, possibly, introduce an insult to a reader's real life. Just think of 'duck' and 'ducking.' Ie; "Isn't that ducking fantastic;" or "Screw me? Duck you." Instead of saying - "You're just a genuine asshole, aren't you?" A character might say - "You're a real booger-bear, aren't you?"
Insults don't always have to be down and dirty. In contemporaries or historicals, getting creative may have a bigger pay-off for the story and the reader. Four letter words are like pain pills - use only as needed.