Live data from Hacker News

Ask HN: Do you swear in your code?

news.ycombinator.com

11–20 of 82 posts

Re: Ask HN: Do you swear in your code?

#12
Some people don't quite get the message unless you use swear words. Especially when the message is "this code is used to be compatible with X, and IMO, X is not very good". 'Not very good' doesn't really describe the emotion that it gives you. I'm sure there's probably better ways to criticize another software system, but when you're short on time, sometimes swearing does the trick. Most often I've deleted such comments or re-written it with a more eloquent vocabulary. But in general, I don't think it's forbidden territory. Call it being passionate about your craft :)

Re: Ask HN: Do you swear in your code?

#13
I don't have a habit of commenting stuff, so i do it rarely. I don't write allot of unclear code(tanks to python) so i don't have a lot of places to express myself in any other form but good code. I comment only hairy stuff. But i use swear words as a variable names sometimes if im not going to show the code to others, but they are usually not in English.

Re: Ask HN: Do you swear in your code?

#17
It is ok as long as only friends read it, "Haha, look, Johnny used a swear-word, he's such a witty guy" they'll say. But there may come a day that someone who doesn't know you reads that comment, without knowing you and your colorful personality and reading it completely out of context her first impression of you will be that you're a cantankerous old fart and she'll hook up with that dumb html-"programmer" instead.

Re: Ask HN: Do you swear in your code?

#19
post #3

Swearing in comments is unacceptable IMO. You wouldn't write swear words in internal documents, so why do it in code. It's unprofessional and shows a level of dis-respect for your own code and for the people who might end up maintaining it. Plus, heaven forbid a client happened to see it as well.

You work in a corporate environment don't you. You had to fill out a "comment request form" in triplicate just to post the above comment ;)

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.

Re: Ask HN: Do you swear in your code?

#20
Do I swear under my breath when code doesn't run how I meant? Often.

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.

Post reply on HN