Vulgare variable names

LowestOne (767)
I've seen a bunch of inappropriate variable names online. I was told by a teacher to never be cute like that, and I follow his advise. I was able to find something I'm not quite sure about now :)

I have two words, which I've named:
1
2
string fWord;
string sWord;


Think fWord is going to be a problem? Is the industry so politically correct?
Last edited on
Luc Lieber (907)
The only thing that you have to consider when choosing a variable name is that it sufficiently self-documents itself. Follow that guideline and you:

A) Probably won't ever need to use "vulgar" terms unless you're writing a sexual reproduction library.

B) Probably won't get confused with your variable names so often.

C) Won't incur the wrath of others that depend on your code.
darkestfright (1089)
Teachers live in the mystical land of Academia, and the things they tell you pretty much never apply to the real world.

For example, I was reading the Doom source code and noticed a variable called "fuck". It's completely undocumented, and I have no idea what it does.

I've also seen a few gems in my time, like:

1
2
Exception up = new Exception("Something is really wrong.");
throw up;  //ha ha 




//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//


// Magic. Do not touch.



#define TRUE FALSE //Happy debugging suckers


ResidentBiscuit (2207)
Ha the dear maintainer one was awesome.
Registered users can post here. Sign in or register to post.