There are two types of people: the ones that write the code, find the bugs (including hardware ones), find the bad design decisions (including the ones they wrote themselves)... and the ones that complain that they found a swearword in the source code they never see because compilation step.
Or as they say in the army: do, lead, or get out of the way.
Total non-sequitur - it's entirely possible to be highly productive and also moderate your written language for a wider audience. What a ridiculous distinction to make.
In a world where code is written more and more by LLMs, these random human generated comments might hold anthropological value in some future.
Think of it akin to us studying cave paintings, wondering what whoever left their handprint on the cave wall was thinking when they did it. So these ancient lines of code might be studied in some future by our descendants, or whatever form we'll take. Interesting to perceive the author's frustration with said bit of code.
By comparison LLM generated code is neat and tidy with clean and clear comments. Plenty of that to go around for the future. No need to suck the soul out of every bit of code we currently have.
There are far more than two types; all of the most effective programmers I've ever worked with can do everything you mentioned and write professionally.
If we have to boil it down to two types, however, I'd split it as "people who think they can do everything themselves and only the code matters" and "people who build effective teams capable of far more than themselves solo", and it's the second group that does the most impressive things. Being professional and respectful is quite beneficial for that group.
It's great that you can do/lead and write professionally. But, in any case, writing professionally shouldn't take priority over doing/leading.
Otherwise we wouldn't have the Linux kernel; and I bet the swearing guy behind it got more stuff done and made a bigger difference than the combination of the most effective programmers you have ever met.
Yeah, if only Linux could be built by one swearing guy with no external contributors like Linux instead of being a bland swear-free corporate hellscape like Linux then it could be successful like Linux.
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.
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.
I'm sure many of us have worked with that type of person who is very good at what they do, but also a massive asshole, and then people put up with it, because, well, that's just part of being a genius (as an aside: this sentiment is often applied to other disciplines too; see, Max Verstappen in F1 or Magnus Carlson in chess.)
I learned long ago that no matter how good they are, it's not worth it.
Agreed. And one thing people seem to miss in this argument is that people can change, and generally will if they're in an environment that facilitates it. If a skilled programmer gets constant pushback because they act like a jerk, they'll probably figure out how to behave.
I would say that a swearword where a swearword is due is actually effective and professional. Dancing around an issue and trying to be polite wastes time and effort, a well-placed swearword directs eyes, ears and effort to where they need to be.
Or as they say in the army: do, lead, or get out of the way.