- 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
fr1st=fr1st.fr1st.fr1st
Admin
Frist? Frist frist. Frist.
Admin
But, but, but.... isn't all data considered to be data? What an appropriate and consistent naming convention!
Kudos for a job well done!
Admin
I guess this guy like Data from StarTrek TNG?
Admin
Data data data. Data data.
Admin
Of course, the proper way to do this would be with a loop. After all, you never know how far down that object hierarchy you'll have to go:
while(data.data){ data = data.data; }Admin
Holy hell, doesn't anyone use ternarys anymore? Gosh!
Admin
Chicken chicken, chicken? http://www.youtube.com/watch?v=yL_-1d9OSdk
Admin
I guess this is research-based programming.
Google "chicken academic paper".
Admin
TRWTF is the unused variable srcData...
Admin
TRWTF is no coding conventions in a large development team
Admin
Hodor hodor hodor. Hodor?
Admin
At least it has vowels.
Admin
Bah! Data is overrated. Information is where it's at.
Admin
Is this a new pokemon?
Admin
http://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo
Admin
We use that too. And all the stuff that isn't data we just call 'stuff'.
Admin
I assume this was written by the Swedish Programmer
[image]Admin
Boy, this would win with flying colors any obfuscated code contest...
Admin
Dadaism or Dataism?
Admin
Cornflakes? Cornflakes cornflakes. Cornflakes cornflakes cornflakes. Cornflakes, cornflakes cornflakes cornflakes.
Admin
var srcData = data; if (data.data) { data = data.data.data ? data.data.data: data.data; } if (!data) { return; }here way more readable!
Admin
hmmm... perhaps instead :
while( data.data ) data = data.data;
though... who knows... if (data.data == data) it might take a while :p
I can think of cases where this might seem necessary. This is certainly eye candy, and definately ambiguously named... but not much of a WTF
ADDED A FEW SECONDS LATER: .. .oO(WTF IS THE DEAL WITH MAKING VARIABLE strData)
Admin
Batman!
Admin
Admin
/me starts to hum the title song from "Indiana Jones"...
Admin
This marklar is a perfect marklar for an embedded marklar with no marklar marklar. Marklar.
Admin
That's just beautiful.
Admin
That programmer is obviously an orang-utan. http://www.dangermouse.net/esoteric/ook.html
Admin
More reason to never data programmer
Admin
var srcSpam = spam;
return spam.spam && spam.spam.spam ? spam.spam.spam : spam.spam ? spam.spam : spam ? spam : null
Admin
+1,000,000
Admin
function names and variable should not be of concern if function is doing job.
Admin
A true WTF that makes you literally say "what the f---?" when you're done.
Admin
The "&&" makes it more unclear. Try this:
That's way more concise.
Admin
Hodor?
Captcha: Hodor
Admin
Except that this looks like PHP, in which case using more than one ternary produces unexpected results. http://www.phpsadness.com/sad/30
Admin
Being John Datavich
Admin
This can't be a WTF, it's in JavaScript.
$srcData = $data; if ($data['data'] && $data['data']['data']) { $data = $data['data']['data']; } else if ($data['data']) { $data = $data['data']; } if (!$data) { return; }There, now it's acceptable.
Admin
Why isn't this featured yet?
Admin
In dotnet 3.5 we have the ?? operator for this
return data.data.data ?? data.data ?? data ?? null;
Admin
Changed to be formatted as the solution to an interview question.
Function data_matryoshka (ByRef srcData as Object) as Object if IsNothing(srcData.Data) then return srcData else return data_matryoska(srcData.Data) end if return FILE_NOT_FOUND end functionAdmin
What's the problem? It's just an example of data centric programming.
Admin
data.data = data;
And if that is not using a pointer reference... then watch as the world comes to an end.
Admin
Badger badger.badger(); Badger badger = Badger badger + Badger badger; badger.badger.badger ? badger.badger : mushroom
Admin
I guess that when you read it aloud and with the right intonation it will sound like the national anthem of the programmer's country.
Admin
var srcSpace = space; if (space.space && space.space.space) { space = space.space.space; } else if (space.space) { space = space.space; } if (!space) { space; }Space. So much space. Space, need to see it all. SPAAAAAAAACCCCCCCEEEEEEEEE!!!!!
Admin
I used to have a colleague that did something similar... but using single letter vars.
if (a.a)...
while (i<x.x.x)...
and so on.
Admin
A song to accompany this WTF: http://www.youtube.com/watch?v=SgvQqVLhBj4
Admin
Dammit, you beat me to it. Nelson Riddle is probably doing about 60,000 rpms. I like how the Riddler insinuated himself into it. It appears Frank Gorshin has been channeled.