The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

throw new notCoolException()

Last post 07-24-2008 5:48 PM by danixdefcon5. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-24-2008 11:32 AM

    throw new notCoolException()

     I think this might qualify as a representative line, though I don't know what the rest of the source is like...

     

    if (booTbl[2]) if (booTbl[1]) if (booTbl[0]) if (!s.contains(arg[0].charAt(0))) if (!s.contains(arg[0].charAt(1))) if (!s.contains(arg[0].charAt(2))) if (!s.contains(arg[0].charAt(3))) return false; else return true; else return true; else return true; else return true; else if (!s.contains(arg[1].charAt(0))) if (!s.contains(arg[1].charAt(1))) if (!s.contains(arg[1].charAt(2))) if (!s.contains(arg[1].charAt(3))) return false; else return true; else return true; else return true; else return true; else if (!s.contains(arg[2].charAt(0))) if (!s.contains(arg[2].charAt(1))) if (!s.contains(arg[2].charAt(2))) if (!s.contains(arg[2].charAt(3))) return false; else return true; else return true; else return true; else return true; else throw new notCoolException();

    Line 35 of my main method.

    It's supposed to check the boolean array (booTbl) to see which argument (args[) should be used.

    if boo2 is true, it checks the next boo else crash
    if boo1 is true, it checks the next boo else use arg2
    if boo0 is true, it chooses arg0 else use arg1

    returns true if any of the first 4 characters in the arg are in s.

    notCoolException() is an exception made for this program.

  • 07-24-2008 11:37 AM In reply to

    Re: throw new notCoolException()

    right click > format code

    Solved!

    Or was that right click > shoot original developer in the head?

    I guess I'm back.

    Please continue to spam the addresses below.

    PLEASE SPAM:
    jtobin@ohioinstituteofhealthcareers.edu
    jtobin@ohiobusinesscollege.edu
  • 07-24-2008 12:16 PM In reply to

    Re: throw new notCoolException()

    throw new BrainParserException("EEEEEEK!");

    Is this an entry for some new Java Obfuscated Code Contest?

  • 07-24-2008 2:01 PM In reply to

    • Vechni
    • Top 500 Contributor
    • Joined on 09-12-2007
    • Baltimore, MD
    • Posts 116

    Re: throw new notCoolException()

     not cool d00d, not cool

  • 07-24-2008 2:03 PM In reply to

    • emurphy
    • Top 50 Contributor
    • Joined on 01-14-2005
    • Granada Hills, CA
    • Posts 433

    Re: throw new notCoolException()

                    arg_num = 0;
    if (!booTbl[0]) arg_num = 1;
    if (!booTbl[1]) arg_num = 2;
    if (!booTbl[2]) throw new notCoolException();
    
    for (char_num = 0; char_num < 4; ++char_num) {
      if (s.contains(arg[arg_num].charAt(char_num))) return true;
    }
    
    return false;
    

    Of course, refactoring the syntax merely reveals the inherent weirdness of the logic. Smells like the program is re-inventing flag-parsing logic in a non-generalized form.

  • 07-24-2008 2:03 PM In reply to

    Re: throw new notCoolException()

    anthetos:
    notCoolException() is an exception made for this program
     

    pls send teh codez. 

    What Would Brian Boitano Do?
  • 07-24-2008 5:48 PM In reply to

    Re: throw new notCoolException()

    cconroy:

    anthetos:
    notCoolException() is an exception made for this program
     

    pls send teh codez. 

    public class notCoolException {

    public notCoolException() {

    super.setMessage("d00000d! This is, like, not c0000l d0000000d!!!!");

    }

Page 1 of 1 (7 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems