JWZ: "I wear my unprofessionalism as a badge of honor." <http://www.jwz.org/doc/easter-eggs.html>;
PG: "Maybe some aspects of professionalism are actually a net lose" <http://www.paulgraham.com/opensource.html>;
PG*: "the way that he thought about professionalism did not differ from the thinking of a Mary Kay cosmetics saleswoman: wear nice clothes, drive a clean car, and don't say anything that might offend anyone" <http://philip.greenspun.com/ancient-history/professionalism-...;
We speak and write profanity in other contexts, so why not code? It shows respect for future maintainers that we're honest about what truly sucks, instead of watering it down. Plus, we don't care if clients or investors see that we don't wear suits (or even shoes); similarly, they care about what the code does, not what it looks like.
Anyway I would only swear when I'm at home with a beer in my hand, so I only put swearwords in my code when I'm working at home with a beer in my hand ;)
BTW, didn't you notice how often good programmers curse in public?
I suspect we work in different industries.
I'd say it depends. If you're working for bigco, swearing is probably not going to go down well with your boss, or co-workers. If you're working in a startup/open source project/on your own, then swearing can be good and useful IMHO.
If I swear in the comments of some code (Rare), I can instantly see that I've had some issues with that code, or something I'm interfacing to is idiotic and needs fixing etc.
You don't work in a corporate environment, do you?
If you're working for bigco, swearing is probably not going to go down well with your boss, or co-workers
Since few bigcos I've ever worked at ever do code reviews, how would they even know?
After spending many years in corporate environments, it's easy to spot those who haven't when they post comments about corporate environments.
But tell me, when did you ever have to fill out a "comment request form" in triplicate?
I've worked in many corporate environments, some where things were perfectly logical and others that aspired to be as good as Dilbert.
But I never had to fill out anything in triplicate. I guess I should have realized the sarcastic flag was up. Sorry.
In addition, it's got nothing to do with working for a large corporation as I work for a small advertising software company with less then twenty employees.