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.
From the BitTorrent client source, an apt comparison:
This function is like a boat made of shit, floating on a river of shit.
From my .emacs file: ;; Fucking RMSmacs (by version 21.3, but after 21.1) doesn't
;; fucking make these fucking variables local where it fucking
;; should, so the c-set-style we're about to do below breaks
;; fucking fill-paragraph for fucking all non-c-like modes by
;; fucking default. Someone desperately needs to die, and I'm
;; pretty sure it's not just me.
This one doesn't include swearing, but is in the same spirit. From the Audiogalaxy server, above a huge chunk of regular-expression-based string munging code: /*
sah's take on all this:
"Cursed the ground where dead thoughts live new and oddly bodied,
and evil the mind that is held by no head. [...] For it is of old
rumour that the soul of the devil-bought hastes not from his
charnal clay, but fats and instructs the very worm that gnaws;
till out of corruption horrid life springs, and the dull
scavengers of earth wax crafty to vex it and swell monstrous to
plague it. Great holes secretly are digged where earth's pores
ought to suffice, and things have learnt to walk that ought to
crawl."
-The NecronomiconA big honkin' "FUCK YOU" that showed up during QA 5 minutes before client showed up for review.
Never again.
Same for when they're writing code.
I don't quite get the shocked reactions.. I can understand thinking swearing is distasteful in certain contexts but would certainly never draw wider conclusions about a person because they swear. Then again, I'm Australian.
While you're in there cutting out F-bombs, you should probably do yourself a favor and review the surrounding code. Foul language in comments are almost always put in out of frustration, so you probably have some good targets for code refactoring.
That said, a sloppy file full of f-bombs can be annoying and repetitive, too.
Just like the pros: http://www.jwz.org/doc/censorzilla.html
cmd/xfe/editordialogs.c: fuck = fe_file_name_int_my_directory(context, buf, link_text);
cmd/xfe/editordialogs.c: if (fuck && fuck[0] != '\0') {...may be of interest. But that said, no, I don't. Furthermore, colleagues who frequently use profanity in their everyday speech strike me as rather disrespectful.
Seriously.
Vista bugs are new, so they are a royal pain in the ass to trace. Microsoft is typically unresponsive at best and in a denial at worst. The most frustrating part is that bugs affect parts that were present in the OS and worked just fine as early as Windows 2000.
Just to give an example - installing a driver or a adding a device instance from a service causes a deadlock in the Setup module that can only be resolved by forcefully terminating the calling process. A deadlock.
They broke basic stuff and these booby traps are sitting in the OS waiting for a dev to step on them. And you bet I am going to leave a comment regarding the IQ of whoever's responsible after I kill two weeks chasing the results of their sloppy coding around this piece of engineering.
Possibly related, many people I know find it easier to think of things to say in reply to stuff that's mistaken than in reply to stuff that's accurate. So they spend more time engaging with mistakes than thinking about the good ideas they encounter. That's important too.
Comments are for quick explanations of things that aren't obvious. Documentation is for explanation of the obvious. Blogs are for ranting.
Do I sometimes put dire warnings or florid descriptions of suckage or even rhyming couplets in my code? Yes.
Do I swear in code? No. Swearing is easy and imprecise. If I can't find a more useful way to convey my point, I'm obviously not firing on all cylinders and should take a break.
To be fair, nearly everything I work on is one or both of at least moderately interesting or for a good client. If I were working on something obnoxious for a boss I disliked, maybe I would swear. But even then I'd be more inclined to sarcasm.
Edit: incidentally, profanity in code is not limited to comments. "White Like [name deleted]s Balls" is a variable name I saw once and have not yet had the good fortune to forget. I'll let you guys guess whether this was code distilled to its clearest essence. :)
but then i joined a company that supplies source to customers.
> <%# All acesss to the message bar should go through the message()
> function defined above or kittens will be harmed %>
I personally prefer not to swear outright, in code or otherwise, but it's only a preference.
I would not recommend doing this, but it definitely made me feel better.
I would not recommend doing this, but it definitely made me feel better.
Just Google "windows source swear words" or something.
However, I don't believe it's appropriate to swear in code, and that any examples would be expected to come back and bite you on the bottom.
The first line of source read
/* CSALDE - Custodio Sum At Lois' Defecatio Est
Is it OK if your s bombs are in Latin?
more than anything else, i swear at the code.