• (cs) in reply to Pointy Haired Manager
    Anonymous:

    We are all aware that written requirements that are agreed to and signed off act to keep a project on time and under budget but, dammit, we're already behind schedule and we're bleeding money.

    I'd like to see you produce some evidence of that...

  • Miral (unregistered) in reply to IceBox13
    IceBox13:
    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.

    It's a possibility.  Alex's post doesn't give any indication as to the timeframe of the de-hiring.  This would definitely warrant it.


    Except that if he were fired because of this code, then they probably would have known about it and removed it before the app server ran out of disk space.  (I thought it was fairly clear from the post that the de-hiring was prior to the crash, at least.)
  • (cs) in reply to Miral
    Anonymous:
    IceBox13:
    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.

    It's a possibility.  Alex's post doesn't give any indication as to the timeframe of the de-hiring.  This would definitely warrant it.


    Except that if he were fired because of this code, then they probably would have known about it and removed it before the app server ran out of disk space.  (I thought it was fairly clear from the post that the de-hiring was prior to the crash, at least.)

    Aren't lots of major improbabilities involved with everything we ever see on this site?

  • (cs) in reply to RiX0R
    RiX0R:
    Anonymous:

    We are all aware that written requirements that are agreed to and signed off act to keep a project on time and under budget but, dammit, we're already behind schedule and we're bleeding money.

    I'd like to see you produce some evidence of that...



    Scope creep?
    If its agreed to and signed off, no one can say 'oh, but what i really meant when i said...'
    because u can turn around and reply 'piss off, this is the spec.'

  • (cs) in reply to WTFer
    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.


    he dehired himself?
  • (cs) in reply to nickf

    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.

  • (cs) in reply to anon1

    No.. actually the "de-hired" man with his atitude was a "drag queen" ...

    LOL :)

     

    Anonymous:
    Anonymous:
    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.

    I don't mean to point out gramatical errors, but "dragged himself out of bed"?  Was it just me or did anyone else have a problem reading this first set of sentences with the combination of poor quoting and then the made word?

    Actually "dragged" is correct.

    http://dictionary.reference.com/search?q=dragged

     

  • (cs) in reply to nickf

    Don't do that! You need to use newline... \n

    That way you make very long lines... word wrap is very time consuming on the Notepad!

    You should "stick" (with) the original code ;)

     

    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.

  • (cs) in reply to Pointy Haired Manager
    Anonymous:

    DiamondDave:
    whatever happened to code reviews?

    Yes, I know that solid engineering practices like code reviews actually shorten the development cycle but we don't have time for them, dammit!!!

    I am fully aware that quality is free but we can't afford to implement that now, dammit!!!

    We are all aware that written requirements that are agreed to and signed off act to keep a project on time and under budget but, dammit, we're already behind schedule and we're bleeding money.

    Dammit, man!  Why can't you come up with a suggestion that would actually help us?  Dammit!!


    <font size="6"> W</font>ell, what about having the engineers create and run unit tests before merging into the next version and sending it to the testers?

    What!  We don't have time for that.  We aren't in school anymore.  Damn!   Damn!  Damn!  If this project doesn't turn around I won't get my executive bonus this year.

  • (cs) in reply to nickf
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.

    He certainly wasn't concerned with anyone spotting the multi-page string costant composed of ****s.
  • (cs) in reply to nickf
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.


    StringBuilder, StringBuilder...

    Or even just

    String myGodItsFullOfStars = "*";
    for (i = 1; i <= 14; i++) { // 16K is 2**14
        myGodItsFullOfStars += myGodItsFullOfStars;
    }

  • (cs) in reply to Maurits
    Maurits:
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.


    StringBuilder, StringBuilder...

    Or even just

    String myGodItsFullOfStars = "*";
    for (i = 1; i <= 14; i++) { // 16K is 2**14
        myGodItsFullOfStars += myGodItsFullOfStars;
    }


    I love how everyone is trying to improve this trash. I just love TDWTF.
  • (cs) in reply to TankerJoe
    TankerJoe:
    Volmarias:
    Oh, you're fucking shitting me. It replaces the goddamned emoticon with HTML that DOESN'T EVEN WORK BECAUSE THE SERVER ESCAPES IT


    That's because god hates people who use emoticons.


    God hates also your football team and wants mine to win.
  • (cs) in reply to Pointy Haired Manager
    Anonymous:

    DiamondDave:
    whatever happened to code reviews?

    Yes, I know that solid engineering practices like code reviews actually shorten the development cycle but we don't have time for them, dammit!!!

    I am fully aware that quality is free but we can't afford to implement that now, dammit!!!

    We are all aware that written requirements that are agreed to and signed off act to keep a project on time and under budget but, dammit, we're already behind schedule and we're bleeding money.

    Dammit, man!  Why can't you come up with a suggestion that would actually help us?  Dammit!!



    Dammit Jim, I'm a doctor, not a code monkey!
  • (cs) in reply to Maurits

    ok, that's actually faster...  but the longass for loop (first response) is more wtf... the code he had in the first place is FASTER (for loops!). So, somehow, in his retarded head, he managed to optimize (partially) completely wtf worthy code... www.WTF.com.... or should I say www.thedailyWTF.com!

  • (cs) in reply to Andir
    Anonymous:
    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.

    I don't mean to point out gramatical errors, but "dragged himself out of bed"?  Was it just me or did anyone else have a problem reading this first set of sentences with the combination of poor quoting and then the made word?

    Would you prefer 'drug himself out of bed?'

  • (cs) in reply to nickf
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }


    You mean because that way, he could have wasted CPU time as well as diskspace?
    The code above does a total of about 256MB of temporary storage allocation - lots of work for the garbage collector. I don't think there even is a CPU that could do it within a second...
  • (cs)

    As usual, every one is bashing. But... if the requirement was to be 100% sure that the log is written, how would you do? Suppose this is java and the logging API was used. There is no flush() method in the Logger class. No flush() call is done by the standard StreamHandler class. Yes you could write your own handler but maybe it was not an option. Seems the logger/handler was part of a framework and  there is probably no way to access it. So I ask you: how would you do?

  • Robert (unregistered) in reply to trollable

    If it required a hack even a fraction as bad as that, live with it and mark the issue as unfixable, if the library couldn't be switched for something else or extended. And make sure that whoever decides what libraries to use actually evalulates them properly in future.

  • Nand (unregistered) in reply to trollable
    trollable:
    As usual, every one is bashing. But... if the requirement was to be 100% sure that the log is written, how would you do? Suppose this is java and the logging API was used. There is no flush() method in the Logger class. No flush() call is done by the standard StreamHandler class. Yes you could write your own handler but maybe it was not an option. Seems the logger/handler was part of a framework and  there is probably no way to access it. So I ask you: how would you do?


    Ok, I've never used the Logger API, and just took a 15 second look at the JavaDoc page, and the solution is obvious to me.

    There is no flush() in the logger class because it doesn't WRITE any logs, it only passes messages to the apropriate HANDLER. The Handler interface specifies a flush method.

    Logger.getHandlers() gives you an array of all the installed handlers, and you can just call flush on them. Or write your own MyAlwaysFlushingHandler, extend StreamHandler and add a flush() call in the publish() function.


  • mema (unregistered) in reply to Nand

    The loop doesn't use massive cpu - you do it once at class load time.

  • (cs) in reply to mema
    Anonymous:
    The loop doesn't use massive cpu - you do it once at class load time.


    The String variable in that code snippet was not declared static or final, so it doesn't look like that. From the "sabotage" point of view, doing it every time is certainly better - unless it leads to a too-early discovery. It's a tradeoff.
  • (cs) in reply to XoK
    XoK:

    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }

    maybe he was concerned about the memory use of using a variable instead of a constant.

    Don't do that! You need to use newline... \n

    That way you make very long lines... word wrap is very time consuming on the Notepad!

    You should "stick" (with) the original code ;)



    Well of course, that is why the original was a constant string.   Even if they guy knew about for loops (which judging by thedailywtf is about 50% chance), there isn't a chance that he also knew about modular arithmetic.   Thus he couldn't get the newlines in anyway without the hardcoded string.
  • (cs) in reply to brazzy
    brazzy:
    Anonymous:
    The loop doesn't use massive cpu - you do it once at class load time.


    The String variable in that code snippet was not declared static or final, so it doesn't look like that. From the "sabotage" point of view, doing it every time is certainly better - unless it leads to a too-early discovery. It's a tradeoff.


    Maybe he is using a singleton pattern, so that even though the String is not static or final, he knows it is only initialized once.  :)
  • (cs) in reply to brazzy
    brazzy:
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }


    You mean because that way, he could have wasted CPU time as well as diskspace?
    The code above does a total of about 256MB of temporary storage allocation - lots of work for the garbage collector. I don't think there even is a CPU that could do it within a second...

    Erm... even python code does that pretty much instantly and without noticeable memory consumption (CPU takes a hit though).

  • myside (unregistered) in reply to skicow

    ok, that's funny.

  • (cs) in reply to masklinn
    masklinn:
    brazzy:
    nickf:
    oh dammit, someone beat me to that joke... hiding away there on the second page...

    anyway, aside from all the WTF's about why you'd do this, there's a parallel WTF of why he didn't use:

    String mySabotageAttempt = "";
    for (i = 0; i < 16384; i++) {
        mySaboutageAttempt += "*";
    }


    You mean because that way, he could have wasted CPU time as well as diskspace?
    The code above does a total of about 256MB of temporary storage allocation - lots of work for the garbage collector. I don't think there even is a CPU that could do it within a second...

    Erm... even python code does that pretty much instantly and without noticeable memory consumption (CPU takes a hit though).



    We can still pessimize it further...

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

  • (cs) in reply to RevMike
    RevMike:
    brazzy:
    Anonymous:
    The loop doesn't use massive cpu - you do it once at class load time.


    The String variable in that code snippet was not declared static or final, so it doesn't look like that. From the "sabotage" point of view, doing it every time is certainly better - unless it leads to a too-early discovery. It's a tradeoff.


    Maybe he is using a singleton pattern, so that even though the String is not static or final, he knows it is only initialized once.  :)


    I have an even better idea...

    Instead of loading the class and instantiating the object from scratch, we could load a serialized version!
  • (cs) in reply to trollable
    trollable:
    As usual, every one is bashing.

    And with good reason.
    trollable:
    But... if the requirement was to be 100% sure that the log is written, how would you do?


    Are you trying to say that under some set of circumstances, you would actually contemplate writing 16K worth of *'s to a log in order to flush it?????

  • (cs) in reply to Nand
    Anonymous:
    trollable:
    As usual, every one is bashing. But... if the requirement was to be 100% sure that the log is written, how would you do? Suppose this is java and the logging API was used. There is no flush() method in the Logger class. No flush() call is done by the standard StreamHandler class. Yes you could write your own handler but maybe it was not an option. Seems the logger/handler was part of a framework and  there is probably no way to access it. So I ask you: how would you do?
    Ok, I've never used the Logger API, and just took a 15 second look at the JavaDoc page, and the solution is obvious to me.

    There is no flush() in the logger class because it doesn't WRITE any logs, it only passes messages to the apropriate HANDLER. The Handler interface specifies a flush method.

    Logger.getHandlers() gives you an array of all the installed handlers, and you can just call flush on them. Or write your own MyAlwaysFlushingHandler, extend StreamHandler and add a flush() call in the publish() function.
    Hmm.  Actually solving the problem?  Is that allowed, when you can merely address the symptom, instead?

    1) Write each second's log entry to a new SQL Table.  (Hey - it'll get noticed sooner, and it doubles up the WTF!)
    2) Use REs in post-processing to eliminate the waste ... s/*//g
  • (cs) in reply to masklinn
    masklinn:
    brazzy:
    You mean because that way, he could have wasted CPU time as well as diskspace?
    The code above does a total of about 256MB of temporary storage allocation - lots of work for the garbage collector. I don't think there even is a CPU that could do it within a second...

    Erm... even python code does that pretty much instantly and without noticeable memory consumption (CPU takes a hit though).


    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)...
  • (cs) in reply to RevMike
    RevMike:

    We can still pessimize it further...

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


    Doesn't make any difference, since the length field is simply an int constant set when the String is created.
  • bob (unregistered)

    I can do it in half the number of lines.

    But I suspect he might have been testing what happens when the log overflows, or maybe someone told him that writing in 16k blocks "is faster"?

  • (cs) in reply to Xepol

    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.

    I struggled mightily with the urge to sabotage.  The two reasons why I didn't were that I'm basically a good person, and that I would need references from my former boss and coworkers.

    I don't mean to point out gramatical errors, but "dragged himself out of bed"?

    Well, if he had "drugged" himself, it would more likely be into bed.

  • Anonymous (unregistered) in reply to brazzy

    The forum software seems to have chopped of the

    <FONT face="Courier New">String mySaboutageAttempt = "";</FONT>

    somewhere earlier in this code..

     

  • Anonymous (unregistered) in reply to brazzy

    brazzy:
    RevMike:

    We can still pessimize it further...

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


    Doesn't make any difference, since the length field is simply an int constant set when the String is created.

    (Sorry, trying again)

    The forum software seems to have chopped of the

    <FONT face="Courier New">String mySaboutageAttempt = "";</FONT>

    somewhere earlier in this code..

  • (cs) in reply to brazzy
    brazzy:
    masklinn:
    brazzy:
    You mean because that way, he could have wasted CPU time as well as diskspace?
    The code above does a total of about 256MB of temporary storage allocation - lots of work for the garbage collector. I don't think there even is a CPU that could do it within a second...

    Erm... even python code does that pretty much instantly and without noticeable memory consumption (CPU takes a hit though).


    Not sure how python Strings work

    Python strings are immutable objects.

    brazzy:
    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.

    No shit sherlock?

    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?
  • (cs) in reply to brazzy
    brazzy:
    RevMike:

    We can still pessimize it further...

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


    Doesn't make any difference, since the length field is simply an int constant set when the String is created.


    It isn't like using strlen() in C, but it isn't trivial...

    My method involves the following... (assuming mySabotageAttempt reference is in local variable 1)
    aload_1
    invokevirtual java/lang/String/length()I
    bipush 16384
    if_cmplt  ...

    The other method involves only this... (assuming the loop count is in local variable 1)
    iload_1
    bipush 16384
    if_cmplt ...
    ... iinc 1 1

  • (cs) in reply to RevMike
    RevMike:
    brazzy:
    RevMike:

    We can still pessimize it further...

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


    Doesn't make any difference, since the length field is simply an int constant set when the String is created.


    It isn't like using strlen() in C, but it isn't trivial...

    My method involves the following... (assuming mySabotageAttempt reference is in local variable 1)
    aload_1
    invokevirtual java/lang/String/length()I
    bipush 16384
    if_cmplt  ...

    The other method involves only this... (assuming the loop count is in local variable 1)
    iload_1
    bipush 16384
    if_cmplt ...
    ... iinc 1 1



    I'm wrong - it is trivial.  I guess it had to happen eventually :)

    C:\Documents and Settings\Mike\My Documents\code\test>java -classpath . Test
    Using String  elapsed: 1672
    Using default StringBuffer  elapsed: 0
    Using presized StringBuffer  elapsed: 0
    Using String and String.length()  elapsed: 1703

    import java.io.*;

    public class Test {
        public static void main(String[] args) throws Exception {
            long startTime;
            long endTime;

            String mySabotageAttempt;

            {
                System.out.print("Using String ");
                startTime = System.currentTimeMillis();
                mySabotageAttempt = "";
                for(int i = 0; i < 16384; i++) {
                    mySabotageAttempt += "*";
                }
                endTime = System.currentTimeMillis();
                System.out.println(" elapsed: " + (endTime - startTime));
            }

            {
                System.out.print("Using default StringBuffer ");
                startTime = System.currentTimeMillis();
                StringBuffer mySabotageAttemptBuffer = new StringBuffer();
                for(int i = 0; i < 16384; i++) {
                    mySabotageAttemptBuffer.append("*");
                }
                mySabotageAttempt = mySabotageAttemptBuffer.toString();
                endTime = System.currentTimeMillis();
                System.out.println(" elapsed: " + (endTime - startTime));
            }
           
            {
                System.out.print("Using presized StringBuffer ");
                startTime = System.currentTimeMillis();
                StringBuffer mySabotageAttemptBuffer = new StringBuffer(16384);
                for(int i = 0; i < 16384; i++) {
                    mySabotageAttemptBuffer.append("*");
                }
                mySabotageAttempt = mySabotageAttemptBuffer.toString();
                endTime = System.currentTimeMillis();
                System.out.println(" elapsed: " + (endTime - startTime));
            }

            {
                System.out.print("Using String and String.length() ");
                startTime = System.currentTimeMillis();
                mySabotageAttempt = "";
                while ( mySabotageAttempt.length() < 16384 ) {
                    mySabotageAttempt += "*";
                }
                endTime = System.currentTimeMillis();
                System.out.println(" elapsed: " + (endTime - startTime));
            }
        }
    }


  • (cs) in reply to masklinn
    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.
  • (cs) in reply to RevMike
    RevMike:
    I'm wrong - it is trivial.  I guess it had to happen eventually :)

    C:\Documents and Settings\Mike\My Documents\code\test>java -classpath . Test
    Using String  elapsed: 1672
    Using default StringBuffer  elapsed: 0
    Using presized StringBuffer  elapsed: 0
    Using String and String.length()  elapsed: 1703


    Yay for inlining JIT compilers!

  • Silex (unregistered) in reply to brazzy

    Well, doesn't the String class have a constructor where you pass a char and an int ?
    I mean, in C++ you'd do smth like :

    std::string filler('*', 16384); // maybe the args are in another order

    Would seem weird that Java doesn't have something similar.

  • (cs) in reply to kipthegreat
    kipthegreat:
    At the two companies I've worked for, VPN access could get you to a Remote Desktop or VNC seesion on your PC at the office, where you could then do anything you could normally do while sitting in front of it.

    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.

    uh, first off, ya, VPN might get you to remote desktop, but when the drive and the ram is full and you can't even log into the server, even getting network access from another server to delete a file is an impressive feat.

    secondly "bob" was meant to represent the de-hiree, not the guy who responded to the disaster.

  • (cs) in reply to Andir
    Anonymous:
    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.

    I don't mean to point out gramatical errors, but "dragged himself out of bed"?  Was it just me or did anyone else have a problem reading this first set of sentences with the combination of poor quoting and then the made word?

    Just you.

  • (cs) in reply to Xepol

    This system truely hates IE 7, gotta love that embeded HTML instead of quotes - you would almost expect more out of an ASP.NET app huh?

  • (cs) in reply to kipthegreat
    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.
  • (cs) in reply to whoisfred
    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.
  • Stack Overflow (unregistered) in reply to RevMike
    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!
  • (cs) in reply to brazzy

    <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>

  • (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.

Leave a comment on “Logged to Death”

Log In or post as a guest

Replying to comment #:

« Return to Article