• Blake Miller (unregistered) in reply to Free

    Explaining COMMENTS would have been fine...

     

    if ( (platform.toUpperCase().indexOf("MAC") > -1) && // using macintosh OS
          (browser.toUpperCase().indexOf("IE") > -1) &&  // using internet explorer
           wasInitialized() && resize > 0 ) // initialized and resized
     {
       // do something
     }
    
    Would make me just happyfine.  Some extra variables would not do much for me, really.
     
  • (cs)
    Alex Papadimoulis:
    Must be before the Outlook days. Or most probably in a Unix environment (poor thing).
  • IDemandBeer (unregistered) in reply to WTFPhenom
    Anonymous:
    What language do YOU use that you can use ++ in your identifier name?  I'm a Microsoft guy and I truly don't know the answer to that because MS languages don't allow it.


    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
  • (cs) in reply to Gooch
    Anonymous:
    Perl will quite happily allow you to declare $theInfamousI as a variable, and then increment it via
    $theInfamousI++

    ex: $theInfamousI=0;
    $theInfamousI++
    print "$theInfamousI\n";   -> will print out "1"..

     I'd have to suspect that's what was really going on with that little gem.

    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.
  • Aaron (unregistered) in reply to Andy Lester

    Hey, I didn't know that. Thanks!

  • Aaron (unregistered) in reply to Aaron

    Jesus and Mary. What I didn't know was that for @a=(1,2,3), $#a == 2 while scalar @a == 3.

  • (cs) in reply to em
    Anonymous:
    Aaargh, your forum software formatted that correctly in the preview, which is definitely a WTF.


    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.
  • Aiwa (unregistered) in reply to IDemandBeer

    Anonymous:
    Anonymous:
    What language do YOU use that you can use ++ in your identifier name?  I'm a Microsoft guy and I truly don't know the answer to that because MS languages don't allow it.


    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

    This most stupid reply is actually more WTF than the initial posting. [Y]

  • (cs) in reply to Kippesoep
    Kippesoep:

     Try the ones I have to deal with:
    • kurvakeves
    • naakkoridajigeljutott
    • namostfoghivni
    • nasikerultis


    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.)
  • Andreas (unregistered) in reply to Free

    Here are some much better ideas for variable naming: http://mindprod.com/unmainnaming.html

  • Paul Atreides (unregistered) in reply to JamesCurran

    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:>

  • (cs) in reply to Paul Atreides

    Anonymous:
    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:>

    No, I'm claiming I wrote something similar --- about 12 years earlier.......

  • dave (unregistered) in reply to JamesCurran

    OK. So I had to write code according to a spec which wanted to make C look like Fortran. In particular:

    1. every function must return void
    2. every function must have 3 or 4 arguments
    3. the first argument is a pointer to a status structure; the second is the pointer to the output structure; the third is the input; and the optional last is other parameters

    So, I ended up doing shit like this:

    typedef struct
    tagTwoDetsTimeAndASource
    {
      LALPlaceAndGPS *p_det_and_time1; /* the first detector and detection time */
      LALPlaceAndGPS *p_det_and_time2; /* the second detector and detection time */
      SkyPosition    *p_source;        /* source Equatorial location
                                        * (lon=RA, lat=dec) in decimal
                                        * radians */ 
    }
    TwoDetsTimeAndASource;    
    
    
  • vdboor (unregistered) in reply to icelava
    icelava:
    Alex Papadimoulis:
    Must be before the Outlook days. Or most probably in a Unix environment (poor thing).

    Before the outlook days? Every SMTP server in the world requires you to tell them what your own e-mail address is.

  • codeJunky (unregistered) in reply to vdboor

    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.

  • codeJunky (unregistered) in reply to Kippesoep

    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.

Leave a comment on “theInfamousI and The Responsible Guy”

Log In or post as a guest

Replying to comment #:

« Return to Article