//DO NOT CHANGE THIS



  •  I know that browsing forums.sun.com is not quite unlike pointing and laughing at mentally handicapped people, but don't say that this code doesn't make you stare in awe for a second there.

    Yes, this in not in production, not professional in any way, but... wowtf/whytf.



  •  You can never have too many braces }.



  •  TRWTF is that Java doesn't support arrays.

     

     

    Oh... Wait...



  • Psh, you don't know what you're talking about. He's simply optimizing the array structure. Everyone know arrays in Java are slow, so he's unrolling the array.



  •  @toth said:

    Psh, you don't know what you're talking about. He's simply optimizing the array structure. Everyone know arrays in Java are slow, so he's unrolling the array.

    Note that in the WalkTo routine the coder does use both loops and arrays for — something. It's like he just got tired of using them and gave up midway.



  •         <font color="navy">if</font>(newWalkCmdSteps % 1 != 0) 
    newWalkCmdSteps /= 1;

    What the hell damn shitfuck ass is this?  My brain has ceased to process
    information bologna pint zuhaipl34 hslajktn gesticulating?  Does anyone have
    the number for Java?  I need to declare a Jihad.



  • @bstorer said:

            <font color="navy">if</font>(newWalkCmdSteps % 1 != 0) 
    newWalkCmdSteps /= 1;
    What the hell damn shitfuck ass is this?  My brain has ceased to process
    information bologna pint zuhaipl34 hslajktn gesticulating?  Does anyone have
    the number for Java?  I need to declare a Jihad.
    It's a typo, actually.  He was supposd to divide by 1.0.  It's a clever way to convert an int into a double.*



  • @belgariontheking said:

    @bstorer said:

            <font color="navy">if</font>(newWalkCmdSteps % 1 != 0) 
    newWalkCmdSteps /= 1;

    What the hell damn shitfuck ass is this?  My brain has ceased to process
    information bologna pint zuhaipl34 hslajktn gesticulating?  Does anyone have
    the number for Java?  I need to declare a Jihad.
    It's a typo, actually.  He was supposd to divide by 1.0.  It's a clever way to convert an int into a double.*
    No, that's wrong and you're stupid for saying it.  newWalkCmdSteps isn't declared anywhere that I can see in this code, but there are a couple possibilities:

    1. It's an integer type.  In this case, the code does nothing, because newWalkCmdSteps % 1 is always 0.
    2. It's a floating-point type.  In this case, newWalkCmdSteps % 1 is still always zero because x and y are ints, and thus Math.abs returns an integer. Even if this weren't the case, newWalkCmdSteps /= 1; still does nothing because the 1 will be promoted to a floating point.

    As you can see, even if it were supposed to be 1.0, it still would do nothing because it would never reach that code.  And the only possible way to reach that code is if newWalkCmdSteps were a non-integer floating point, and thus wouldn't need to be converted to a double.

    In conclusion, potato hunchback hq489;panh;lk a4wjhl23 hopscotch freedom.



  •  TRWTF is that the Java community was only helping him with his compiler error and not letting him know he broke the 11nth Commandment:

     "Though shalt not write code that even God cannot be bothered to understand, for that is the greatest sin of them all."



  • From one of the responses:

    Solution : In that case, cut and paste the code in a true code editor as Eclipse or NotePad which withdrawing the offending characters.

    Now you know, everyone. Notepad is a "true code editor!" Not a quick-and-dirty piece of crap that only exists for compatibility with ancient DOS text files.



  • @blakeyrat said:

    Notepad is a "true code editor!"
     

    The One True Editor!



  • @bstorer said:

    @belgariontheking said:

    @bstorer said:

            <font color="navy">if</font>(newWalkCmdSteps % 1 != 0) 
    newWalkCmdSteps /= 1;

    What the hell damn shitfuck ass is this?  My brain has ceased to process
    information bologna pint zuhaipl34 hslajktn gesticulating?  Does anyone have
    the number for Java?  I need to declare a Jihad.
    It's a typo, actually.  He was supposd to divide by 1.0.  It's a clever way to convert an int into a double.
    No, that's wrong and you're stupid for saying it.  newWalkCmdSteps isn't declared anywhere that I can see in this code, but there are a couple possibilities:

    1. It's an integer type.  In this case, the code does nothing, because newWalkCmdSteps % 1 is always 0.
    2. It's a floating-point type.  In this case, newWalkCmdSteps % 1 is still always zero because x and y are ints, and thus Math.abs returns an integer. Even if this weren't the case, newWalkCmdSteps /= 1; still does nothing because the 1 will be promoted to a floating point.

    As you can see, even if it were supposed to be 1.0, it still would do nothing because it would never reach that code.  And the only possible way to reach that code is if newWalkCmdSteps were a non-integer floating point, and thus wouldn't need to be converted to a double.

    In conclusion, potato hunchback hq489;panh;lk a4wjhl23 hopscotch freedom.

    You missed the tag: "= may not actually be clever or convert it to double"
    (because obviously it's not clever, it is in fact as stupid as a screen door on a battleship. Because screen doors can't join the Navy.



  • @Eternal Density said:

    Because screen doors can't join the Navy.

    I thought they can, just as long as they don't say they're screen doors. In your backwards country, anyway. Over here, they're allowed to join the navy, marry other doors, and in every way enjoy all the rights of other citizens.



  • @davedavenotdavemaybedave said:

    @Eternal Density said:
    Because screen doors can't join the Navy.

    I thought they can, just as long as they don't say they're screen doors. In your backwards country, anyway. Over here, they're allowed to join the navy, marry other doors, and in every way enjoy all the rights of other citizens.

    What 'forwards' country are you from?

    What's really backwards about my country is that it takes ages for us to get new smartphones. We don't even have the Palm Pre!
    (Not that I want one)



  • @blakeyrat said:

    From one of the responses:

    Solution : In that case, cut and paste the code in a true code editor as Eclipse or NotePad which withdrawing the offending characters.

    Now you know, everyone. Notepad is a "true code editor!" Not a quick-and-dirty piece of crap that only exists for compatibility with ancient DOS text files.

    But Notepad is not compatible with ancient DOS text files. See my signature.



  • @Eternal Density said:

    You missed the tag: "*= may not actually be clever or convert it to double"
    I didn't miss the tag.  But the tag's content is irrelevant.  It's not clever and it's not a way to convert it to a double, but even ignoring all that, the code is still so tremendously shitfucked that it kills brain cells just by looking at it.



  • @davedavenotdavemaybedave said:

    @Eternal Density said:
    Because screen doors can't join the Navy.

    I thought they can, just as long as they don't say they're screen doors. In your backwards country, anyway.

    No, damnit!  Screen doors in the military would destroy unit cohesiveness and esprit de corps.  If I'm pinned down in a foxhole by machine gun fire, I want to know that the guy next to me has my back.  I don't want to have to worry about whether he's about to start slamming in the wind when he should be focused on the mission. @davedavenotdavemaybedave said:
    Over here, they're allowed to join the navy, marry other doors, and in every way enjoy all the rights of other citizens.
    Ugh, disgusting.  Look, I'm a tolerant man, what people choose to do in the privacy of their own jamb is their business.  But do they have to be so in-your-face about their doorness?  What am I supposed to tell my 5-year-old daughter when one of them starts keeping out flies in public?  And what about my rights?  All the time I'm confronted with gentles breeze that they've let through, but if I were to tell them to stop suddenly I'm committing a hate crime.  Where's the justice in that?



  • Meh, screen doors are practically a fad.  A generation or so from now no one will care, and instead our children will be fighting bitter flame wars over the new rebel fashion of door handles on the left of the pull side (because our children will be idiots).



  •  I have no problems with someone's personal lifestyle choices. You know. It's a free country.

     

    I even like this band, The Doors.



  • @Spectre said:

    But Notepad is not compatible with ancient DOS text files. See my signature.
     

    Then there is absolutely nothing Notepad is good for. Seriously, the only reason Microsoft still ships it is:

    1) It's tiny (they actually ship 2-3 copies in different locations)

    2) A lot of shittily-written applications have the path to Notepad hard-coded



  •  And yet, somehow it feels incorrect to use my All Powerful Text Editor for tiny textual things.

    It's kind of like an advanced sticky note, ironic as it may be.



  • @blakeyrat said:

    2) A lot of shittily-written applications have the path to Notepad hard-coded
    This is an excellent reason for Microsoft to keep it.  Can you imagine having to recreate its functionality?  It'd take, what, minutes?



  • @Spectre said:

    But Notepad is not compatible with ancient DOS text files. See my signature.
     

    @Spectre said:

    Filed
    under: CP
    <input name="ctl00$ctl00$bcr$bcr$ctl00$PostList$ctl16$ctl23$ctl01" id="ctl00_ctl00_bcr_bcr_ctl00_PostList_ctl16_ctl23_ctl01_State" value="value:Filed%20under%3A%20%3Ca%20href%3D%22%2Ftags%2FCP%2Fdefault.aspx%22%20rel%3D%22tag%22%3ECP%3C%2Fa%3E" type="hidden">

    Dude, you are going to jail.  Pervert.



  • @blakeyrat said:

    1) It's tiny (they actually ship 2-3 copies in different locations)

    2) A lot of shittily-written applications have the path to Notepad hard-coded

    3 copies? I only know of two, in %windir% and %windir%\system32 — and one of those was [url=http://blogs.msdn.com/b/oldnewthing/archive/2010/01/28/9954432.aspx]removed in Server 2008[/url].



  • @Blakeyrat said:

    (they actually ship 2-3 copies in different locations)

    @Spectre said:

    3 copies? I only know of two,

    Obviously, if I say "two or three" copies, you should reply with, "three copies? I only know of two." You're showing some awesome Slashdot-level pedantry there.



  • @blakeyrat said:

    @Blakeyrat said:
    (they actually ship 2-3 copies in different locations)
    @Spectre said:
    3 copies? I only know of two,
    Obviously, if I say "two or three" copies, you should reply with, "three copies? I only know of two." You're showing some awesome Slashdot-level pedantry there.

    You should reply with "How do they manage to ship -1 copy? Do they uninstall it once during the installation?"



  • @Abdiel said:

    @blakeyrat said:

    @Blakeyrat said:
    (they actually ship 2-3 copies in different locations)
    @Spectre said:
    3 copies? I only know of two,
    Obviously, if I say "two or three" copies, you should reply with, "three copies? I only know of two." You're showing some awesome Slashdot-level pedantry there.

    You should reply with "How do they manage to ship -1 copy? Do they uninstall it once during the installation?"

     

    Only if he's using php or some other dynamically typed language.



  • "The fire catches, and the logs begin to burn." Yeah, that reminds me of hours wasted playing Runescape.

     (I really hope that's not code from the actual game. Eww!)



  • @Arancaytar said:

    "The fire catches, and the logs begin to burn." Yeah, that reminds me of hours wasted playing Runescape.

     (I really hope that's not code from the actual game. Eww!)

    Ha!  I think that IS from RuneScape!



  •  @Xyro said:

    @Arancaytar said:

    "The fire catches, and the logs begin to burn." Yeah, that reminds me of hours wasted playing Runescape.

     (I really hope that's not code from the actual game. Eww!)

    Ha!  I think that IS from RuneScape!

    Yeah, that string is; that's what I meant. What wasn't clear is whether this was actual production code from an actual commercially developed game (aargh!), or a beginning programmer trying to make some kind of clone of it.



  •  I think TRWTF is how he's trying to compile this mess:

     C:\Users\Matthew\Documents\server.main.project12>javac ./skills<font color="darkgreen">/*.java
    </font>

     The directories should be laid out in a tree like 'server/main/project12'.

    And as someone noted above, this is related to RuneScape. It is definitely not production code; it's from a server emulator written by hundreds of 12 year olds.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.