- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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.
Admin
Can we say that his attempt at hiding his horrible code was a complete fiasco?
Admin
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.
Admin
It can easily be a non binary gender, like FILE_NOT_FOUND.
Admin
No, no. Loop no es bueno.
Imagining Consuela from Family Guy.
Admin
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
Admin
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.
Admin
I want to point another TRWTF here
The
ConfigureAwait(true)
call suggest thatdoFiasco()
function is async (returns task). So this try/catch won't catch anythere since there is no await in there...Admin
Now I know why the force me to use a obfuscator..
Admin
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?
Admin
If I wrote crap like this I would want to hide it from everyone too.
Admin
@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.
Admin
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.
Admin
TRWTF is surely : "the code, as it was only stored on their machine"
Admin
Shut the fuck up Raj
Admin
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.
Admin
Really? Try this in C#: "while(true) ;" (without quotes)
Admin
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...
Admin
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.
Admin
This sort of comment is completely unwarranted.
Admin
Another WTF is the wrongCamelCaseConvention.
Admin
TRWTF is camel casing.
Admin
This code is clearly fabricated.
Admin
Yeah some industries are like that. I also don't see many female trash removers and female roofers. Damn patriarchy!!!
Admin
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.
Admin
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.
Admin
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.
Admin
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.
Admin
Actually in programming and various technical texts, the programmer is usually female by default. I kinda like that unspoken tradition.
Admin
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.
Admin
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.
Admin
TRWTF: a "senior developer" who doesn't know about .NET decompilation.
Admin
https://thedailywtf.com/articles/The-Speedup-Loop
Admin
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).
Admin
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.
Admin
this reminds me of a story where an idiot thought "system idle process" was spyware and wanted to get rid of it...
Admin
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)
Admin
It's a shame this wasn't C++ where infinite loops trigger undefined behaviour.