• (cs) in reply to Dave
    Anonymous:

    Log...it's big, it's heavy, it's wood. It's better than bad, it's good!

    (Apologies to Ren and Stimpy.)

     

    What rolls with style, alone or with file?
    What rolls like a resource hog?
    It blows up the stack, it's great for a hack,
    It's log, log, log! 

  • (cs) in reply to RevMike
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.
  • (cs) in reply to Schol-R-LEA

    Goddess-damned flaky forum software...

  • (cs) in reply to whoisfred














    You have a good point.  The tunnel effect is pretty cool I think.
  • (cs) in reply to Schol-R-LEA
    Schol-R-LEA:
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.


    This is a highly optimised design!!! (you just have to separate out the arrays fill method because that returns void)

    import java.util.Arrays;
    public class wtfBenchmark {
        public static void main(String[] args) {
            long start = System.currentTimeMillis();
            final int LOG_SIZE = 16384;
            char[] stars = new char[LOG_SIZE];
            Arrays.fill(stars,'*');
            String mySabotageAttempt = new String(stars);
            long stop = System.currentTimeMillis();
            System.out.println ("Arrays Fill Method: "+(stop - start));
        }
    }

  • (cs)

    I thought that nothing on this site would ever really surprise me.

    I was wrong.

  • (cs) in reply to Stack Overflow
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.
  • (cs) in reply to whoisfred
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

  • dave (unregistered) in reply to davesag

    How about 'drugged himself out of bed'? I like that one better.

  • (cs) in reply to iTIE
    iTIE:
    <font size="2">
    brazzy:
    masklinn:
    brazzy:
    It takes my 2GHz Pentium 4 M about 1.6 seconds on Windows  java 1.5.
    Did you remember to discount the VM's startup time?


    Yes:

    public class ConcatenateBenchmark
    {
        public static void main(String[] args)
        {
            long start = System.currentTimeMillis();
            String mySabotageAttempt = "";
            for (int i = 0; i < 16384; i++) {
                mySabotageAttempt += "*";
            }
            System.out.println(System.currentTimeMillis()-start);       
        }
    }

    Feel free to come up with a modified version that also tries to discount JIT startup time; I can assure you that it's a negligible difference. Using the server VM it comes down to 1.4 seconds.

    </font>

    <font size="2">If anyone cares:
    C# under .NET 2.0 cuts that in more than half... 0.671 seconds. Unless my conversion from 100 nanoseconds to seconds is off...

    </font><font size="2">static void Main(string[] args)
    {
            long startTicks = DateTime.Now.Ticks;
          
            Console.WriteLine("Started @: " + startTicks);
          
            string aReallyStupidString = "";
            for (int i = 0; i < 16384; i++)
            {
                aReallyStupidString += "
    ";
            }

            Console.WriteLine(string.Format("Took {0} secs...",    (DateTime.Now.Ticks - startTicks).0000001));
    }
    </font>



    I've been spending some time learning java assembly language, so I decided to analyze what was going on here.  It turns out that every String append causes a new StringBuffer to be created!  In other words, "<font size="2">aReallyStupidString += "
    "</font>" becomes...

    <font size="2">    ; append the ""
        new java/lang/StringBuffer
        dup
        invokespecial java/lang/StringBuffer/<init>()V
        aload 5 ; a ReallyStupidString
        invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
        ldc "
    "
        invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
        invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;</font>

    I reimplmented it as follows, not breaking the paradigm of concatenating strings each time, but caching and reusing the StringBuffer object.

    <font size="2">    ; append the "*"
        aload 7 ; StringBuffer object
        ; initialize the StringBuffer to empty
        sipush 0
        invokevirtual java/lang/StringBuffer/setLength(I)V
        aload 7
        ; now append aReallyStupidString
        aload 5
        invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
        ; and append the
        ldc "
    "

        invokevirtual java/lang/StringBuffer/append(Ljava/lang/String;)Ljava/lang/StringBuffer;
        ; put the result back in aReallyStupidString
        invokevirtual java/lang/StringBuffer/toString()Ljava/lang/String;

        astore 5</font>

    That ran in less than half a second,  instead of 1.6 seconds!

    The WTF is that javac uses a new StringBuffer for every single '+' operation.  Why not use one (or one per thread, or one per class, anything but this).

  • dave (unregistered) in reply to trollable

    Assuming that filling the buffer is a valid solution, how about a string of \0's instead? At least it wouldn't show up in a text viewer (er, I don't think so, anyway). Idea is, pick something a little less annoying, at least. Spaces even. Eesh.

  • (cs) in reply to Schol-R-LEA
    Schol-R-LEA:
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.
    TankerJoe:
    Schol-R-LEA:
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.


    This is a highly optimised design!!! (you just have to separate out the arrays fill method because that returns void)

    import java.util.Arrays;
    public class wtfBenchmark {
        public static void main(String[] args) {
            long start = System.currentTimeMillis();
            final int LOG_SIZE = 16384;
            char[] stars = new char[LOG_SIZE];
            Arrays.fill(stars,'*');
            String mySabotageAttempt = new String(stars);
            long stop = System.currentTimeMillis();
            System.out.println ("Arrays Fill Method: "+(stop - start));
        }
    }

    WHERE IS THE XML ???

  • hynkel (unregistered) in reply to masklinn

    I would've done the logging using JavaScript. Even Ajax perhaps.

  • (cs) in reply to masklinn
    masklinn:
    WHERE IS THE XML ???


    No shit.  He could have just used XML to format the log lines, and wouldn't have needed 16384 *'s.

    vc
  • (cs) in reply to hynkel
    Anonymous:
    I would've done the logging using JavaScript. Even Ajax perhaps.


    I would have created 16384 div elements, and appended those to a document, giving them all a text node to chew on, and filling that text node with, you guessed it, '*'.
  • (cs) in reply to whoisfred

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!

  • (cs) in reply to masklinn

    masklinn:
    Schol-R-LEA:
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.
    TankerJoe:
    Schol-R-LEA:
    RevMike:

    We can still pessimize it further...

    String mySabotageAttempt = "";
    while( mySabotageAttempt.length() < 16384) {
        mySaboutageAttempt += "*";
    }



    Now, now folks, if we're going to horribly abuse things, we should do it in the proper Java fashiom:

    final int LOG_SIZE = 16384;
    String mySabotageAttempt = new String(Arrays.fill(new byte[LOG_SIZE], '*');


    HTH.


    This is a highly optimised design!!! (you just have to separate out the arrays fill method because that returns void)

    import java.util.Arrays;
    public class wtfBenchmark {
        public static void main(String[] args) {
            long start = System.currentTimeMillis();
            final int LOG_SIZE = 16384;
            char[] stars = new char[LOG_SIZE];
            Arrays.fill(stars,'*');
            String mySabotageAttempt = new String(stars);
            long stop = System.currentTimeMillis();
            System.out.println ("Arrays Fill Method: "+(stop - start));
        }
    }

    WHERE IS THE XML ???

    You raise a good point.  I will correct my mistake post haste.

     

    import org.xml.sax.helpers.DefaultHandler;
    import java.util.Arrays;

    public class wtfBenchmarkXML extends DefaultHandler{
        private StringBuffer strBuffer = new StringBuffer();
        public String myFillerCharInStringFormat = null;
        public wtfBenchmarkXML(){
              super();
         }

        public static void main(String[] args)  throws Exception{ //Top Level Exception Handling!!!
            XMLReader xml= XMLReaderFactory.createXMLReader();  // Look MA! XML!
            wtfBenchmarkXML me= new wtfBenchmarkXML(); //This is me, I implement XML.
            xml.setContentHandler(me);  // I handle all of the content
            xml.setErrorHandler(me); // I also handle all of the errors
            FileReader r = new FileReader("myxmlconfigfile.xml");  //maybe this should change to use a command line arg?
            xml.parse(new InputSource(r)); //Finally.... XML!
            long start = System.currentTimeMillis(); // its not fair to time the xml loading so we will just start timing here.
            final int LOG_SIZE = 16384;
            char[] stars = new char[LOG_SIZE];
            Arrays.fill(stars,me.myFillerCharInStringFormat.charAt(0));
            String mySabotageAttempt = new String(stars);
            long stop = System.currentTimeMillis();
            System.out.println ("Arrays Fill Method: "+(stop - start));
        }

        public void startElement (String uri, String name, String qName, Attributes atts) {
             if (name.equalsIgnoreCase("LogFillerChar"){
                  strBuffer = new StringBuffer();
            }
        }

        public void endElement (String uri, String name, String qName){
            if (name.equalsIgnoreCase("LogFillerChar"){
                  myFillerCharInStringFormat =    strBuffer.toString();
            }
        }


        public void characters (char ch[], int start, int length)  {
           strBuffer.append(ch,start,length);
        }
    }

    *******************

    Then... all we need is an XML file named "myxmlconfigfile.xml" with contents like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <LogFillerChar>*</LogFillerChar>

    Viola .... XML.  Any questions?

  • (cs) in reply to TankerJoe
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!
  • (cs) in reply to RevMike
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.
  • (cs) in reply to dhromed
    dhromed:

    It is sort of getting on my nerves, too.


    I tried to quote all 12 of you nitwits, but the forum software choked!  "Non-matching quote blocks in post..."  (I counted the quote blocks and they did, in fact, match.)

    Can't really say I'm surprised.  I am surprised that it successfully dealt with 12 levels of nesting as it is.

  • (cs) in reply to hynkel

    Anonymous:
    I would've done the logging using JavaScript. Even Ajax perhaps.

    Yes, you could eaily do that: http://today.java.net/pub/a/today/2005/12/13/log4ajax.html

     

  • (cs) in reply to brazzy
    brazzy:
    Not sure how python Strings work, but the point is that since Java strings are immutable, for each asterisk, the current string is copied to a new one that is only one character longer. That means the total amount of memory allocated (though not at the same time) and copied is half the square of the final string length plus a bit of object overhead. Since chars are 2 byte, it's 2 * 16K^2 / 2 = 256M.

    It takes my 2GHz Pentium 4 M about 1.6 seconds on Windows  java 1.5. A modern garbage collector obviously helps a lot and 16K isn't all that big but, well, O(n^2) is O(n^2)...


    Python strings are immutable as well (as someone else pointed out).   However python uses reference counting for garbage collection, while Java uses true garbage collection.   In general the Java way is better, but in this once case Python will use much less memory along the way because it will free each string as soon as it is done with it, while Java may keep them all around if the garbage collector doesn't get around to running, even if the garabage collector does run, it will be more memory in use along the way.   If you have less than 256M RAM, python will not hit swap (nor an out of memory error), while there is a tiny tiny chance that Java will.

    Of course this is only a theoretical problem.  
  • (cs) in reply to FredSaw
    FredSaw:

    Xepol:
    Imminent unemployement can make people stupid...

    And being ripped off can make people vengeful.  When I quit my job in Podunkville for the gold-paved streets of Dallas (where I doubled my former income upon being hired), I naively gave the company two weeks notice and requested that my accrued vacation time, two weeks' worth, be included on my final check; I would use it to fund my move and search for work.  I was informed that by resigning, I had forfeited the vacation pay.  I should have taken the two weeks off first, then resigned.  No amount of reasoning or appealing to higher-ups changed this.


    Might be too late now, but check the local employment laws.   In many areas vacation is earned and must be paid out.   When I quit (several jobs ago), my last check was not only for my last two weeks, but also the week vacation that I had earned, but not yet taken. 

    Note that sick leave (often called paid time off) does not follow under the same rules.   However if a company gives only PTO instead of vacation courts of decided that it really is vacation and forced the company to pay off on it.  

    I'm not an expert on employment law.  You might find it worthwhile to become an expert.  Or at least see a lawyer.   Though of course if you go to court over the issue, you loose your former boss as a reference.   (Though most bosses are going to "He worked from date to date, as a title, I'm not allowed to say anything more")

  • (cs) in reply to hank miller
    hank miller:
    brazzy:
    Not sure how python Strings work, but the point is that since Java strings are immutable, for each asterisk, the current string is copied to a new one that is only one character longer. That means the total amount of memory allocated (though not at the same time) and copied is half the square of the final string length plus a bit of object overhead. Since chars are 2 byte, it's 2 * 16K^2 / 2 = 256M.

    It takes my 2GHz Pentium 4 M about 1.6 seconds on Windows  java 1.5. A modern garbage collector obviously helps a lot and 16K isn't all that big but, well, O(n^2) is O(n^2)...


    Python strings are immutable as well (as someone else pointed out).   However python uses reference counting for garbage collection, while Java uses true garbage collection.   In general the Java way is better, but in this once case Python will use much less memory along the way because it will free each string as soon as it is done with it, while Java may keep them all around if the garbage collector doesn't get around to running, even if the garabage collector does run, it will be more memory in use along the way.   If you have less than 256M RAM, python will not hit swap (nor an out of memory error), while there is a tiny tiny chance that Java will.

    Of course this is only a theoretical problem.  


    What is Python's technique for dealing with circular references?  Does Python occassionally do a Mark/Sweep or a Copy collection as well?
  • njkayaker (unregistered) in reply to Pointy Haired Manager

    "Probably because testing consisted of a run over a short timescale, and no one cared if the log was on the order of a megabyte during testing."

    I guess no one (other than the original programmer) looked at the log. Looking at the log would have been a "test" that would have caught this nonsense very early.

  • (cs) in reply to dhromed
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]

  • steampunk (unregistered) in reply to Hugo
    Hugo:

    kipthegreat:
    Also, when he says this was written by a "de-hired" employee, does that mean the guy was told he had two more weeks or whatever, and in that time period he wrote this code?  In that case, this would almost certainly be sabotage.  Or does it mean that the guy wrote this code with no knowledge that he would soon be fired?  Or, third possibility, he was fired, but before passwords were reset he VPN'ed in and did this?

    You forget the fourth possibility - the guy was fired because he wrote this code.



    Meaning they knew this code existed and what it would do, fired him for it, implemented it anyway, then panicked when it broke?  That'd be a WTF all to itself.
  • (cs) in reply to BiggBru
    BiggBru:
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]



    Wierd, sometimes i get the error, sometimes not... i think this is 14.

  • (cs) in reply to TankerJoe
    TankerJoe:
    BiggBru:
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]



    Wierd, sometimes i get the error, sometimes not... i think this is 14.



    WTF... we are at the limit now I think... scroll up and see how the oldest quote entry gets truncated. harmmmf.

  • (cs) in reply to TankerJoe
    TankerJoe:
    TankerJoe:
    BiggBru:
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]



    Wierd, sometimes i get the error, sometimes not... i think this is 14.



    WTF... we are at the limit now I think... scroll up and see how the oldest quote entry gets truncated. harmmmf.



    Hah!  Not a forum limitation after all.  Appears to be a browser (Firefox) limitation.  Happy day, I learned something new.

  • (cs) in reply to TankerJoe
    TankerJoe:
    TankerJoe:
    TankerJoe:
    BiggBru:
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]



    Wierd, sometimes i get the error, sometimes not... i think this is 14.



    WTF... we are at the limit now I think... scroll up and see how the oldest quote entry gets truncated. harmmmf.



    Hah!  Not a forum limitation after all.  Appears to be a browser (Firefox) limitation.  Happy day, I learned something new.

    Do you realize that, after a few quotes, this starts to take the shape of an ancient Aztec step-pyramid?

  • anonymously me (unregistered) in reply to nickf

    How utterly inefficient.

    String bomb = "*";
    while(bomb.length() < 16384) bomb += bomb;

    -Me

  • (cs) in reply to TankerJoe
    TankerJoe:
    TankerJoe:
    BiggBru:
    dhromed:
    RevMike:
    TankerJoe:

    whoisfred:
    whoisfred:
    Anonymous:
    RevMike:
    whoisfred:
    kipthegreat:
    WTFer:
    kipthegreat:
    Richard Nixon:
    kipthegreat:

    As for your "no one but Bob knows how to delete the logs" comment--  It is probably that several developers trade-off "pager duty".. Steve has it this week, Dave next week, etc... Not that "bob" was the only one who was capable of deleting the log files.  He was just the one on call that night.


    I believe you completely misunderstood the point that was being made. Try rereading it a few times.

    Sincerely,
    Richard Nixon


    My bad Mr. President.

    He is not the real president, you know,  he resigned.


    "After a president of the U.S. leaves office, the title "President" continues to be applied to that person the rest of his life."
      -- http://en.wikipedia.org/wiki/President_of_the_United_States

    Although, Dick is no longer alive so.. whatever..


    I just thought this post looked funny with so many nested quotes, so I wanted to add another one.


    It really isn't that funny.  Please stop.


    I totally agree. Enough is enough!


    Sorry, I won't do it agan.


    Oops.
    s/agan/again/

    You just can't help yourself, can you!



    Just cut it out!  All of you!


    It is sort of getting on my nerves, too.

    Wow, I've never seen nested quotes this deep before.

    Anybody else interested in knowing what the limit is to nested quotes?

    I encourage everybody to keep quoting this. Let's call it "WTB Quote Boundary Testing" [:D]



    Wierd, sometimes i get the error, sometimes not... i think this is 14.



    WTF... we are at the limit now I think... scroll up and see how the oldest quote entry gets truncated. harmmmf.



    These posts have disappeared beyond the event horizon and are now collapsed into a singularity of bytecode.
  • (cs) in reply to hank miller
    hank miller:
    Of course this is only a theoretical problem.


    Are you here?
  • (cs)
    BiggBru:

    Do you realize that, after a few quotes, this starts to take the shape of an ancient Aztec step-pyramid?



    The word you're looking for is "ziggurat".


    ok

    dpm

  • Anonymous (unregistered) in reply to trollable

    Usually with a language that supports opening a file for write with the O_SYNC flag ;)  It would also be helpful to make sure that the filesystem supports this too.

    Of course, you ought to ask yourself why it matters that the logs are synced.  If it's in case the machine crashes, then it might be more appropriate to write the logs to another machine (or several).

  • Anonymous (unregistered) in reply to dhromed

    weeeee!

  • (cs) in reply to dpm
    dpm:
    BiggBru:

    Do you realize that, after a few quotes, this starts to take the shape of an ancient Aztec step-pyramid?



    The word you're looking for is "ziggurat".

    ok
    dpm

    Ziggurat? I knew that! [:^)]

  • Jochen (unregistered)

    Too bad... the code snipped above is actually rendered as an
    image, not text. I tried to copy & paste this wonderful piece of
    code to use it in my own logging library, alas... ;-)


  • ISO Snob (unregistered) in reply to haveworld

    A second app made sure the first app was running by reading the log!


  • Immibis (unregistered) in reply to Andir
    Alex Papadimoulis:
    "APPL IS COMPLTLY FRIED," Damien's emergency pager read, "CANT EVEN LOGON TO SRVR!!!" Damien dragged himself out of bed and VPN'ed on in.
    Without turning on the computer?
  • Immibis (unregistered) in reply to anonymously me
    anonymously me:
    How utterly inefficient.

    String bomb = "*"; while(bomb.length() < 16384) bomb += bomb;

    -Me

    That's calling bomb.length() more times than necessary.

    String bomb = "*"; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb; bomb += bomb;

    That should run faster.

Leave a comment on “Logged to Death”

Log In or post as a guest

Replying to comment #:

« Return to Article