The Speed of Progress

« Return to Article
  • first 2013-07-02 06:03
    actually what the hell, is the author having a stroke? Bruce are you OK?
  • Melnorme 2013-07-02 06:08
    So the real WTF is that dreams aren't real?
  • Balu 2013-07-02 06:38
    Sorry, I didn't develop any interest for the story. Could you please elaborate a bit more on the Kaley Cuoco part?
  • Pippo 2013-07-02 06:44
    Why not getting rid of the idiotic bar in the frist place?
  • ObiWayneKenobi 2013-07-02 06:47
    This is an example of the kind of anonymization/embellishment that we DON'T need on the site.
  • _ 2013-07-02 06:52
    Kaley who?
  • dull 2013-07-02 06:58
    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......
  • Mike 2013-07-02 07:01
    trwtf is wave files!

    If you have to use them (why?), at least call them wav files

    captcha: ludus, short for ludicrous
  • My name is irrelevant 2013-07-02 07:12
    A long time ago, we had a UNIX machine in our lab.

    The backup process ran every day and everyone was used to the fact that it took several hours to finish.

    Then we discovered the small bug in the backup command:

    dd bs=10 if=.....

    After fixing this SMALL bug, it finished in a few minutes...
  • Ash 2013-07-02 07:13
    The real WTF is just about to happen. That notification email he just got tells him that for some reason its combining the wrong files, since the procedure to do so worked on audio size, and would seek out the appropriate files based on that, within a set of directories spanning mutliple locations. Now it just cobbles together any old crap as long as the chunk nos match.

    A bit like my coding really :/
  • lesle 2013-07-02 07:17
    Sorry, Eric, she's dating Superman now.

    http://wonderwall.msn.com/movies/henry-cavil-kaley-cuoco-dating-1759105.story?ocid=answw11
  • Mr E 2013-07-02 07:17
    "...and then I woke up and it was just a dream. The End."
  • J.R. 2013-07-02 07:20
    A dream sequence? This ain't Dallas FFS
  • Medinoc 2013-07-02 07:20
    While the dream part may be a storytelling WTF in itself, TRWTF is publishing a patch on week-ends.
  • B 2013-07-02 07:29
    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.
  • Anonymous Paranoiac 2013-07-02 07:52
    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.


    Yeah, 20MB file sizes for voice prompts in a phone system is absurd. Not only is 128kb overkill, anything over 8bit 8k mono is pointless.
  • ANON 2013-07-02 08:26
    So TRWTF is that they put code into production without ever testing it?
  • Anon 2013-07-02 08:34
    Does Eric work for the NSA?
  • fgfg 2013-07-02 08:44
    Should we start a petition to bring back MFD, as it would improve the overall quality of the site?
  • Paul 2013-07-02 08:46
    I've once done something like that as well. Back in the days when Delphi 5 and dBase IV-files where still considered 'ok' (ish) we had some function that needed to loop on all records in a table.

    So, progressbar.min=0; progresbar.max=table.count(); and then happily crunch your way through the data and increment the progress bar on every row. (oh, and call Application.ProcessMessages() because, of course, all work was done in the GUI-thread...)

    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.
  • drake 2013-07-02 08:49
    Most phone companies use GSM audio compression - why wav files? Sure storage is cheap nowadays, but this is a terrible idea...

    Oh, and the real WTF is Big Bang Theory - that show is awful and horrendous(Kaley is hot though, I'll give you that).

    Captcha: baratus. B.A. Baratus, also known as Mr. C, hates flying...
  • Saribro 2013-07-02 08:55
    Pippo:
    Why not getting rid of the idiotic bar in the frist place?

    Quite.
    One of our demo samples for our SDK on Linux had a progress bar while waiting for the connection to a device. The progress bar was usually reporting nonsense, if it didn't hang, or got stuck on screen permanently, or ....
    The progress bar was skillfully removed from the sample; Not a single customer ever mentioned the change.
  • neminem 2013-07-02 09:01
    Yep, that was pretty dumb. I don't mind the anonymization most of the time (other than when it's code where half of it has been rewritten into another language and the other half hasn't, leading to an awesome noncompiling language chimera, those are always fun.) But this is a great example of what not to do: start off with a hook that sounds like it's going to be a great story, and then reveal it was a dream, completely irrelevent, and that the actual story is going to be extremely boring. Which it was. I already forgot what it was about.

    (Also by the way, it's Comic-Con, not Comicon.)
  • xaade 2013-07-02 09:05
    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?
  • xaade 2013-07-02 09:11

    int DetermineNumberOfUnits(List<int> amountPerUnit, double averagePerUnit)
    {
    // The number of datum in the list could be wrong.
    // return amountPerUnit.Count;

    // use math instead.
    int total = 0;
    foreach(int value in amountPerUnit)
    {
    total += value;
    }
    return Math.Round(value / averagePerUnit);
    }

  • Sethur 2013-07-02 09:15
    Please keep your private celebrity fetishes out of articles you publish for public consumption because that's incredibly creepy, thanks in advance.

    Captcha: caecus - please don't tell me about your caecus fetish, either.
  • eVil 2013-07-02 09:44
    And then they all fell down a well, right?
  • Anon 2013-07-02 09:47
    Sethur:
    Please keep your private celebrity fetishes out of articles you publish for public consumption because that's incredibly creepy, thanks in advance.

    Captcha: caecus - please don't tell me about your caecus fetish, either.


    Seconded. This isn't a fanfic site.
  • WTF did i just read? 2013-07-02 10:10
    WTF did i just read?
  • Andrew 2013-07-02 10:15
    Barenaked Ladiea


    Which is, of course, the Italian counterparts of BNL.
  • Kempeth 2013-07-02 10:56
    _:
    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".
  • Zylon 2013-07-02 11:42
    For the love of Bruce almighty, they're WAV files, not "wave" files.
  • Mr. Principal 2013-07-02 11:43
    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.
  • Wishing Editors Edited 2013-07-02 11:45
    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?


    The real WTF: thedailywtf.com




  • n_slash_a 2013-07-02 11:49
    _:
    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.
  • Coyne 2013-07-02 11:50
    Progress bars were invented by a project management team.
  • tweek 2013-07-02 11:56
    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.


    And the Rav4 Genie.
  • Ken B 2013-07-02 11:58
    neminem:
    (Also by the way, it's Comic-Con, not Comicon.)
    Actually, it's "Com-Icon", to distinguish it from "Exe-Icon".
  • katastrofa 2013-07-02 12:01
    The real WTF is that this actress is terribly ugly. Nothing to have wet dreams about.
  • herby 2013-07-02 12:18
    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!
  • Manditory 2013-07-02 12:27
    1 - wave?
    2 - someone one call who doesn't leave a PC running?
    3 - fanfiction?
  • erat 2013-07-02 12:41
    Manditory:
    1 - wave?
    2 - someone one call who doesn't leave a PC running?
    3 - fanfiction?


    4 ???
    5 PROFIT!!
  • themagni 2013-07-02 12:41
    Anonymous Paranoiac:
    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.


    Yeah, 20MB file sizes for voice prompts in a phone system is absurd. Not only is 128kb overkill, anything over 8bit 8k mono is pointless.


    Hey, I run all my phone calls through my 7.1 surround system with the Bluetooth connection on my cell.
  • Tasty 2013-07-02 12:50
    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.
  • Stuart 2013-07-02 12:50
    Is no-one going to mention the spelling errors?
  • Manditory 2013-07-02 12:59
    Funny? WTF?
  • asdf 2013-07-02 13:28
    glad to see I wasn't the only one who thought the dream was lame. I have never seen Big Bang, but I remember the first time I saw her was on 8 simple rules, she was only reason I watched the show (hey come on now, I was a teenager living with my parents, I would take anything to see some hot girls especially if my parents didn't disapprove)

  • Joel Leclerc 2013-07-02 13:34
    The WTF itself was WTF... you know, meta-WTF-ness. Like with the dream and all, and that Kaley Cuoco thing. Oh yeah, and with grammar errors throughout the WTF made it even more WTF.

    So basically, can I just ask: Why did you want a meta-WTF?
  • SpewinCoffee 2013-07-02 13:55
    _:
    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.
  • da Doctah 2013-07-02 14:03
    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.
  • ForFoxSake 2013-07-02 14:06
    I only encounter and fix 3 of these daily.
  • anonymous 2013-07-02 14:11
    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.
  • chubertdev 2013-07-02 14:23
    An emergency, thought Eric? Yeah, sure. Then why wasn't it an emergency yesterday evening.


    WTF?
  • chubertdev 2013-07-02 14:26
    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.
  • D-Coder 2013-07-02 14:37
    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 2013-07-02 14:47
    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 2013-07-02 15:01
    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.
  • DrPepper 2013-07-02 15:06
    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 2013-07-02 15:07
    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 2013-07-02 15:12
    "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?
  • snoofle 2013-07-02 15:22
    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...
  • Zylon 2013-07-02 15:33
    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 2013-07-02 15:51
    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 2013-07-02 16:10
    wav files can use gsm compression. Not every wav is PCM (although it is by far the most common)
  • Ronald 2013-07-02 17:17
    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 2013-07-02 20:02
    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 2013-07-02 23:01
    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 2013-07-02 23:32
    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.
  • Matt Westwood 2013-07-03 02:25
    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 2013-07-03 02:43
    Dude... Bruce... slow down with your typing there.
  • QJo 2013-07-03 03:52
    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 2013-07-03 04:39
    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 2013-07-03 05:06
    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 2013-07-03 05:39
    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 2013-07-03 08:49
    TRWTF is zipping up the WAV(E) files. They don't actually get any smaller when you try that.
  • Richard 2013-07-03 09:11
    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
  • pscs 2013-07-03 11:19
    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 2013-07-03 11:34
    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 2013-07-03 11:35
    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 2013-07-03 11:56
    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.
  • chubertdev 2013-07-03 12:29
    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 2013-07-03 12:50
    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 2013-07-03 13:24
    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 2013-07-03 15:45
    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 2013-07-03 15:53
    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.
  • chubertdev 2013-07-03 16:35
    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 2013-07-04 11:26
    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 2013-07-04 14:05
    ;wave files
  • me 2013-07-04 16:13
    Good story, awesomely told - good work.
  • Neil 2013-07-04 19:24
    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 2013-07-06 10:13
    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 2013-07-06 22:57
    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 2013-07-08 17:44
    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 2013-07-08 18:00
    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 2013-07-09 11:31
    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 2013-07-10 13:48
    I thought that the dream build up was very well written, Bruce. But now it's been done! You will need new tricks! >:(
  • Cunso 2013-07-10 15:06
    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 2013-07-18 02:40
    That was creepy and weird.