- 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
svelte
Indeed.
Admin
Nit picky, I know, but he actually went over the code with a "fine tooth-comb," not a "fine-toothed comb." (At least, according to Truss's Eats, Shoots and Leaves.) What the f* is a tooth-comb? Beats me.
English, that's TRWTF. Maybe these stories should be posted in some sort of compiled byte code. They'd be more precise and svelte.
Admin
So apparently it's a total WTF to use XML? It'd be crazy to serialize objects in XML!
Admin
Zip eddy doodah coding.
Admin
"There are blocks of code so twisted and ill-conceived, so warped that any unlucky programmer that happens upon them is sent screaming and gibbering to the pages of a CodeSOD."
TRWTF is the writing.
Admin
How to made a jouney, fast:
The WTF is using a double serialisation. as well as misusing both. (and pushing a zlib in the middle)
Admin
This reminds me of an application I had to create a plugin for once-apon-a-time.
It was a C# client app that called our .Net web services, nice and simple right ? The catch was all the web services only ever used DataSets as method parameters, and no matter what you had to stick to the standard - This would allow the methods to be 'future proof'.
The theory was that if one day in the future you needed to send another piece of info to a method, you wouldn't need to change the method signature (by adding another parameter), instead you would just add another DataTable to the DataSet, change a bunch of mapping code (on the client and server) and you're done.
The big problem was that the data being sent over the wire was massive, and they couldn't understand why they weren't able to make more than about 2 calls a second.
Admin
Yeah, most people realized that XML was just an obnoxious, bloated format for untyped s-expressions ten years ago. Welcome to the 21st century!
Admin
Admin
What's the joke? "XML is like violence: if it doesn't solve your problem, use more."
Admin
Yes, when given a choice between something that makes sense, and something that doesn't make sense but is Correct(tm), you should use the latter.
Actually, that seems like the kind of thinking that leads to WTFs like this in the first place.
Admin
I'm looking to create some work...
Admin
One of the nice things about COM is that relationships are largely self documenting.
Yeah, and just like MS's other brilliant self-documenting technique, namely Hungarian notation, it works until the API changes and now the self-documentation is misleading.
Admin
Admin
It's something you use to comb your teeth, obviously. You've heard of a toothbrush haven't you? So why not a tooth-comb?
I assume it's similar to floss?
Admin
You do know you can put an XML string inside a JSON object, right?
json.objects[id].id = object.id json.objects[id].data = SerializeXML(object)
Admin
Askimet needs a tooth-comb.
Admin
You can also put JSON in your XML. What's your point?
Admin
Ah yes, that makes sense for code-monkeys.
Admin
Your sure thats an corret answer? That begs the question, where did Eats, Shoots and Leaves get there data.
Admin
Well, Javascript could easily be. It's a lot like XML in that it's a monster that is completely consuming the talents of the best engineers in the industry, all to make a hammer do embroidery and brain surgery.
Python is a good candidate. For the one in a million use-case of duck typing, you get to write endless assertions and unit tests. And you still get to write adapter classes. The more I use Python, the more I am convinced it is the best possible proof that dynamic languages are a bad idea.
Another is any of the NoSQL snakeoil. It'll make a great demo, and then you discover you're reimplementing a conventional DBMS. (And SQL is, of course, the 70's XML, when they fundamentally screwed up relational theory.)
Admin
I love using small XML documents for communication between systems. Refer to everything by name, and you gain a lot of flexibility in how and when you do deployments. The sender can add new fields, and the old version of the receiver will be totally unaffected. Then you can update the receiver when you're good and ready (and when every sender has been updated, if there are multiple).
Granted, JSON might be better, but that depends on your tools.
Admin
"There" data? [No, here data...]
ps: Look up the definition of "Begging a Question"...this has absolutely nothing to do with it. hint: It does NOT mean that a statement causes the desire to ask a question.
Admin
Admin
Not unless it's a design requirement, and you have a plan to make a proper API.
Admin
So my guess is, it's "fine a**-comb" (or, as per XKCD, a "fine-ass comb"), hence a special comb for short, sticky, curly hairs.
Admin
He didn't have any maple syrup, so he couldn't pour over the code.
Admin
Check out YAML...
Admin
No kidding? I bet if you look hard enough, you can find more errors in those two sentances. And maybe even some in what I was quoting....
Hint: Fine-toothed comb is the correct term to use here.
Admin
The point is that just because a hammer is your fave tool, everything isn't a nail.
Admin
Using XML to serialize objects is entirely reasonable. It might not always be the best choice, especially if you know that both sides of the communication will be running on similar hardware in the same datacenter, but that condition has a tendency to change. Using zlib compression on a moderate-to-large blob one is sending over the network is usually a correct decision, since the extra CPU time to run zlib is usually less than the CPU time saved by sending a smaller packet.
The only WTF here is poor code quality. The design is correct.
Admin
Nonsense, you're just not hitting it hard enough.
Admin
I would say that a "Fine-toothed comb" is a correct description for a comb with fine teeth that you use for removing lice from your hair, for example. The term for such a comb seems to be "nit comb".
A "tooth-comb" is (according to WP) an anatomical structure among lemurs, lorises and galagos where some teeth are arranged in a comb-like structure, and used by the animal for grooming itself, which probably includes removing lice or other bugs.
It seems to me either way you write it is a suitable analogy for a code debugging tool. But then again, swedish is my native tongue, so why am I having an opinion about english idioms?
Captcha: appellatio ... Yeah...
Admin
No. Unless they were planning on moving to a different client or server (and that apparently was not the case) then it's bloatware written by someone trying to be clever.
Clever people are a pain in the ass.
Start with the simplest thing that could possibly work and if that fits the bill, do it and move on.
Admin
I stand corrected.
Admin
I fail to see a problem here. This is a well thought-out example of the Matryoshka Doll design pattern.
Admin
Meh. A real XML programmer would have base64-encoded the zipped string, embedded it in a new XML string, and sent it on its merry freakin' way.
Admin
Two wrongs don't make a right. "Fine" modifies "toothed", and together those modify "comb", so "fine-toothed" was correct, regardless of what Truss might say. Notice that you wouldn't say "a toothed comb" because teeth are expected on a comb, but if there's something particular about the teeth on the comb, you have to specify.
Some examples to make the point: She went to the store with a red hair-boy? Or with a red-haired boy? They rode down the trail on their knobby tire-cycles? Or on knobby-tired cycles? She dreamed that she was pursued by a green eye-monster? Or a green-eyed monster?
Admin
Admin
Also: optimism sucks.
Admin
Fair enough. No experience with that domain, so I'll accept that correction.
Admin
YHBT etc etc
Admin
Admin
This process reminds me of one of my old jobs. I was an intern working on a Java 1.4 application that was never directly accessed from outside our own distributed JARs. The call to start the application was a hashmap of key-value pairs, which varied in types from numbers to full objects. It was expecting back a hashmap with four values, two dates and two currency representations. That's where the process went a bit hazy:
XML Conversions: 2 Loss of data due to string requirements: Check Network requests: 0
Enterprisey? You betcha.
Admin
No, the New Hammer is unproven and scary. It may not work at all. Replacing it would be a huge unnecessary risk. The one we have now still works if you duct tape the head back on every week or so. What are you complaining about?
Admin
Large data set needed compression. So wouldn't it need to be serialized ?
That's how it became a mess.
Admin
Some people, when presented with a problem, think "I know, I'll use XML."
Admin
Ah, but if the noun were the compound word "hair-boy" (similar to a water boy?) and you were referring to the red one, not the green one, then "red hair-boy" would be correct. Truss's claim is that some archaic thing called a tooth-comb is the source of that idiom. But never mind what a tooth-comb is--what I really want to know is how the hell did I end up turning into a grammar troll? (Or grammar-troll, if you prefer.)
Admin
I've never read "Eats, Shoots and Leaves" -- I'd like too, just haven't gotten around to hit -- but this doesn't make sense.
The conventional rule of grammar is, well, here's a quote from http://www.grammarbook.com/punctuation/hyphens.asp: "Generally, hyphenate between two or more adjectives when they come before a noun and act as a single idea." If it was a toothed comb, and it also happened to be a fine comb (like, "Well this comb is fine for the job"), then we'd write "a fine tooth comb". But as it's the teeth that are fine and not the comb, we write "fine-tooth comb".
A "fine tooth-comb" would be a tooth-comb that is fine.
thefreedictonary.com has an entry for "fine-tooth comb" and no entry for "fine tooth-comb". I just did a Google search and found hundreds of entries for "fine-tooth comb" and none for "fine tooth-comb".
My conclusion: I'll have to read ESL and see just what it says. But "fine-tooth comb" is correct in context.
Admin
If you take out the DCOM layer in the middle it seems a lot like a VERY modern web platform, including the zlib compression.