- 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
Reminds me of some older TDWTF articles with SQL-generated XML... I guess JSON is the new XML?
Admin
Admin
And no one has ever though about this.
Admin
i don't watch the show, like at all, but why are American Dad's eyes pink?
Admin
Stoned, hence snacks.
Admin
I think he's stoned in that scene, hence the indecision about munchies
Edit: hanzoed. Damn you @KillaCoder
Admin
Got into crack cocaine.
Admin
ah... why did i think JPG compression artifacts when the answer was so obvious?
Admin
REVENGE!!! :stuck_out_tongue_closed_eyes:
Admin
you had an advantage. while i know what the show is i only made it through about half the first episode before saying "this is not funny. i'mma go back to watching Futurama"
and havent watched it since.
Admin
Admin
hmm... not really outfoxed then if i could not reliably have gotten it from context?
as we have seen my knowledge of the show was barely sufficient for me to identify what show it was without resorting to GRIS
Admin
I'd like to complain.
This topic was misfiled. It is currently in the “Articles” section when it clearly is a prime candidate for the IHOC.
Admin
Damnit! I have been sort of Hanzo'd and definitely DiscoScrewed. Yesterday I was going to change the topic about JSON to this exact article title, but I could not get the damned thing to load on my S5 and then later forgot about it. Now I cannot do it because it would seem unoriginal...and it probably would not allow it anyway.
Admin
Admin
does one buttume that i have any degree of experience with stones?
i'm a fox ffs!
Admin
Stones are in the woods, so any respectable fox should know something about them...
Admin
Admin
they is gud fer sitting on to get a better view of surroundings and looking epic.
Admin
what? you mean people throw stones at each other for fun and smoke cooking utensils?
people is crazy!
seriously though, i'm sure there is a stoner population in Protland. I've just never encountered them.
Admin
Sadly not idiot-free.
Admin
That led me (ultimately) to http://www.json.org/xml.html, where I found this interesting little WTF:
I don't know about you, but I always thought that sounds and images and such were basically structured data. Turns out I was wrong, at least according to the guys at JSON.org. And I wouldn't exactly call `<[CDATA[]]>` well-suited to binary payloads, not least because you have to convert them to base64 first. But I'll let that one slide.Admin
Am I missing something, or is
<[CDATA[]]>
(one of the ugliest markup elements in the world) completely unnecessary when you can just put a string value?vs
Admin
JSON JSON JSON JSON JSON JSON! (I found a WTF about JSON!)
Admin
Hmm... chances are slim, but:
and
aren't the same XML document :stuck_out_tongue_winking_eye:
Admin
I mean in the context of JSON. I know why it's there in XML, but why would JSON need it for binary data (or at all)?
Admin
fucking rebake the fucking discoshit...
Admin
Doesn't CDATA have the same kind of problem?
Admin
Ah, I see what you mean now; forgot about base64 :facepalm:
Admin
so we're all agreed.... display logic in the data layer is a bad idea?
:running:
Admin
Admin
:blush: thanks!
Admin
I've seen this kind of thing in the wild. It's what happens when a mediocre DBA decides the developers are dumber than a pack of hammers and decides to put all the logic in the database layer (which they understand) rather than the application code (which they often don't).
This may not be the worst possible outcome in those cases where the developers are indeed dumber than a pack of hammers.
The phenomenon can also happen when a DBA is bullied by management into making the database do something it should never have to do, because the DBA has time available and management is pulling out all the stops to complete an already-late project. In those kinds of organizations, idiotic stored procedures are likely to be the least of the problems.
Admin
Depends exactly how you structure the logic though. Calculations, filtering, and sorting are normally best done as close to the data as possible, though obviously not every time. Data integrity should also be handled at the data layer (obviously!). Business logic should be in the layer above though, and UI logic only in the UI (although you can put stuff in the business logic layer that the UI depends on e.g. flags and stuff).
Admin
I considered it to be the jokes that weren't funny enough for Family Guy, which is saying something.
Admin
My comment was not to suggest that this was in any way OK, just to explain the organizational failures are that lead to it. That's the thing about code - it reflects the people and organization who created it.
Admin
As a rule -- let your database do your set theory, and your application code do your numeric computation and your data parsing/formatting. PL/SQL is a lousy data parsing tool!
Admin
Also where the DBA doesn't care how good the developers are, just believes the entire application should be done in the database except for some front end web stuff to show the awesome results of his brilliant use of SQL to do the business logic. I have a hammer, this screw is therefore renamed "nail".
Usually I would agree but sometimes when you have to merge in someone else's database for your data mining, doing the data parsing with a SP can be the most efficient approach. One of my last jobs before retiring involved doing an awful lot of this, and the inital approach using Java ran in about 16 hours on my test machines while the SP approach had a runtime of 20 minutes.Admin