I can swear a lot while talking. I have never written a curse word in my code, especially professionally. Just seems odd and not useful? I wouldn't be offended if I came across one, but it seems weird to use in a professional setting? A lot of the times I have seen inappropriate words used were not in any context and were used as a "joke" when logging/debugging. So "dicks 01" or "fuck me 01" instead of a bland "check 01" or whatever. For some reason, that seems much more unprofessional than a comment like "this code is shitty but works, need to clean up."
The contextless swearing seems so unnecessary and adds nothing to the code, whereas a comment with a curse word in it reads way more human.
> So "dicks 01" or "fuck me 01" instead of a bland "check 01" or whatever. For some reason, that seems much more unprofessional than a comment like "this code is shitty but works, need to clean up."
Agreed.
Context matters a lot. People say "shitty code" all the time. I don't see that as unprofessional. But "dicks01" I would probably change if I came across it in code. Not because I would find it offensive, but because it serves no purpose other than to be juvenile... and that can easily be counter-productive if the goal is easy to read and maintain code.
With respects to "shitty code", I'm not even sure that I would personally even consider the word "shit" to be a swear word in 2025. I'm reminded of the TV show on Showtime called Bullshit (by Penn & Teller). They wanted to name the show "Humbug", which was considered profane in the early 20th century when Houdini was alive and famous. But Showtime didn't like it because they figured it wouldn't land with a modern audience. "Bullshit" it was.
That said, the article even includes the word "crap" (though perhaps they are making the point that it is replacing other, "more profane" words). That one strikes me as odd. If that is considered rude and offensive, then surely "humbug" ought to be as well. Probably very culture-specific.
When I was a child in the 80s (US east coast), my parents considered "crap" to be a bad word, and my sister and I got in trouble if we used it.
It's funny to think of that today; I can't imagine any of my peers who are parents forbidding their child from saying "crap" (though I wouldn't be surprised if that was still a thing in some places).
But yes, time and culture matter. "Crap" has fallen off the list just has "humbug" has (and "humbug" has fallen out of use nearly entirely; I imagine the only reason people are familiar with it at all today is because of the fictional Ebenezer Scrooge), and new words have been added as "bad" that weren't a problem in my childhood, or back when "humbug" was a big deal.
I have a very clear memory of offending someone with the use of the word “crap” years ago.
As a kid I worked in a restaurant that sold Cincinnati-style chili - noodles with sweet chili and cheese on top. We were encouraged to offer customers who ordered a plain bowl of chili this noodle concoction instead.
Late one night, I had a customer order a bowl of plain chili. I gave her the spiel I was supposed to, suggesting that she try the noodle dish. She said, “so you won’t sell me a bowl of chili?”. I replied, “sorry for the confusion ma’am, I am happy to sell you chili. We are asked to say this crap because management is worried customers don’t know what they want”. She replied, “I don’t think it’s appropriate for you to use the word ‘crap’ with me”. I apologized again, gave her her order, then was removed from my position 3 days later when she emailed management to complain. I had “refused to sell her chili”, and “used vulgar language”.
That sounds more like someone who was looking to be offended, not necessarily someone who finds "crap" offensive specifically.
I try to be silly rather than explicitly vulgar for my own sanity. Having a comment about a hack that "stinks worse than expired chicken nuggets" or seems to have been "composed by a series of dartboard throws at random character sheets" is way more fun to me.
That said, I don't take issue with cursing in code that remains private to the development staff. As others have said more eloquently than I can, the issue is when it is exposed to customers who might take issue and churn. Not a good look, so for better or worse, there are professions where professionalism cozies up to sterile language.
> I can swear a lot while talking. I have never written a curse word in my code, especially professionally.
I can swear a lot while talking. I have, once or twice, written curses in my code, sometimes including curse words, especially professionally. "Within this function lie buried the bones of those intrepid explorers who came before you. It is hallowed ground, and cursed be thy soul if you re-order anything without a +2 from a priest. You have been warned."