- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Explaining COMMENTS would have been fine...
Admin
Admin
Erm...dude. The ++ isn't part of the identifier name. The ++ increments the identifier by 1. This is common in many languages ranging from C and its variants, Perl, PHP, JavaScript, and so on.
And yes, Mr. Microsoft Guy, that includes MSVC++.
--idb
Admin
perl will in fact allow a variable called "theInfamousI++". You need to refer to it as ${'theInfamousI++'}, but it will still appear in the symbol table like any other scalar.
Admin
Hey, I didn't know that. Thanks!
Admin
Jesus and Mary. What I didn't know was that for @a=(1,2,3), $#a == 2 while scalar @a == 3.
Admin
It's worth just ignoring preview entirely for formatting, and just use it as a way to scan text before you post. Just make sure to go back to the edit screen first.
I grew up with basica, so it took a while to get out of the habit of using two-letter variable names and minimal indenting. I also used to make defines so I could do silly things like
stc ffblk fil;
stc fat fl[256];
Gee, that's clear as sludge. Oh, I found a wtf function in the same source code.
split(char *name[13], char *name2[13], char *ext[4]){
char *dummy[3],*dummy2[100];
fnsplit(name,dummy,dummy2,name2,ext);}
and
char *call=26000, *scall=25500, *opt=25750, *i86=20000, *oss=4000, *forc=120, *ov=673, *ba=475;
Both representing a rather fundamental misunderstanding of pointers and, er, conservative naming. The latter was documented, I cut it for brevity. I don't even know how it ever (mostly) worked anymore, another good example of organically grown code. Have to love C.
Admin
This most stupid reply is actually more WTF than the initial posting. [Y]
Admin
I do speak Hungarian, and at first I didn't think these were actually Hungarian because of the lack of accents, camelcase or some other word-separating features, etc. So here's a shot at translating them:
kurvakeves - [unknown] "less"
naakkoridajigeljutott - "so now it's [gotten?] this far"
namostfoghivni - "so now it is going to call [some other function]"
nasikerultis - "so it even worked"
Basically, they don't mean anything more to a Hungarian speaker than to someone who speaks only English, demonstrating that it is perfectly possible to write meaningless variable names in ANY language.
Personally I like to use Hungarian notation, not because of any connection to my native language, but because it is a standard method of tagging (what should be) otherwise descriptive variable names with type (and sometimes scope) information. Of course this makes more sense in some languages than others. I don't use it the way Microsoft typically does, which is the wrong way to use it, but rather in the way that Simonyi intended it to be used. (The difference is partly in distinguishing between logical and physical types, and partly in knowing when a type tag obfuscates more than elucidates.)
Admin
Here are some much better ideas for variable naming: http://mindprod.com/unmainnaming.html
Admin
Are you claiming to have written "The Rape of Polly Nomial"?
http:graphics.stanford.edu/courses/cs348c-95-fall/software/polly/joke.html
I don't think so...
</http:>
Admin
No, I'm claiming I wrote something similar --- about 12 years earlier.......
Admin
OK. So I had to write code according to a spec which wanted to make C look like Fortran. In particular:
So, I ended up doing shit like this:
Admin
Before the outlook days? Every SMTP server in the world requires you to tell them what your own e-mail address is.
Admin
This is a sample of some of my code.. dont judge me to harshly im still an adolescent learner..
String G = new String("QuikProQuo");
if(imWatchingSOL)
G = G+" DoctorLecter";
else
G = MontyPythonsFlyingCircus;
for(int going = 1; going <= times;going++)
{
Ebbay(new SecuirityOfTheCountry(new GoesToBillGates());
}
Boolean Terminater = true;
Boolean IlBeBack = false;
while(GoAwayOrIShallTauntUAnotherTimer)
{
if(IStillExist)
PayMe(new FatAss(Cartman,"southparkonian"));
}
AdHoc = input.readLine();
if(AdHoc.equals("exit"))
Al = "Say hello to MY LITTLE FRIEND!!";
else if(AdHoc==null)
FC = "I am jacks Complete and utter lack of surprise";
else if(AdHoc==Astalavista)
{
MX = DelosForMoirto + ViaCondios;
System.exit(etTuBrutai+IFeelPretty+InOurYelloSubmarine);
}
PinkPanther1(new InspectorCluoso("Lives Again"))
This was part of payrole program but After found out who was grading it (the anel retentive miser) I figured I could turn it late.
Admin
Ok I think I have figured out what <FONT face="Courier New">RiceCrispies(Snap(Crackle(Pop()))) is supposed to do?</FONT>
<FONT face="Courier New">...</FONT>
<FONT face="Courier New">after puting it in an infinite loop,, Snap Crackle pop was the sound my mother board was making. (pentium II) </FONT>
It also had a smokey aroma.