|
At startup companies, it's definitely a thing. I've done more my share of profanity in code. For more established companies with actual coding standards that are enforced, more likely not, and you would probably end up with a "friendly chat" with the manager/director.
Then again, I figure all of us have at one time done this.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
-- Marcus Brigstocke, British Comedian
|
|
|
|
|
|
|
sarcasm. I got dinged for that once.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
But I like to bury silly nonsense sometimes (at least in my open source stuff) in my comments. Not a lot. Just one line in an entire codebase, in the middle of an innocuous function below the fold.
Like that.
To err is human. Fortune favors the monsters.
|
|
|
|
|
So, instead of thinking you are profane, they will think you are insane...
oh, wait!
sorry it was too tempting, I won't get the coat because it is too hot, but I will show myself the way out
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
The reason being, you never know where that code will end up or who will read it.
As much as it can feel good to vent about something bad like a piece of equipment, dodgy interface or whatever, there is every chance that it can be read by the wrong person, and come back to haunt you.
|
|
|
|
|
Bruno van Dooren wrote: and come back to haunt you. Yes, it can and it will (see my post below)
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I have done it at the very beginning of my career, only temporary out of frustration, specially with some crappy legacy code.
Sadly I once forgot to clean up the mess and the maintenance of the customer complained to my boss about the comments.
I got used pretty fast to write code and comments in a neutral tone after that.
And I spared the profanity for my personal notes or for verbal swearing in valenciano (my second mother language) just in case someone could understand spanish.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I posted this little beauty: Re: Calculate the date of the previous and next 2 Wednesdays - C# Discussion Boards[^]
But, no, I do not use profanity in code/comments and rarely spoken or written unless the context requires it (e.g. writing porn or interacting on adults social media sites). KSS is a good rule. There is always a better way to express yourself, numbnuts.
P.S. There are they who are so sensitive dim-witted that they even balk at the use of foo and bar as names.
modified 20-May-23 12:57pm.
|
|
|
|
|
Similarly, I worked on a system of multiple hardware modules. One was the master, the rest were slaves. About 5 years into the project, ALL of the terminology had to be changed to primary and secondary
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
The question makes it seem like we are binary oriented people: Either it is profanity or it is not. True or false.
One of my relatives once reacted with horror to learn that a process was "aborted". He had nothing against "killing" a process ...
Some is tongue-in-cheek humor: I once wrote an object factory, a General Object Dispenser, or GOD, creating all the objects in this software world. There were people finding that inappropriate.
A surprisingly large lot of people think that terms such as "Geee!" or "I'll be ..." has nothing to do with religion or calling for the actions of a deity. (There are lots of other such terms.) Are they acceptable?
Another time I wrote an infinite loop as 'while (!WW3)' (after declaring WW3 false). Even that was provocative to some people, although more people questioned my definition of WW3 as a constant false.
There is a thick and fuzzy borderline between humor and profanity. Maybe we should ban humor from code as well. Lots of my humor is other's profanity.
Of course you have to draw the line somewhere.
Such as here: ___________________________________________________________________
|
|
|
|
|
I would argue that you're making a da$$ silly comparison between profanity and offensive language. Profanity is clear with the exception of the Brits, who have no issue with the f-bomb, but calling something blodd$ heck is our version of the f-bomb. Brits, am I right or did I mangle it?
Offensive language is much more subjective, but I understand your point. Some people just have way too much time on their hands. Karens and Kens have been around forever. Then came youtube.
I once wrote a simulation editor for aircraft flight profiles. I had a comment in my code that went something like:
// Do not exceed 10g otherwise the pilot dies.
That got me dinged.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I frequently resort to silly variable/function names in personal projects to keep things entertaining. It is not profanity until someone else reads it. After that even harmless jests can be considered profane.
|
|
|
|