• (disco)

    Well, at least they didn't try checking if the file existed before opening it...

  • (disco)

    BTDT, in Perl. Except it didn't do it for every line, it did it for every field in every line. :facepalm:

  • (disco) in reply to HardwareGeek

    At least they are checking that the monthly backup restores....

  • (disco) in reply to RobyMcAndrew

    They were... now it seems they will use live-data... race for anyone ?

  • (disco)

    TRWTF are Bruno and Ivan.

  • (disco)
               Label5.Text = "Problem while writting to file: " & ex.Message
    

    Funny, I found and fixed some code in my team's code base not too long ago that made the same "writting" misspelling. :trolleybus:

  • (disco)

    I once fixed a program that was writing output to 7 files, but for raisins could only have 5 open at a time, so each write to each file was wrapped with an open/close like that. I rewrote it to make a log of all the records it was reporting on to a set of temp tables, then when it was finished processing, it would open each temp table and write out the data for that table. IIRC it went from 30 minutes to 10--the rest of the time was processing, and overhead due to writing to a not-terribly-fast network share or something.

  • (disco)

    comment.open() comment.writeline("Something witty") comment.flush() comment.dispose() comment.open() comment.writeline("Another witty thing") comment.flush() comment.dispose() comment.open() comment.writeline("Let's bring Discourse to its knees") comment.flush() comment.dispose()

  • (disco)

    Me, I'd go right ahead and schedule the sucker, then sit back and play Pinball Arcade while my PC happily crunched away all by itself. And post my Outlook Calendar time as "Busy Do Not Disturb" .

  • (disco) in reply to BruceW
    BruceW:
    comment.open() comment.writeline("Something witty") comment.flush() comment.dispose() comment.open() comment.writeline("Another witty thing") comment.flush() comment.dispose() comment.open() comment.writeline("Let's bring Discourse to its knees") comment.flush() comment.dispose()

    Error on line 5: Object reference not set to an instance of an object (Did you construct it with New()?)

  • (disco)

    I have run into this anti-pattern in the Enterprise world shockingly often. There are apparently a LOT of people out there who have no understanding of the costs of buffering, spinning objects up, disposing of them, etc. And my solution has always been the same as in the story, nuke the offending code and replace it with a single write to file once the content is done being assembled. :sigh:

  • (disco)

    I don't know a lot about Java, but is FromHtml("#ff3c3c") really the best way to get a color?

  • (disco) in reply to Slapout
    Slapout:
    I don't know a lot about Java, but is FromHtml("#ff3c3c") really the best way to get a color?

    It's unlikely to be Java (as Java's house style is to have methods start with a lower case letter), so that part is pretty unlikely to start with. That said, no, not a good way to get a color anyway.

  • (disco)

    TRWTF: a 40 MB CSV file as a report. I can count the number of humans who have ever actually read over that whole thing on the fingers of one foot. That's not a report, it's a big chunk of wasted storage on the file server.

    Now if they followed up by printing it out, it would at least serve the purpose of killing a few dozen trees, one of which might have grown up to be Hitler.

  • (disco) in reply to S_Christian_Simmons
    S_Christian_Simmons:
    big chunk

    TIL that 40MB is “big”.

  • (disco) in reply to dkf

    Well it depends on context. For a webpage, 40MB is an insanity that we are slowly approaching at a rapid pace. I'd rather be rapidly approaching at a slow pace, though.

  • Aaron (unregistered) in reply to LB_

    40mb is massive for what amounts to a text only filetype. The silly thing is, a 40mb file is tiny for a desktop to process nowadays. My low-end laptop from almost 10 years ago can process that in a minute or two tops. So it's a large file (40 million characters, or ~3-8 million words), but not difficult to read quickly with modern technology.

Leave a comment on “The Monthly Report”

Log In or post as a guest

Replying to comment #:

« Return to Article