Swear words in method names

Swear words in method names

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Swear words in method names

Post by hughperkins »

Anyone who is not British may not be aware that 'b*gger' is a strong swear word, comparable with 'f*ck'. Would 'F*ckOff' be an acceptable method name in a project of the size and reputation of Spring?

From the Oxford English dictionary:

http://www.askoxford.com/concise_oed/bugger?view=uk

Note the 'vulgar' annotation at the top left.

For comparison:

http://www.askoxford.com/concise_oed/fuck?view=uk

Similarly, definition looks harmless enough, but the annotation 'vulgar' basically means 'This is a (fairly strong) swear word'.

http://www.askoxford.com/concise_oed/hell?view=uk

'hell' does not have a vulgar annotation, even though it is a (much gentler) swear word.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Swear words in method names

Post by Das Bruce »

Haha, what function is that?
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Swear words in method names

Post by hughperkins »

CCommandAI::B*ggerOff( pos, radius )
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Swear words in method names

Post by smoth »

it is part of scripting. IIRC if you changed it several conyards won't work right.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Swear words in method names

Post by hughperkins »

It's everywhere. It's like a weed...:

Code: Select all

user@701:/data/taspring/git/springheadless$ find rts -name "*.cpp" -print | xargs -l1 grep -Hi bugger | grep -iv debugger
rts/Game/GameHelper.cpp:void CGameHelper::BuggerOff(float3 pos, float radius, bool spherical, CUnit* exclude)
rts/Game/GameHelper.cpp:			u->commandAI->BuggerOff(pos, radius + 8);
rts/Lua/LuaConstCOB.cpp:	PUSH_COB(BUGGER_OFF);
rts/Sim/MoveTypes/GroundMoveType.cpp:				// if we are doing something important, tell units around us to bugger off
rts/Sim/MoveTypes/GroundMoveType.cpp:				helper->BuggerOff(owner->pos + owner->frontdir * owner->radius, owner->radius, true, owner);
rts/Sim/MoveTypes/GroundMoveType.cpp:				// if we are doing something important, tell units around us to bugger off
rts/Sim/MoveTypes/GroundMoveType.cpp:				helper->BuggerOff(owner->pos + owner->frontdir * owner->radius, owner->radius, true, owner);
rts/Sim/Units/COB/UnitScript.cpp:	case BUGGER_OFF:
rts/Sim/Units/COB/UnitScript.cpp:		case BUGGER_OFF: {
rts/Sim/Units/COB/UnitScript.cpp:				helper->BuggerOff(unit->pos + unit->frontdir * unit->radius, unit->radius * 1.5f);
rts/Sim/Units/CommandAI/BuilderCAI.cpp:								helper->BuggerOff(build.pos, radius, false);
rts/Sim/Units/CommandAI/AirCAI.cpp:void CAirCAI::BuggerOff(float3 pos, float radius)
rts/Sim/Units/CommandAI/AirCAI.cpp:		CMobileCAI::BuggerOff(pos, radius);
rts/Sim/Units/CommandAI/CommandAI.cpp:void CCommandAI::BuggerOff(float3 pos, float radius)
rts/Sim/Units/CommandAI/MobileCAI.cpp:				CR_MEMBER(lastBuggerOffTime),
rts/Sim/Units/CommandAI/MobileCAI.cpp:				CR_MEMBER(buggerOffPos),
rts/Sim/Units/CommandAI/MobileCAI.cpp:				CR_MEMBER(buggerOffRadius),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	lastBuggerOffTime(-200),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffPos(0,0,0),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffRadius(0),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	lastBuggerOffTime(-200),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffPos(0,0,0),
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffRadius(0),
rts/Sim/Units/CommandAI/MobileCAI.cpp:void CMobileCAI::BuggerOff(float3 pos, float radius)
rts/Sim/Units/CommandAI/MobileCAI.cpp:	lastBuggerOffTime = gs->frameNum;
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffPos = pos;
rts/Sim/Units/CommandAI/MobileCAI.cpp:	buggerOffRadius = radius + owner->radius;
rts/Sim/Units/CommandAI/MobileCAI.cpp:	if(lastBuggerOffTime>gs->frameNum-200){
rts/Sim/Units/CommandAI/MobileCAI.cpp:		float3 dif=owner->pos-buggerOffPos;
rts/Sim/Units/CommandAI/MobileCAI.cpp:		if (length < buggerOffRadius) {
rts/Sim/Units/CommandAI/MobileCAI.cpp:			float3 goalPos = buggerOffPos + dif * ((buggerOffRadius + 128) / length);
rts/Sim/Units/UnitTypes/Factory.cpp:			helper->BuggerOff(buildPos - float3(0.01f, 0, 0.02f), radius + 8);
rts/Sim/Units/UnitTypes/Factory.cpp:	helper->BuggerOff(pos - float3(0.01f, 0, 0.02f), radius);
Last edited by hughperkins on 02 Oct 2009, 07:29, edited 1 time in total.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Swear words in method names

Post by lurker »

I'm calling in a serious [citation needed] on the severity the word. The lack of a vulgar tag on Hell isn't enough when Hell is not a slang word. And other sources I'm looking at suggest it's not that bad.

Also do you really feel the need to replace a single letter with an asterisk? What's the point, seriously? I could understand if you actually wanted to censor the word, but a single vowel like that is just annoying.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Swear words in method names

Post by smoth »

I am not talking about scripting in lua...
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Swear words in method names

Post by hughperkins »

lurker wrote:I'm calling in a serious [citation needed] on the severity the word. The lack of a vulgar tag on Hell isn't enough when Hell is not a slang word. And other sources I'm looking at suggest it's not that bad.
Well, I personally don't really feel comfortable using the term 'b*gger' in written communication, which means that any time I'd wish to refer to the method I would not feel comfortable.

Looking at sources, well, the Advertising Standards Authority in England did a survey of what people in England felt about different words, the results of which can be found:

http://www.badscience.net/2006/03/cunt-fuck-wanker/
http://www.asa.org.uk/NR/rdonlyres/1EAE ... c_2000.pdf

which were:

Code: Select all

                %       %       %       %
             saying  saying   saying  saying   Ranked    Ranked
              ÔÇÿvery   ÔÇÿfairly ÔÇÿquite   ÔÇÿnot    position  position
                                                      21
                                                         (1998)
             severeÔÇÖ severeÔÇÖ   mildÔÇÖ swearingÔÇÖ (2000)
Cunt            83      13         3    *1         1        1
Motherfucker    79      15         4    *2         2        2
Fuck            71      22         6    *1         3        3
Wanker          37      37       22      4         4        4
Nigger          42      26       14     18         5      11
Bastard         33      33       25      8         6        5
Prick           26      36       29      8         7        7
Bollocks        25      32       34      8         8        6
Arsehole        22      34       36      7         9        9
Paki            34      26       16     24        10      17
Shag            27      28       32     12        11        8
Whore           26      33       25     15        12      13
Twat            26      27       27     19        13      10
Piss off        18      32       42      7        14      12
Spastic         32      24       16     28        15      14
Slag            19      31       33     17        16      18
Shit            16      26       49      9        17      15
Dickhead        16      24       44     16        18      19
Pissed off      14      24       47     14        19      16
Arse            10      21       47     21        20      20
Bugger           9      22       48     21        21      21
Balls           11      19       44     25        22      22
Jew             20      15       14     51        23      24
Sodding          7      18       45     30        24      23
Jesus Christ    14      13       27     46        25      26
Crap             5      15       48     32        26      25
Bloody           3      11       56     29        27      27
God             10       8       23     60        28      28
... so 'b*gger' does come quite a lot lower than 'f*ck', but above 'cr*p'.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Swear words in method names

Post by Das Bruce »

Oh no, the children might learn a new naughty word while reading spring source code...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Swear words in method names

Post by Argh »

FYI, but BUGGER_OFF (#define 19) is a part of COB, which is what Smoth's referring to. Kinda important value / concept, really.

I don't think that changing it in Spring will break COB, though, it's just a #define'd value, so long as the logic of what it does doesn't change, nothing should break.

And I guess I'm just an ignorant American, but I always thought "bugger off" was a less-offensive version of "fuck off", much like "buzz off" in American slang (which is very rude, but not necessarily Fighting Words).

It surprised me to hear that that this was an issue, tbh, but if you're looking for cursing, you should probably translate the Swedish, hehe...
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Swear words in method names

Post by hughperkins »

Argh wrote:"buzz off" in American slang (which is very rude, but not necessarily Fighting Words).
"buzz off" to me doesn''t sound like swearing at all. It's just like 'Go away', and quite different to me than 'p*ss off'.

I feel that writing crap and fuck in comments is one thing (though I personally went through and removed all the 'crap's and 'fuck's and stuff from my comments in springheadless), but making methods and constants named after them feels different somehow...

It's kind of like, at a party with your boss, you might say 'The fucking server is down', but I would tend to avoid writing in an email to all the traders 'The fucking server is down so your fucking trade application is fucking fucked.' I mean, you could do it, but I feel it would really stand out as being somewhat unusual.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Swear words in method names

Post by yuritch »

Changing it inside engine will not effect COB in any way, since BUGGER_OFF is a #define in exptypes.h that comes with Scriptor (so independent of engine). It can be called however you want inside engine, it's passed as a number there anyway.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Swear words in method names

Post by Argh »

Well, if changing it in the engine won't break stuff, I see no reason not to be accommodating about it. Let me know what "sanitized" name is chosen, though, I try to keep my STANDARD_COMMANDS #include correct, insofar as the engine-side variables are concerned.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Swear words in method names

Post by lurker »

I really don't want anyone to have to deal with "oh yeah, the defines are all in this file, but you have to change BUZZ to BUGGER to make it work with your bos scripts." The copy that comes with scriptor is not remotely up to date, and it's a hassle to make people go to some specific source for it.

So it's under arse. I'm not seeing the issue.

And, uh.. spastic? Jew? What is with this list?
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: Swear words in method names

Post by Petah »

Besides being a vulgar word it does not describe the method in a logical way so it should be changed.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Swear words in method names

Post by zerver »

Argh wrote:It surprised me to hear that that this was an issue, tbh, but if you're looking for cursing, you should probably translate the Swedish, hehe...
I did not read all the source, but did not get offended by it yet. Swedish remains mostly in the rarely-touched files I guess.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Swear words in method names

Post by Kloot »

You sure have a lot of time on your hands to be offended by trivialities. You could also try to recognize the subtle humor behind it (given what BuggerOff does and when) instead of immediately calling for the censors. Also, your source seems to refer to 'bugger' as a noun or a verb specifically, not the 'bugger off' intransitive verb. What kind of non-issue is this anyway?
it does not describe the method in a logical way
Five seconds of reading the context makes it completely logical.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Swear words in method names

Post by hoijui »

totally agree with Kloot, plus...
beeing rude to spring units.. you know... it is not like they could be offended.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Swear words in method names

Post by hughperkins »

Personally, I found 'buggeroff' to not really tell me what the method did, whereas if the method was called say 'KeepClear' or 'StayClear' or 'StayBack', I feel that would convey quickly my current impression of what the command does?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Swear words in method names

Post by Regret »

Haha. Did you notice how majority of games made with Spring involve mass murder and encourage the player to kill?

But yea, words are surely more offensive.
Post Reply

Return to “Engine”