• ForFoxSake (unregistered)

    I only encounter and fix 3 of these daily.

  • anonymous (unregistered) in reply to SpewinCoffee
    SpewinCoffee:
    _:
    Kaley who?

    Exactly. And it is a fairly NSFW lookup on Google. Thanks a ton TDWTF, my employer's going to ask why I ran that search at work.

    Thanks, I was about to query that with my manager at my side. You just saved me a lot of embarrasement. Better you than me.

    Nothing personal.

  • (cs)
    An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening.

    WTF?

  • (cs) in reply to Mr. Principal

    this:

    Mr. Principal:
    Mr. Johnson, what you've just written is one of the most insanely idiotic things I have ever read. At no point in your rambling, incoherent story were you even close to anything that could be considered "The Real WTF". Everyone on this site is now dumber for having read it. I award you no points, and may God have mercy on your soul.
  • (cs) in reply to da Doctah
    da Doctah:
    Could have done without The Kaley Cuoco Misdirection, but there's something to be said about a front page story that ends with dog slobber.
    Yeah. It ends with dog slobber. Big fricken whoop.
  • John (unregistered)

    The biggest WTF for me in this was why NOCs decide that only after staring at the same error message for 12 hours can they decide to escalate the issue at 3am with a wake up call.

    I can't count the number of times I groggily was looking through change logs, error logs and random bits of code at 3am, wondering if it was worth it to go 'all in' and have a cup of coffee. Then, the rage I'd feel, knowing the NOC knew of the issue while I (or even better the engineer peacefully sleeping) was at the fricken office or even as I was walking out and saw them in passing.

    "Good night Eric, you're working the night shift now?"

    "Night John, yup, <mumble>I'll talk to you LATER</mumble> <Cackle>"

  • atk (unregistered) in reply to Tasty
    Tasty:
    Wishing Editors Edited:
    Editors: please go take englinsh classes, again. You clearly failed the first time.

    "and it was only a dream" - 3rd grade cop out to telling a good story. Why bother putting it in this article? It doesn't add anything...

    "An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening." - stupid Eric (or editor). Something can be not-an-emergency because there is still time to deal with it yesterday. Or because the degree of badness is not yet understood. Or a million other reasons. Then, today, when badness is better understood, and there is no time to fix before damage happens, yes it is an emergency.

    "However, thanks to a change in the export process" - use of however is distracting and unnecessary. Should not have been inserted.

    "The import was split into three steps. First it loads..." - get your tenses straight. "was split" = past. "loads" = present. be consistent. probably 6th grade stuff, at the latest.

    "while the real work took only four, Eric went further into the code" - consider using words like "delved" instead of "went". Words that provide a more descriptive, more visceral description of the activity, rather than a very bland, passive "went."

    "What he saw was that the time" poor construction and passive, again. "He discovered..." or "He read..." or "He was shocked to see..."

    "rather than measuring the file size, it was measuring the audio size. Which required it to open" - you have not explained the difference between file size and audio size. Why should any reader know what this is? Also, don't start sentences with "which." You're not good enough writers to experiment with poetic license yet. Practice getting the basics solid before you try to do advanced stuff.

    "Given the criticalness of the accuracy of the progress bar" - again, why would accuracy be critical? This has not been identified - or if it has, it's so long ago in a poorly written story that it's forgotten. Also, try "Given the critical customer requirement that the progress bar be accurate..." or "Given the criticality that the progress bar be accurate...". And remember: you're writing for a geek site. Accuracy and correctness are different things. The progress bar was probably sufficiently accurate to a percentage point, but provided incorrect status, unrepresentative of the actual state.

    You never told the reader what the problem was. Was it that the space was running out because the size checking mechanism wasn't working? Was it that there was plenty of space but the server failed to allow uploads? Was it that performance degraded to an unacceptable level? Was it that the president couldn't receive an audio update about the status of his daughter? Why did Eric's change actually matter?

    Before you teach English, you should look up these three words: sarcasm, embellishment, & allusion. They will answer all your invalid points.

    Obvious troll is obvious. Sarcasm, embellishment and allusion have their place, but they need to be done well. That you are unable to tell the difference between good writing and excuses demonstrates that your opinion is of no value in this conversation.

    FOAD. HAND.

  • (cs)

    The "dream" aside, this is exactly what a lot of people face in the middle of the night -- a push to prod on the weekend; crappy code that was added without any business reason for being there.

    The hardest thing I find is to block junior programmers from adding things that are "shiny" when they serve no business need; and could introduce either slowness or bugs.

    As senior people, we need to push back on things that should not be in the product; and teach the younger people how to recognize that which is business-enhancing and what is just "something cool".

    And please, let's push Monday morning, not Friday evening.

  • Anomaly (unregistered)

    TRWTF is Kaley Cuoco.

    Mayim Bialik would have made a much better dream choice. Also to everyone commenting on its WAV not WAVE who cares? When you refer to a wav file you pronounce it wave. Everyone knows what you mean in the context if you spell wave instead of wav, and if you have to nitpick over that why the hell are you even commenting? Get over yourselfs.

    Popular motivational poster: Ride the waves. Dont Make them!

  • Dan (unregistered)

    "Eric altered the progress bar procedure to use the number of chunks in the text file rather than the combined size of the audio chunks as it's metric."

    "it's metric" - so you're saying the progress bar is measured in centimeters, instead of inches?

  • (cs) in reply to Dan
    Dan:
    ...the progress bar is measured in centimeters, instead of inches
    When you measure things in centimeters instead of inches, it sounds as though they're longer. Could be useful for some things...
  • (cs) in reply to Anomaly
    Anomaly:
    Also to everyone commenting on its WAV not WAVE who cares? When you refer to a wav file you pronounce it wave. Everyone knows what you mean in the context if you spell wave instead of wav, and if you have to nitpick over that why the hell are you even commenting?
    Yes this is why everyone writes UNIX as "eunuchs" oh wait no you're just an idiot.
  • shd (unregistered)

    I think the biggest WTF is that opening the files and reading/parsing the WAV header (which is commonly 44 bytes in size, though it can technically be more) for 35 files (assuming the mentioned upper bound of 700MB at 20MB files) would take twice as long as actually handling the files even at 200-byte blocks.

    What is that code doing? Printing out the waveforms, taking a picture of the printout on a wooden tabletop, pasting that in Word, doing image analysis on it and then running an FFT just to determine that yes, it's audio?

  • kyle (unregistered) in reply to drake

    wav files can use gsm compression. Not every wav is PCM (although it is by far the most common)

  • (cs) in reply to Wishing Editors Edited
    Wishing Editors Edited:
    "An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening." - stupid Eric (or editor). Something can be not-an-emergency because there is still time to deal with it yesterday. Or because the degree of badness is not yet understood. Or a million other reasons. Then, today, when badness is better understood, and there is no time to fix before damage happens, yes it is an emergency.

    Does Scotty ask Kirk why they need more power when the engine is already running at 110%? No. He goes in the engine room and DELIVERS MORE POWER. That's what real engineers do.

  • Wishing Editors Edited (unregistered) in reply to Ronald
    Ronald:
    Wishing Editors Edited:
    "An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening." - stupid Eric (or editor). Something can be not-an-emergency because there is still time to deal with it yesterday. Or because the degree of badness is not yet understood. Or a million other reasons. Then, today, when badness is better understood, and there is no time to fix before damage happens, yes it is an emergency.

    Does Scotty ask Kirk why they need more power when the engine is already running at 110%? No. He goes in the engine room and DELIVERS MORE POWER. That's what real engineers do.

    Yes, a real engineer does what the captain needs done. Eric is clearly not a real engineer. Neither is the editor.

  • F***-it Fred (unregistered)

    Wow, I've seen some pretty bad writing on this site, but this is the first article that's actually made me ask WTF? about the article itself rather than the ridiculous scenario being described. Please do us all a favour and give up on writing.

  • gmac (unregistered) in reply to F***-it Fred

    I'd like to hear more about Kaley Cuoco and the chunky progress bar. Such stories would be great opportunity to add multi-media features to the site.

  • (cs) in reply to Ronald
    Ronald:
    Wishing Editors Edited:
    "An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening." - stupid Eric (or editor). Something can be not-an-emergency because there is still time to deal with it yesterday. Or because the degree of badness is not yet understood. Or a million other reasons. Then, today, when badness is better understood, and there is no time to fix before damage happens, yes it is an emergency.

    Does Scotty ask Kirk why they need more power when the engine is already running at 110%? No. He goes in the engine room and DELIVERS MORE POWER. That's what real engineers do.

    No, real engineers explain to the captain why what he is asking is impossible. I rather believe you may be mistaken in believing that Star Trek is real life. It's not. It's fiction. That means it doesn't happen. It's made up. It has no relation to reality. It's a lie. It's false. It's verisimilitude is misleading. Its only purpose is to entertain the mentally substandard.

  • TortoiseWrath (unregistered)

    Dude... Bruce... slow down with your typing there.

  • QJo (unregistered) in reply to n_slash_a
    n_slash_a:
    _:
    Kaley who?
    Kaley Cuoco, the lead actress in The Big Bang Theory, which is an extremely funny show that all of my nerdy and non-nerdy friends love. She was also in the last season of Charmed.

    It used to be funny, but the latest season was a bit lame, particularly the unfunny and tedious episode about Professor Proton. I blame that particular episode on the lack of Amy, who is one of the most successfully funny comic characters in TV at the moment.

  • katastrofa (unregistered) in reply to SpewinCoffee
    SpewinCoffee:
    _:
    Kaley who?

    Exactly. And it is a fairly NSFW lookup on Google. Thanks a ton TDWTF, my employer's going to ask why I ran that search at work.

    You get what you deserve for working for some ultra-conservative women-hating prudes.

  • Richard (unregistered) in reply to herby
    herby:
    Kempeth:
    _:
    Kaley who?
    Cute blonde actress starring in a show which is far worse in its writing than anything the Daily WTF has ever seen. Also you're supposed to start with "knock knock".
    No, it isn't "knock knock" it is:
    for (i = 0; i < 3; i++
        {
        for (j = 0; j < 3; j++)
            sound ("knock ");
        say ("Penny ");
        }
    

    Look, get it right!

    Every time you use a multiline-braceless-for god kills a kitten

  • eVil (unregistered) in reply to Richard
    Richard:
    herby:
    for (i = 0; i < 3; i++
        {
        for (j = 0; j < 3; j++)
            sound ("knock ");
        say ("Penny ");
        }
    

    Look, get it right!

    Every time you use a multiline-braceless-for god kills a kitten

    I think that any sane god would be more concerned about the missing closing parenthesis after the postfix-increment operator on the outer for statement.

    Oh, and the use of postfix-increment rather than prefix-increment, when you have no requirement to retain the prior variables value... gods probably hate that.

  • APedante (unregistered)

    TRWTF is zipping up the WAV(E) files. They don't actually get any smaller when you try that.

  • Richard (unregistered) in reply to eVil

    True we could be facing a universe wide compile time error if that is put into production. Not even a wise and kind try-catch block could save us from damnation

  • (cs)

    OK, so 700MB of PCM WAV files suitable for telephony use is about 2 months' worth of audio.

    I know companies like their IVR menus nowadays, but isn't that a bit overkill?

    Or, were they uploading them as 16 bit 44kHz stereo signals, because EVERYONE has stereo, CD quality telephones nowadays don't they... (Even so, that'd be just over an hour of IVR menus!)

  • Paul Neumann (unregistered)
    neminem:
    (Also by the way, it's Comic-Con, not Comicon.)
    That would certainly explain why Commie-Con was so drab. I just figured everyone was a badly dressed GI Joe...
    Bruce Johnson in Feature Articles:
    When a wave file was imported into the application, it would break the wave file into a large number of 20MB chunks. These chunks were easier to manage (not to mention being able to ZIP up and send around by email, if needed).
    Also, TRWTF (though hard to spot in all the cruft) is that they are using email to transfer large files between their own systems and zipping wav[e] files.
  • ih8u (unregistered) in reply to Wishing Editors Edited
    Wishing Editors Edited:
    Editors: please go take englinsh classes, again. You clearly failed the first time.

    ...

    "while the real work took only four, Eric went further into the code" - consider using words like "delved" instead of "went". Words that provide a more descriptive, more visceral description of the activity, rather than a very bland, passive "went."

    "What he saw was that the time" poor construction and passive, again. "He discovered..." or "He read..." or "He was shocked to see..."

    ...

    Stupid grammar nazis -- TRWTF.

    "Went" is NOT passive. Please be correct when correcting others. Passive verbs act on the subject of the sentence. An example sentence containing a passive verb is, "The user, Wishing Editors Edited, was banned from ever posting anywhere on the Interblag ever again due to his condescending attitude combined with his massive stupidity. Focus on the "was banned" part of that. "Went" can't be passive -- "he was wented?" You were wented.

    The fix? Don't be stupid, or, at least, don't incorrectly correct people.

  • fa2k (unregistered) in reply to B
    B:
    TRWTF is WAV files. It's a phone company recording (presumably) telephone voice prompts or autodialer recordings. 128Kbps MP3 would be overkill and there are speech codecs for VoIP that would reduce these files to trivial sizes.
    Up to a few years ago I'd agree, but it may be premature optimisation now. The only case where it would make a difference is if the WAV data would not fit in the cache of the server, and the MP3 data would. WAV has the advantages that there is no encoding time, it requires simpler libraries, and multiple tracks can be played without interruption (see the horrible MP3 gapless playback business). Phones use various codecs, and it is in general good to avoid double lossy compression, though for a high quality MP3 it may not be a problem. In fact it may be triple compression if the customers create the WAVs via a phone interface. UMTS 3G brought better call quality, and people with headsets may notice a difference (not on straight MP3 128k vs. lossless, but assuming there are additional losses). There may also be patents to worry about, but MP3 is starting to get old so maybe they have expired.
  • (cs) in reply to F***-it Fred
    F***-it Fred:
    Wow, I've seen some pretty bad writing on this site, but this is the first article that's actually made me ask WTF? about the article itself rather than the ridiculous scenario being described. Please do us all a favour and give up on writing.

    It appears that he already had.

  • Niko (unregistered)

    Oh wow, this reminds me of something I should have submitted to TDWTF but never did.

    Way back when ripping DVDs was still something only computer savvy people did (and did by hand with a complicated toolchain), I had a bunch of movie audio tracks I'd extracted and stored as WAV files. Something I always did before encoding them as MP3 and muxing them into an AVI was normalize the volume with a simple peak normalization.

    At home I'd usually do this using the "Normalize" function of my ancient copy of Sound Forge. However I had just gotten a fancy new computer at work (student IT job at school), and I wanted to see how much quicker it could encode the movies.

    Sadly I'd forgotten to bring Sound Forge. No problem, I figured. I'll just download Audacity; it should have a normalize function. And it did...

    From running the process at home, I knew that Sound Forge usually took about 8-10 seconds to normalize a ~120 minute WAV. I figured Audacity would be about the same (or even faster on the new system) -- peak normalization is a pretty simple operation. What I didn't expect was over a minute per file.

    I was dumbfounded how such a simple operation could take so long. Being the inquisitive CS major that I was, I downloaded the source for that version of Audacity and found the normalization function. What it did, in a nutshell was:

    for each block in file
      for each sample in block
        ProcessData(block, sample)
        UpdateProgress(currentSample / totalSamples)
    

    Yes, it updated the GUI progress bar after looking at every sample in the audio track.

    A 120 minute WAV file sampled at 44,100 Hz has 317,520,000 samples. And that's how many times the progress bar was updated to normalize one file.

    I commented out the TrackProgress line, compiled Audacity (which was fun in itself) and ran my normalization again. It took about 8 seconds.

    ...

    The best part is that as I write this I went and grabbed the latest Audacity's source. Normalize.cpp has more than doubled in size since the early 2000's... but GUI progress updates still work the exact same way.

    But hey, computers and GPUs are faster now. Keep calm and progress on!

  • Mr. Bob (unregistered)

    So... the "emergency" in Europe that warranted a night time call to a developer, worth risking a weekend patch on production code was the progress bar being slow to start?

    So the true WTF is giving home phone numbers to their office in Europe?

  • daver (unregistered) in reply to neminem
    neminem:

    (Also by the way, it's Comic-Con, not Comicon.)

    It's Comic-Con for San Diego Comic Con for New York Comicon for Seattle or Kansas City

    There are lots of comic conventions in the world, you know.

  • Skandranon (unregistered) in reply to APedante
    APedante:
    TRWTF is zipping up the WAV(E) files. They don't actually get any smaller when you try that.

    No, I quite distinctly remember being able to attain significant compression ratios on PCM encoded WAV files. Perhaps you are thinking of attempting to ZIP MP3 files, or some other kind of compressed media type.

  • (cs) in reply to daver
    daver:
    neminem:

    (Also by the way, it's Comic-Con, not Comicon.)

    It's Comic-Con for San Diego Comic Con for New York Comicon for Seattle or Kansas City

    There are lots of comic conventions in the world, you know.

    the one here in SD is the only one that matters

  • Vlad Patryshev (unregistered)

    Sorry, took me some time. The "right" (or a "more right") solution would be to look at the data properly. Treat the data fragmentation as a kind of zipper. Each fragment should contain enough metadata in its header. Chunk number, chunk size. This way there will be no need to recalculate the size. Total size, together with some other meta, can be kept in a separate header file.

    That's how people do it.

    Probably in this case it is not that important... but this is the principal solution to the problem.

  • wave files (unregistered)

    ;wave files

  • me (unregistered)

    Good story, awesomely told - good work.

  • Neil (unregistered) in reply to Paul
    Paul:
    Turns out table.count() used a cursor to iterate over all rows and took ages, while the actual work took lightly less than half a second.
    I once used a library which could query SQL Server in either an asynchronous or a synchronous mode. The synchronous mode didn't tell you how many rows there were yet required you to read all of the results synchronously, which obviously was bad for responsiveness, but the queries would execute more quickly; in one case an asynchronous query took 10 minutes to execute but the equivalent query in synchronous mode took under 10 seconds including processing and display of the results.
  • Shinobu (unregistered)

    I still remember when TDWTF was good. ... This article has made me remove TDWTF from my news reader. But it was the trigger, not the cause. To everyone here complaining about the writing I'll just say that there is no point, it won't get better, so why not just go somewhere else? Bye, I had a blast. (If you discount the recent fall in quality.)

  • Wishing Editors Edited (unregistered) in reply to ih8u
    ih8u:
    Wishing Editors Edited:
    Editors: please go take englinsh classes, again. You clearly failed the first time.

    ...

    "while the real work took only four, Eric went further into the code" - consider using words like "delved" instead of "went". Words that provide a more descriptive, more visceral description of the activity, rather than a very bland, passive "went."

    "What he saw was that the time" poor construction and passive, again. "He discovered..." or "He read..." or "He was shocked to see..."

    ...

    Stupid grammar nazis -- TRWTF.

    "Went" is NOT passive. Please be correct when correcting others. Passive verbs act on the subject of the sentence. An example sentence containing a passive verb is, "The user, Wishing Editors Edited, was banned from ever posting anywhere on the Interblag ever again due to his condescending attitude combined with his massive stupidity. Focus on the "was banned" part of that. "Went" can't be passive -- "he was wented?" You were wented.

    The fix? Don't be stupid, or, at least, don't incorrectly correct people.

    Perhaps I erred. However, I am not employed as an editor, and the sentence structure still sucks. As many have pointed out, the editor failed. I, at least, attempted to provide useful feedback, if sarcastic. You... are not.

  • urza9814 (unregistered) in reply to xaade
    xaade:
    dull:
    That was the worst WTF i have seen in ages.

    A boring story about a run of the mill error - then made to try and be interesting by adding a dream......

    Goal is to determine how many segments to process.

    Existing algorithm opens headers of already segmented audio, determines the total size, then divides by segment size to determine how many segments are to be processed.

    Existing algorithm doesn't realize, it already knows how many segments there are.

    WTF?

    Your reading comprehension skills are TRWTF. It's not checking how many segments, it's checking how large those segments are. Say it's got two segments, one that's one minute long, one that's thirty seconds long. The original code would process the first segment, move the progress bar to 66%, then process the second and be done. The new code will process the first segment, move the progress bar to 50%, then process the second and be done.

  • urza9814 (unregistered) in reply to Wishing Editors Edited
    Wishing Editors Edited:
    "The import was split into three steps. First it loads..." - get your tenses straight. "was split" = past. "loads" = present. be consistent. probably 6th grade stuff, at the latest.

    Depends on if split is being used as a verb or adjective. As a verb, the sentence is perfectly correct and would NOT be correct in the present tense -- the splitting of the script was done in the past, and after that splitting it is currently designed such that the first step is to load the data. Wouldn't make much sense to say that the file is currently being split, would it? How could they be running code that is not yet completed?

    But yes, if split was intended as an adjective then it should certainly be in the present tense.

    Wishing Editors Edited:
    "rather than measuring the file size, it was measuring the audio size. Which required it to open" - you have not explained the difference between file size and audio size. Why should any reader know what this is? Also, don't start sentences with "which." You're not good enough writers to experiment with poetic license yet. Practice getting the basics solid before you try to do advanced stuff.

    You think the average TDWTF reader doesn't understand the difference between the number of bytes in a file and the number of seconds of audio those bytes actually encode? This isn't the New York Times; they're not writing for the "Average American" or for high school kids or something. If you don't understand this concept you have no business being in any kind of programming or sysadmin role, which is this site's target audience.

    Wishing Editors Edited:
    "Given the criticalness of the accuracy of the progress bar" - again, why would accuracy be critical? This has not been identified - or if it has, it's so long ago in a poorly written story that it's forgotten.

    Please repair your sarcasm detector; it seems to have malfunctioned. "Why would accuracy be critical" is exactly the point. Also, it's already extremely inaccurate since it ignores 2/3 of the process. And who in the real world would even notice if a progress bar that pops up for one or two seconds is a bit inaccurate?

    Wishing Editors Edited:
    You never told the reader what the problem was. Was it that the space was running out because the size checking mechanism wasn't working? Was it that there was plenty of space but the server failed to allow uploads? Was it that performance degraded to an unacceptable level? Was it that the president couldn't receive an audio update about the status of his daughter? Why did Eric's change actually matter?

    What? The problem was that the process was taking 1200% as long as it should have, which presumably resulted in a large backlog of files to be processed. Seemed clear enough to me...

  • The Big Picture Thinker (unregistered)
    Looking a little further into the code, he discovered that the updates to the progress bar were being made with ever 200B read from the file. By increasing that to 4MB he cut another 3 seconds off the process.

    Since file reads are usually already buffered at 4096 bytes, this change would really do absolutely nothing.

  • Anonymous (unregistered)

    I thought that the dream build up was very well written, Bruce. But now it's been done! You will need new tricks! >:(

  • Cunso (unregistered) in reply to Niko
    Niko:
    Oh wow, this reminds me of something I should have submitted to TDWTF but never did.

    ...

    How telling is it that this side story was much better and more fulfilling than the original article?

  • Len (unregistered)

    That was creepy and weird.

Leave a comment on “The Speed of Progress”

Log In or post as a guest

Replying to comment #:

« Return to Article