- 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
You really have a complicated imagination.
Admin
Windows Workflow has the disadvantage that you create a lot of members, i.e. an IfElse branch with at least 2 Members (the actual IfElseActivity, and then at least 1 Branch). If you want to name them properly, you end up with something like in Screenshot 1 even for simple Workflows.
Still, WF is a neat little technology.
Admin
How the hell have we not had a joke about "data processing data data processing" yet?
Admin
The real WTF is Big Rigs: Over the Road Racing.
But we all knew that already.
I'm sure the whole story behind that could warrant an epic tale ala <a rel="nofollow" href=""http://thedailywtf.com/Articles/Virtudyne_0x3a__The_Founding.aspx" target="_blank" title=""http://thedailywtf.com/Articles/Virtudyne_0x3a__The_Founding.aspx">The Digital Donkey.
Admin
It might have been a test if Activision will publish any crap you throw at them. Or an attempt to collect some americanski dollars. Or both.
Those are the sane options. So, go crush my hopes for humanity...
Admin
Ha, first you beat me to it and then you're too cowardly to post using your real made up pseudonym.
I just wonder what Einstein would have had to say about infinitely fast cars.
Not counting special numbers like inf, x-x is exactly 0 for every float x and a conforming IEEE 754 implementation. Now if I only knew whether it's +0 or -0...
Admin
There's more than one way to skin a cat.
Admin
Was the original coder's name Ken? I had a guy (Ken) in my senior project who loved this type of stuff. His explanation: "otherwise it breaks" (translation: I've ran into a timing issue that occurs rarely and by adding a passthru method it prevents the timing problem, like a synclock).
That translation took about 6 hours to figure out. He had a race condition and tried adding a new method that called the offending method. The next time he ran it the race didn't occur, so he knew it had to be the solution. From then on every time he called the method he would add another layer.
I had 0 responsibility for that area of the app, and didn't want to clean it up (like I had to for the common code). I almost had tears of joy when he was presenting and the problem surfaced again! He showed the prof afterwards what he had done and asked why it wouldn't work on the machine he was presenting on.
Sadly, he still graduated with the same degree as me.
Admin
What sound did the WTF make as it went over your head?
"Whoosh"? "Roarrrr"?
Addendum (2008-04-09 15:49): Edit:
After reading the responses, I see that none of the commenters understood the zero joke.
In assembly, the way to store a zero in a register would be to use a "load immediate" command. This command would have an opcode followed by the literal value to be loaded, ie. "ldi 0".
The actual opcode for this would be different for different platforms -- some CPUs wouldn't even have a "load immediate" opcode -- but let's assume it was "0xf0", then the full command would be assembled as "0xf000" (2 bytes for this instruction on my imaginary 8-bit CPU).
Back in the days where developers would literally count clock cycles to provide precise timing in certain tight loops, a 2 byte opcode might be overkill if there was another, shorter opcode that could achieve the same result by a different means. Say there was an opcode called "and A,B" which would take the bitwise AND of the value in register A with the value in register B. The opcode for this instruction is "0xba". If you knew that register B would be set to zero on entry of this subroutine, then you could set A to zero with this opcode, which would assemble into a single byte.
So it's just a tricky way to squeeze as much memory as you can out of your code. Trying the same tricks in a language like C clearly makes no sense because you're actually using MORE instructions when you do something like this... and thus, a WTF.
Admin
Actually, that would be ImaginaryRegionID -- complex is (real + imaginary * sqrt(-1))
Admin
Admin
Even in ancient assembler, the reason to use the XOR trick wasn't simply to save on clock cycles. Sure, in Z80 (AFAIR) and in i8086 (AFAI can faintly remember), it took one cycle, rather than maybe three for an immediate load. But even 1980s assembler programmers weren't that bit-headed. The real value of the thing was that it reset various flags, which made "safe" programming in assembler a hell of a lot easier.
After a while, it became something that you just did automatically.
A bit like programming in Java, without understanding what a real language might do for ya.
Admin
That's some kind of acceleration technique... You cannot just start running.
Admin
Copying a variable to a temporary is not always a WTF. In release code, it will be optimized out anyway. In debug code, it may be helpful to be able to view the value of the temporary to see what was going on.
s-=s is not always a WTF. It is often the most efficient way to set 's' to zero (or nearly so) if it's a number and leave it as a NaN if it's not. Especially on modern CPUs, 'clever' evaluation code is generally faster than testing and branching.
That said, this is almost definitely a WTF.
Admin
Admin
RegionID is the region for commoners; RealRegionID is the region for the King. The King has superuser rights to this schema and may alter the constraint by decree.
Stop being so Anglocentric ...
Admin
Is it just me, or is the WTF:
Order Summary
Not really a WTF?
I mean, 'head3' as a css class doesn't nessecarily have to correspond to a document structure level 'head3'.
Admin
PostWTFCommentWTFCommentPostByUserName("I find the last method name most perplexing.", "NoDudeSeriouslyRealWTF", "Eternal Density");
Admin
I came to this thread looking for a GetThePapersGetThePapers() reference.
I was disappointed.
Admin
Don't be silly. The real region code is for REAL ID Act compliance. The other one is just a fake to throw off terrorists who want to steal our region codes for some nefarious plot.
Admin
As far as the function naming goes, it might just have been caused by Visual Basic code, which also never heard of overloading. It might have been "wizard-converted" into VB.Net, causing this to appear as grotesque as it does. Without more info it couldn't be said whether this is a real WTF or not.
RegionID and RealRegionID stuff, also happens a lot in RealLife(TM) and usually for a good reason. Occasionally some beginner architect or developer makes a mistake of believing some outside entity codes never change (PO numbers, currency numbers, ...) and uses them for database keys. What happens then is that system runs just fine for couple of years and then suddenly the entity that maintains the codes, changes them. ETL processes completely break down, data is suddenly invalid and no reports (for example) can be generated to return to the govt. or bank.
Simple solution is then to add a mapping table which maps codes from outside the system to the codes used inside the system. A thing that should be done at the design phase is then bolted on to the production system, where only edge methods (usualy just ETL & reporting) change.
Still, this is lesser evil than completely shutting down the system, destroying database consistency checks (removing all triggers and perhaps even foreign key constraints), updating all KEYS and then hoping that updates didn't damage the data in the system. Personally, in working system, I would always choose mapping tables and extra programming. They might be ugly to see, but when new code exhibits an uncaught bug, things mostly break fast and loud, without causing any hidden damage to the data in the system or damaging more than just a few entries before being caught.
Again, without more info I cannot say whether this is a WTF or not.
Admin
Admin
These are types not methods - look at the icons...
Admin
Admin
Three lines is the minimum braking distance
Admin
Where we couldn't guess we just assumed doDoRunRunRun(), doDoRunRun() Unsurprisingly, the job was doomed doDoRunRunRun(), doDoRunRun() Yeah, we just assumed, yeah, job was doomed And when we clicked 'submit' doDoRunRunRun(), doDoRunRun()
The client was happy 'til he got the bill doDoRunRunRun(), doDoRunRun() If he had more money we'd be coding still doDoRunRunRun(), doDoRunRun() Yeah, he got the bill, yeah, be coding still And when we clicked 'submit' doDoRunRunRun(), doDoRunRun()
doDoRunRunRun(), doDoRunRun() doDoRunRunRun(), doDoRunRun() doDoRunRunRun(), doDoRunRun() doDoRunRunRun(), doDoRunRun() doDoRunRunRun(), doDoRunRun() doDoRunRunRun(), doDoRunRun()
Admin
Sorry about that -- I submitted as soon as I saw tragomaskhalos's post, before reading the rest of the thread.
-Harrow.
Admin
Bah. Back in the days of C, you could be -absolutely- sure that all the bits in a floating-point value get set to zero by:
This method uses the tried and true technique of clearing all the bits by performing a bitwise XOR of the value against itself. It doesn't use this newfangled method of simply setting the value to zero.
Admin
If sp was a number, I fail to see how this operation would not return 0.0. Floating-point operations are really integer operations in a thin disguise. An FP substitution will bsically shift the mantissas to align them, do an integer subtraction, and then shift the mantissa of the result again, if needed. Shifting the mantissa adjusts the exponent of course. The initial alignment of the mantissas will be performed in the same way on both minuend and subtrahend (they are the same, after all).
It'd take some very contorted implementation to have this subtraction yield non-zero. Of course the compiler can move operations around so in some cases it may not work, but in this case methinks the operations are localized enough for the results to always be zero. Modern compilers (gcc methinks) will just optimize it out as a store of a zero constant anyways.
Admin
I'd say that in real life, for ultra-compact code, you do the exact opposite -- you strive to preserve the flags for as long as possible, to avoid say a jump. That's why, for example, on sane architectures (tm) a load of a register with a constant won't touch the flags, and in general any opcode whose result would be universally known from its immediate arguments won't touch the flags. By "universally known" I mean for any immediate value, not just a particular case.
Admin
"doDoRunRunRun()" is clearly an intentional reference to the song. "Met him on a Monday..."
Admin
Admin
The class names are clearly the result of auto-generation from an xsd schema.
Admin
Admin
Jeff S.: Why didn't you just use an h3 tag? Original Developer: ... Original Developer: They go all the way up to THREE??! Jeff S.: shocked, trying to hide it Well, yeah. There are actually six different heading tags. That is, they go from h1--the largest--down to h6--the smallest. Original Developer: WHOA!!! No way! You're pulling my leg. Jeff S.: No dude, seriously.
Admin
$jill->doRunRunRun( WTFAreWeDoingWTF );
Admin
Admin
Do you perchance work for Sony? The PSP SDK has thousands of these function names. Some better examples are: sceKernelLoadModuleBufferForLoadExecBufferVSHUsbWlanDebug sceUmdUnRegisterSuspendResumeUMDCallBack sceUpdaterCheckChunkVersionForKernel etc. Sony also named all the PSP subsystems after Star Trek, subatomic particles, and LOTR. There are subsystems called Lepton (UMD), Pommel (watchdog), Kirk (encryption), Spock (more encryption), Baryon (WLAN), Tachyon (VME), Legolas, and so on...
Admin
Well, I guess one of the company's police would be "Do not use parameters, let's distinguish everything by method name"
And about the doRun, doRunRun, doRunRunRun, RunForrestRun methods: why not naming the methods accordingly?
RunProcess(), ExecutePart1(), CalculateWhatever(), SendToBackOfficeApp()...
I'm not familiar with the actual code that generated the "RunRun syndrome", but I'm pretty sure you could re-think the methods name if you just take a second (and maybe a third) look into the implementation. If code review did not help you out with the method-names, then your method structure needs revising, and not only the naming.
Admin
Sounds like it was starting a diesel engine?
Admin