Linus is a great example actually, because people pointed out he was being too much of an asshole, and he eventually agreed, and he reduced the toxicity of his rhetoric, but you can bet if the situation called for it, he would still use vulgarity to get his point across.

If you totally ban profanity or vulgarity, all you do is force other words to take up the slack of what people use those words for, and therefore increase ambiguity.

Don't lazily add profanity to the code base because you are a child (ie no, don't use "fuck1" as a variable name FFS) but if there is something truly insane going on, I'm going to write "This is fucking magic" in the code, and my coworkers will know to give that code the respect it deserves.

Consider the fast inverse square root code. Most people only know it because "what the fuck" in a comment. Intensifiers are useful in communication.

https://tvtropes.org/pmwiki/pmwiki.php/Main/PrecisionFStrike

Your code SHOULD have few swears because few situations deserve an intensifier like that, but some situations absolutely call for it.

Funny, I think Linus is a great example for the opposite reason. He shows that if you stop tolerating bad behavior, people will often change how they behave.

The idea that removing vulgarity will increase ambiguity in this context is very strange. In terms of communication, the only use for vulgarity is to convey emotion. That's not relevant here. If we ban it, maybe people will explain why something is shit, instead of just saying it's shit. Forcing other words to take up the slack is a feature, not a bug.

I know about the fast inverse square root code. I could probably give a decent if somewhat vague overview of how it works from memory. I don't recall the WTF comment, and that certainly isn't why I heard about it.

This is a great example of what I'm saying. Commenting 0x5f3759df "what the fuck?" isn't useful. It tells me the author was confused or amazed or something. Imagine if instead they had commented, "Compute an initial guess by negating and halving the exponent. 0x5f3759df was found by experimenting and seems to give a good guess in the mantissa bits."

I'm going to write "This is fucking magic" in the code, and my coworkers will know to give that code the respect it deserves.

This is so weird to me. You won't find blueprints (at least not the copies that will be handed around across teams and companies) marked up with "this is fucking magic" when an architect or structural engineer design something amazing. In a DM/email/SMS? Sure, that's the correct place to put that message.