Live data from Hacker News

Ask HN: Do you swear in your code?

news.ycombinator.com

51–60 of 82 posts

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

#52
post #51
post #31

Earlier quoted context omitted.

You might ask yourself the same.

I replied to you because I was curious what you'd say. I am interested in human psychology.

And you have confirmed how easy it is to bait me into snarky responses. Congratulations!

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

#53
Some of my favorites that I've written or come across...

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 Necronomicon

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

#54
post #52
post #51

Earlier quoted context omitted.

I replied to you because I was curious what you'd say. I am interested in human psychology.

And you have confirmed how easy it is to bait me into snarky responses. Congratulations!

Why are you getting snarky? I was perfectly serious. I think it's best to ignore silly things. Most people seem to give them a lot of attention. That's important. I want to know why they do that.

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.

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

#55
post #16

Fuck yes! Just like the pros: http://www.jwz.org/doc/censorzilla.html

There's swearing in comments, then there's:

  cmd/xfe/editordialogs.c:   fuck = fe_file_name_int_my_directory(context, buf, link_text);
  cmd/xfe/editordialogs.c:   if (fuck && fuck[0] != '\0') {

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

#56
post #54
post #52

Earlier quoted context omitted.

And you have confirmed how easy it is to bait me into snarky responses. Congratulations!

Why are you getting snarky? I was perfectly serious. I think it's best to ignore silly things. Most people seem to give them a lot of attention. That's important. I want to know why they do that. 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 g…

Oh. I replied because it was fun to do so, and because I'm in an epic bout of procrastination.

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

#57

// No fucking clue why the below line is there

Yeah, comments in my code are "notes to self" as much as anything. When I come back, I want to know what I was thinking. If I've commented like that it means I've thought about it and drawn a conclusion, rather than just skipped it as unimportant.

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

#59
post #50
post #49

Earlier quoted context omitted.

My last job was in a corporate cubedom for 4 years. Not a massive company, but a few 100s of employees. We held weekly code reviews at one point. Also bosses do have a habit of suddenly believing that if they help code the project might run quicker, so they ask for svn access etc, then break everything :)

So you have worked in a corporate environment. My mistake. But tell me, when did you ever have to fill out a "comment request form" in triplicate?

Now I can't work out if you're being sarcastic or not.

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

#60
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.

I'm located in the northern parts of Europe so perhaps that explains it but I routinely and deliberately use foul language in technically oriented internal documents. The rationale being that it should be harder to copy'n'paste and edit it in an ad hoc sales doc than to ask me for a more specific technical explanation.
Post reply on HN