- 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
excellent
Admin
Don't know about him, but I sure do. It's notoriously unsafe and the culprit of many security holes in c/c++ software. Many big software houses that take security seriously either banned the use of it, or you need a very good reason to use it.
Admin
I would really like to know what would happen if one of the "fixed lenght" fields were to contain, say, a lesser-than sign.
If the producer is as badly written as this consumer it would just write the sign and any real parser would actually fail. Now that would be funny.
Admin
Same if you keep a wanker.
Admin
Welcome back Topcod3r! Haven't seen you for a while.
Admin
Actually, I participate in TopCoder competitions. But still, I am not convinced, that XML is a panacea for all programming problems
Admin
Admin
Admin
Admin
Admin
Jebus, what a bunch of obnoxious, arrogant dweeb you appear to be.
Admin
Admin
Admin
According to Google, the Chinese for WTF is 什么他妈的.
(Wait for it... wait for it... and TDWTF is now banned in China.)
Admin
Now if he'd been depending on the order of attributes within a single node, that would be a really deep WTF…
Admin
Yes, hungarian notation, especially the systems variant is bad and ugly; as it doesn't carry semantic information. If you need to use it, you're not naming your identifiers well.
Better:
Admin
No, that was just an example. :)
Good point! Maybe I even did this. There are many interesting uses of C++ operators by the way. For example, the following five statements can be combined into one.
No, that's for self-anonymization...
Admin
You may want to optimize this:
word[0] = array[0]; for(;;)
This makes the infinite loop faster and protects word[0] from being worn out because it's overwritten incessantly... and moreover you save on a variable ("i")!
Admin
You'd better stay "in the gray mass"...
Admin
He did it so that I could still read it at work despite a stupid web filter.
Admin
English has only 5 vowels. I'd guess at English.
Admin
Wylie E. Coyote begs to differ.
Admin
Admin
Admin
For the last month or so, we have had this topic in our irc channel;
14:32 -!- Topic for #someproject: Reimplementing Someproject: < somenewdeveloper> i'm not terribly worried, i mean the protocol is xml-based, how difficult can it be?
Admin
Yer a sick pup. Maybe you need to locked away somewhere with the guy with the (pieces of) wood.
Or self-(something else)ation?
Admin
XML-- ?
Admin
I was working in a COBOL shop once where they were complaining that the company sending the XML was a bunch of liars because they said they hadn't changed the format of the XML when they had.
It turns out both were right. It had gone from a bandwidth-optimized single-line XML to a pretty-printed XML, but the files were identical from an XML perspective.
30 hours later, the COBOL programmer was able to fix it. Until the next time it "didn't change".
Admin
how exactly is this reading xml if its just doing loads of substrings on the same line? I dont get it?
Admin
Actually, Y is a vowel. And sometimes even W may be a vowel, although that's mostly just for words that we've ahem borrowed, yeah that's it borrowed, from other languages.
Admin
And have you measured speed of processing the file using XML DOM? I think previous solution was made due to performance reasons. I'm sure performance has significally decreased after you rewritten the code in that way. Almost you've got no benefit from your "correct" way of parsing the file.
Admin
Admin
I got handed a project to optimize where the previous developer had done the exact same thing, treated the XML file as a regular ASCII text file. Guess what the first thing I optimized was?
Admin
That remembers me a recent story from one of my Java dedicated fellows.
He has been creating as a consultant some kind of tool that was to generate some kind of reports into simple XML format. Sounded easy - not until he send them tool to generate reports and they tried to import results into their system.
"Your XML has wrong format" - he was told. - "It appears that you put TAGS in the WRONG ORDER!".
I passed...
Admin
Don't worry. I'm sure the functions are all secretly overloaded anyway to properly use XML DOM.
Admin
ROFLMAO
Admin
Sh!t dude... that's nothing. I've seen that same cr@p done in sql. SubString like a mutha!
Admin
What I see here is a column-conscious legacy data file that's been wrapped in XML, probably a CDATA -- although it's hard to tell, not knowing what's in FindHeaderString(). The various fields are too close together for them to be individually tagged XML. Because it's not tagged internally, and column-conscious, how else to parse it? Sure, it might be better to parse out the items and put them individually into the XML upstream from this code, but that's not the fault of this code.
Admin
Why not use DOM to fetch the cdata node before you substring parse?
Admin
Why not use DOM to fetch the cdata node before you substring parse?
Admin
Always nice too see that the flat file society is growing See my submissions: thedailywtf.com/forums/53714/ShowPost.aspx thedailywtf.com/forums/39000/ShowPost.aspx :-)