It's probably not flat.



  • (In response to, “What sort of platform am I running on?”)

    Any comments outside method bodies are mine.

    isWindows = System.getProperty("os.name").contains("Windows");

    public static boolean isWindows() {
    if (System.getProperty("os.name").contains("Windows")) {
    return true;
    }
    return false;
    }

    public static boolean isOSX() {
    if (System.getProperty("os.name").contains("Mac")) {
    return true;
    }
    return false;
    }

    if(System.getProperty("os.name").toLowerCase().contains("mac")) {
    // ...
    }

    private boolean isMacOs() {
    return System.getProperty("os.name").toLowerCase().equals("mac os x");
    }

    if (System.getProperty("os.name").equals("Linux")) {
    // ...
    }

    // Yes, this is the entirety of the method (although I did rename it).
    public SomethingSomethingSimulator() {
    isWindows = System.getProperty("os.name").contains("Windows");
    }

    /*

    • Yeah, sure, “to avoid confusion”. And since when is Unicode

    • handling faulty under XP? Incomplete character sets, perhaps, but nothing

    • particularly faulty...
      */
      private boolean isFaultyUnicodeOS(){
      String osName= System.getProperty("os.name");
      String [] faultyOSForUnicode = {"XP"};

      for(int i=0; i <faultyOSForUnicode.length; i++){
      //in order to avoid confusion for case change both of them to upper
      if(osName.toUpperCase().contains(faultyOSForUnicode[i].toUpperCase())){
      return true;
      }
      }
      return false;
      }

    if(System.getProperty("os.name").contains("win")) {
    // ...
    } else {
    // ...
    }

    /*

    • “YElevation” is some reference to text rendering. The constants 1
    • and 4 appear here exactly as in the source, free of context or meaning.
      */
      private int getYElevation() {
      String osName = System.getProperty("os.name");
      if (osName.toLowerCase().contains("mac")) {
      return 1;
      } else {
      return 4;
      }
      }

    These are scattered all throughout the codebase, although they're most commonly found in the GUI code. The first example is by far the most common, occuring dozens of times. The second and third are close behind, appearing at least half-a-dozen times each, not always hand-in-hand, and with varying declarations; most aren't static and a few are private.



  •  @Mr. DOS said:

     Filed under: write-once-run-nowhere

    Or more likely: write everywhere, right nowhere?



  • @airdrik said:

    Or more likely: write everywhere, right nowhere?
    My new favourite quote. Thanks.



  • @airdrik said:

    Or more likely: write everywhere, right nowhere?

    +1




  • Mr. DOS, you [url=http://forums.thedailywtf.com/forums/p/26206/293778.aspx#293778]also[/url] have a jpeg artifact avatar? Awesome!


    ~*~*~*~*~

    ~~~~~

    :D



  • Ranked by JPEG compression settings, Mr DOS comes way out on top.



  • @Xyro said:

    Mr. DOS, you also have a jpeg artifact avatar?

    Yes, and based on the last-modified timestamp, I've had it for longer than you ;P Great minds and all that, I suppose.

    Yours turned out better than mine did, though – I was too subtle (for once).



  • @blakeyrat said:

    Ranked by JPEG compression settings, Mr DOS comes way out on top.
     

    He's a pussy and was afraid of sliding it all the way to 0.



  • @dhromed said:

    @blakeyrat said:

    Ranked by JPEG compression settings, Mr DOS comes way out on top.
     

    He's a pussy and was afraid of sliding it all the way to 0.

    A black pussy at night, presumably.



  • @Ibix said:

    A black pussy at night, presumably.

    What is yours? From here it looks a bit like a chocolate labrador with a mohawk ponytail

     



  • @ASheridan said:

    What is yours? From here it looks a bit like a chocolate labrador with a mohawk ponytail
     

    It's either the rear end of some squirrel/primate thing at the moment it walks out of the picture, or a goat with flamboyant headgear.



  • Some end-of-level guardian with massive bingo wings swinging a scimitar?



  • @ASheridan said:

    @Ibix said:
    A black pussy at night, presumably.

    What is yours? From here it looks a bit like a chocolate labrador with a mohawk ponytail

    I always just figured he didn't know how to spell:

     


  • @boomzilla said:

    I always just figured he didn't know how to spell:

     

     

    Ahh, and the horn has been inverted.

     



  • @Mr. DOS said:

    Yes, and based on the last-modified timestamp, I've had it for longer than you ;P Great minds and all that, I suppose.

    Great minds!! HIGH FIVE!

    What a strange timestamp format. It appears to be tenths of microseconds since 0001-01-01 00:00:00 ..? Am I calculating that correctly? That's pretty weird. (If my calculations are correct, CS is TRWTF.)

    That timestamp format has the distinction of not only being inane and impossibly precise, but to also take up more space than a human-readable and computer-sortable YYYYMMDDhhmmssZZZ format. It is probably the worst possible choice to use, therefore making the best possible choice for CS!

    @Mr. DOS said:

    Yours turned out better than mine did, though – I was too subtle (for once).

    I saved it as a jpeg at a high compression, and then saved THAT as a jpeg at a high compression!



  • @Xyro said:

    I saved it as a jpeg at a high compression, and then saved THAT as a jpeg at a high compression!
     

    TRANSCODING! ta na na na na TRANSCODING!



  • @Xyro said:

    I saved it as a jpeg at a high compression, and then saved THAT as a jpeg at a high compression!
     

    Beats recording a screen cap of yourself saving it as high compression then snapshotting that, I suppose...



  • @boomzilla said:

    @ASheridan said:
    What is yours? From here it looks a bit like a chocolate labrador with a mohawk ponytail

    I always just figured he didn't know how to spell:

     

    Spot on. The mis-spelling is deliberately perpetuated now - it once was accidental. It's not the most exciting of stories.

    I can't find the source image right now, but it was not edited apart from the obvious. I think it has its head tipped a little away from the camera, so you can only see one horn near the skull, but two partially overlapped up top. Hence the appearing-to-get-wider thing.


Log in to reply
 

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