• LCrawford (unregistered)

    The developer frist owned stock in AMD and really wanted them to buy multiple Ryzen 64 core machines to run the infinite loops which ensure that 'flag' stays true.

  • (nodebb)

    Can we say that his attempt at hiding his horrible code was a complete fiasco?

  • Raj (unregistered)

    Hiding the gender of an incompetent developer by using "they" probably means it was a female; using "she" would have been sexist. Welcome to America.

    Remy: Actually, the gender wasn't specified in the submission, and in those kinds of situations, I like to vary it up a bit, instead of defaulting to male.

  • (nodebb) in reply to Raj

    It can easily be a non binary gender, like FILE_NOT_FOUND.

  • (nodebb)

    No, no. Loop no es bueno.

    Imagining Consuela from Family Guy.

  • (nodebb)

    TRWTF is setting flag to true inside the while loop. The condition is a true literal. Why bother seeing a flag variable to true if it's not used?

    Addendum 2019-05-22 07:17: Setting not seeing

  • Mirko (unregistered) in reply to Mr. TA

    Because, otherwise, the compiler optimizer sees that the loop is empty and removes it. By setting an (useless) variable, the loop seems to be doing something, and is kept in the compiled DLL.

  • Jakub (unregistered)

    I want to point another TRWTF here

    try
    {
        luck.doFiasco().ConfigureAwait(true);
    }
    catch (Exception)
    {
    }
    

    The ConfigureAwait(true) call suggest that doFiasco() function is async (returns task). So this try/catch won't catch anythere since there is no await in there...

  • SG (unregistered)

    Now I know why the force me to use a obfuscator..

  • eth0 (unregistered)

    Was the developer under the impression that the code they write for the company that pays their bills is somehow secret within that said company?

  • my name is missing (unregistered)

    If I wrote crap like this I would want to hide it from everyone too.

  • WTFGuy (unregistered) in reply to eth0

    @etho0: Some people view their daily goal as delivering whatever goods the company wants from them. Other people view their daily goal as advancing their personal interests while avoiding being fired.

    Never confuse the first sort of person with the second. You'll be utterly mystified by their motivations and actions if you make this basic mistake. Most of the corporate pathologies studied in Organizational Behavior derive directly from this problem.

    For the second cadre sometimes the goal is corporate advancement, sometimes it's working a paying side gig, sometimes it's simply self-preservation when at/above their Peter Principle threshold or, especially in a fast moving field like IT, simply being left behind technologically. And sometimes it's simply being a vandal or lazy do-nothing just for the lulz.

    The fact that senior leadership of any organization are mostly those people who've specialized in the corporate advancement flavor of the second approach to work doesn't help.

  • Brian (unregistered) in reply to eth0

    Some devs I've encountered are surprisingly possessive of "their" code. I once worked with a guy who refused to let anyone else see what he was working on, even though he was the technical lead for the project (a role which many others felt was unearned, but somehow he, like the one in the story, had weaseled his way into management's good graces). So he wold work for weeks on some huge new batch of code, then check it in without going through any kind of review. And he often had a tendency to make these monster check-ins just before he left on vacation, leaving everyone else to clean up his inevitable mess.

  • Me (unregistered)

    TRWTF is surely : "the code, as it was only stored on their machine"

  • Shut the fuck up Raj (unregistered) in reply to Raj

    Shut the fuck up Raj

  • Gumpy_Gus (unregistered)

    We had a genius programmer who got called onto the carpet, many times, for on the weekend adding a few hundred lines of assembly language to a critical heavily-used compiler, pushing it into production, and then leaving on a vacation to the Boundary Waters, before cell-phones.

    Another time they broke the FORTRAN compiler, the FORMAT statement, which 98% of FORTRAN programs used.

    Another time they didn't tell anyone, but they changed the in-memory representation of string literals, to not be so space filled. That broke about 30% of programs.

    Later on I asked them several questions, like "How to get the compiler to read beyond column 72", and they could immediately point to a line in the 330,000 lines of assembly language where the input line was trimmed, that was impressive. Less impressive was that there were like five other places where "72" was assumed or should I say subsumed into obscure left shifts of like 12 bits. Grrrrrr. It took me days to find all the places that had to be tweaked to allow reasonable length input lines.

  • (nodebb) in reply to Mirko

    Really? Try this in C#: "while(true) ;" (without quotes)

  • Brian (unregistered) in reply to Mr. TA
    Mr. TA:
    TRWTF is setting flag to true inside the while loop. The condition is a true literal. Why bother seeing a flag variable to true if it's not used?

    It's possible that this was leftover debug code. I know I've used that trick before in certain situations, especially when remote debugging. Sometimes you want to intentionally hang a program so you can activate a breakpoint, so you need an infinite loop with a line of code to actually set the breakpoint on.

    Of course, it's also good practice to, y'know, delete your debug code before checking in your changes...

  • sizer99 (google) in reply to Raj

    DailyWTF has had no problem shaming bad female devs if you've been reading long enough. There's just fewer of them due to the boys club 'NO GURLS ALOUD' nature of the industry. Given the completely lopsided ratio this might even be the opposite.

  • Really? (unregistered) in reply to Raj

    This sort of comment is completely unwarranted.

  • Maia Everett (github)

    Another WTF is the wrongCamelCaseConvention.

  • (nodebb) in reply to Maia Everett

    TRWTF is camel casing.

  • silent_d (unregistered)

    This code is clearly fabricated.

  • (nodebb) in reply to sizer99

    Yeah some industries are like that. I also don't see many female trash removers and female roofers. Damn patriarchy!!!

  • (nodebb) in reply to Brian

    Funny, this is the second funky debug technique I learned on this website. The first one was the "create a function which returns false" to set a break point when another function fails.

  • xtal256 (unregistered) in reply to sizer99

    What makes you think girls aren't allowed in our industry? Could it be that there are just fewer women who want to do it? After all, it's their choice.

  • Raj (unregistered) in reply to xtal256

    In the media we often see IT portrayed as cool dev work on AI and Facebooks, but it's misleading. The vast majority of tech workers do stuff like changing printer toner, racking servers, configuring Exchange mailboxes or running tsm jobs. The low end visa worker stuff, in other words, where females are far and few. So of course when numbers are aggregated it looks like the bro code in dev teams is what keeps ladies away, but the tedium of repetitive, lonely grunt work is probably a bigger contributing factor.

  • Scobberlotcher (unregistered) in reply to xtal256

    We almost never see any women applicants. I am in a startup, in the last 3 years I have seen 2 women applicants, one of whom was studying math and had no programming skills at all. I have the impression that many of the female candidates apply to larger companies, since there are at least some in the industry.

  • Jan (unregistered) in reply to Raj

    Actually in programming and various technical texts, the programmer is usually female by default. I kinda like that unspoken tradition.

  • Daemon (unregistered)

    Darn-it I can't find it anywhere, but I've once read some artticle where programmers actually added a sleep / loop with ever subtly increasing loop counts, so that every once in a while they could push an update that would make stuff go way faster, by shorting that loop....

    The moment I read this article, I was reminded of this. Unless a lot of stuff from this code is abbreviated, renamed and simplified, this method doesn't do anything but eat resources and make a statement for buying new, faster hardware. That could also be why the devs wouldn't version their software centrally and end-up obfuscating their code, rather than own up / fix that while loop.

  • NULLPTR (unregistered) in reply to Brian

    Thats why a "convention" for debug stuff that should be caught is useful. i always name my debug stuff "Muggabatscher" (german dialect for fly swatter). THose are not intended to end up in production code so if one slips through it should be caught in code review as last instance.

  • Boris Lenkov (unregistered)

    TRWTF: a "senior developer" who doesn't know about .NET decompilation.

  • (nodebb) in reply to Daemon

    Darn-it I can't find it anywhere, but I've once read some artticle where programmers actually added a sleep / loop with ever subtly increasing loop counts, so that every once in a while they could push an update that would make stuff go way faster, by shorting that loop....

    https://thedailywtf.com/articles/The-Speedup-Loop

  • anonymous (unregistered) in reply to Mirko

    I've never known an optimiser to remove an "empty" loop that nevertheless has some effect on the program's execution. The optimiser doesn't know that this seemingly-infinite loop isn't going to be terminated some other way e.g. by killing the thread.

    However, the inspector in an IDE will probably complain about it. And even with the useless variable assignment, the inspector will still complain (about both the variable assignment and the fact that the loop never terminates).

  • anonymous (unregistered)

    So the source code is normally shared among developers on the same project, right? (Except for large projects in big organisations with lots of highly-valuable secrets.) So why then did a) the senior developer think it was appropriate (or even find it necessary) to push a pre-compiled binary (especially obfuscated) and b) whoever's in charge of the server accept the aforementioned pre-compiled binary? I imagine in any sane environment this would be rejected on the basis of security and the developer in question put under closer observation.

  • eric bloedow (unregistered)

    this reminds me of a story where an idiot thought "system idle process" was spyware and wanted to get rid of it...

  • David Mårtensson (unregistered) in reply to anonymous

    They had the ear of management, any complaint against them constituted criticism on the management, and that are very unlikely to win any friends IN management.

    In a sane company, management would not accept this, but to often personal connections weight more than business values, unless the owner has personal stakes in the company profits. (and sometimes even then)

  • (nodebb)

    It's a shame this wasn't C++ where infinite loops trigger undefined behaviour.

Leave a comment on “Do Fiasco”

Log In or post as a guest

Replying to comment #505761:

« Return to Article