• Mr. LOLCAT (unregistered)

    FTFY CONGRATULASHUNS! U HAS CHEEZBURGER

  • Edd (unregistered)

    I have two of those

  • CrashMagnet (unregistered) in reply to Edd

    What about the pepsi pepsi?

  • Quirkafleeg (unregistered)

    I'm more interested in hasing the "asdfghjk" bit...

  • Steve (unregistered)

    And if they went to all the trouble of hitting the middle row of a standard qwerty keyboard, what had the l done to offend them?

    locurlicenseucesss I suspect is the result of a find-and-replace gone wrong, a clbuttic mistake ...

  • Naomi (unregistered)

    Location license success...?

    This might be easier if we know WTF mynum was or $Q was! D:

  • Duston (unregistered)

    Supercalifragilisticexpialidocious.

  • Angela Anuszewski (google)

    I've done that on occasion if it adds to the readability. Sometimes there's code nearby that has similar logic and why make the reader flip their mental state?

  • Naomi (unregistered) in reply to Angela Anuszewski

    I've done it when the expression is more clear in the positive than in the negative. :) There's reasons to break every rule, right?

    if (foo.isExemptFromValidation()) {
        // Nothing to do!
    } else {
        validate(foo);
    }
    
  • mushroom farm (unregistered) in reply to Naomi

    always nice when boolean NOT goes in the "too-hard" bin

  • (nodebb)

    Drunk programming?

  • (nodebb)

    I've done something like this a few times:

    switch (value) { case valueX: case valueY: // these are OK, keep going break; default: // block/validate/whatever }

    Addendum 2020-07-01 12:22: (and yet again I forget how to tag it to preserve line breaks, but anyway you probably get the idea)

  • (nodebb) in reply to CHUDbert

    Drunk programming?

    https://xkcd.com/323/ ?

  • Plant (unregistered) in reply to mushroom farm

    For languages that use an ! instead of having a 'not' keyword, the empty if is more readable.

  • Naomi (unregistered) in reply to mushroom farm

    It can, on occasion, more readable. Or is that "too-hard" to understand?

  • Naomi (unregistered) in reply to emurphy

    and yet again I forget how to tag it to preserve line breaks, but anyway you probably get the idea

    Two spaces at the end of a line preserves the line break, but you can also indent with four spaces for a code block!

    switch (value) {
        case valueX:
        case valueY: // these are OK, keep going
                     break;
        default: // block/validate/whatever
    }
    
  • sizer99 (google) in reply to CHUDbert

    I'm with @CHUDbert, that is a very drunken comment. You can tell because it looks like Perl.

  • The Donald (unregistered)

    Covfefe

  • Functional (unregistered)

    I get real bad without sleep. Real bad. Twitching, distorted vision. Sometimes I just drop, like a light switch going out.

  • Sole Purpose Of Visit (unregistered) in reply to Naomi

    Wrong.

    Consider the semantics. You are presenting two alternatives. One does nothing and has a useless comment, and the other takes an action.

    Not to mention that the "validate" clearly doesn't, which is also terrible semantics. I presume it throws an exception or footles a global flag or something.

    With markdown trepidation …

    if (foo.RequiresValidation().validate()

    This assumes a programming style. Add a lambda for validation and pass it in as a parameter to RequiresValidation, if you like -- which would now be named IsValidated.

    Never write a piece of semantically obscured crap that nobody, including you, will misunderstand in the future.

  • Sole Purpose Of Visit (unregistered) in reply to Sole Purpose Of Visit

    (This assumes a "fluent" programming style. No idea what happened there.)

  • fa (unregistered) in reply to Steve

    It's a cool theory. Could be something as boring as replace "ls" or "liss" with "license", that it said LocUrlSuccess (minus the capitalisation). Any better suggestions?

  • DQ (unregistered) in reply to Sole Purpose Of Visit

    Never write a piece of semantically obscured crap that nobody, including you, will misunderstand in the future.

    If you read that carefully, you know why we get all the crapy code here...

  • (nodebb)

    validate(foo) unless foo.isExemptFromValidation();

  • Wheresthespamohthereitis (unregistered)

    if (!drunk) { drink.add(hardliquor); /* drink.add(mixer); / drink.drink(); / Won't reach: */ sleep(); }

  • Wheresthespamohthereitis (unregistered) in reply to Wheresthespamohthereitis

    That worked nicely, not...

  • Freak (unregistered)

    I've occasionally written stuff as

    if (0) {  
    } else if (...) {  
        // Handle one thing
    } else if (...) {  
        // Handle something else
    }  
    

    Just so I can rearrange the subclauses more easily.

  • (nodebb)

    If you are writing super high performance real-time code, there can be cases where that is a bit faster....

  • (nodebb) in reply to fa

    Yes - I've had this happen (and caught it). Imagine if you will, an integrated development environment (a real stretch for PHP, I know). Now you start typing and the cursor has mysteriously disappeared and reappeared somewhere else. No idea where, but whatever your typed showed up there. Why isn't what I typed showing up? Let me type the alphabet...Nope still not there.
    Hmmmm. code still compiles, let's close and reopen the solution. Ahhh... the keyboard problem is fixed now.

  • Towel (unregistered)

    My friend did this in a project we were working on. I was looking through the code and I found a bunch of if else statements with empty if bodies. I asked him about it and he was just tired though, we've all written silly code when tired

  • Officer Johnny Holzkopf (unregistered) in reply to fa

    LOCURLICENSEUCCESSS = locate / load / localize - current - license - success, or maybe load - curl (the program) - ice - non-standard execution (NSE) - cesspools, or local - URL - list - census - european union (EU)... cesspool. Maybe the first S in SUCCESS said, "I'm not worthy! I'm not worthy!", and moved itself to the end.

  • Future (unregistered)

    This is what happens if you use a language without an unless or guard statement.

Leave a comment on “locurlicenseucesss”

Log In or post as a guest

Replying to comment #:

« Return to Article