- 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
C'mon!
How else do you de-allocate memory and empty disks except by sending negative bytes? /dev/null actually emits negative bytes, you can prove this pip reading from /dev/null via an inverting pipe.
It's a bit bit like the Look Around You episode extolling the virtues of negative currency.
Admin
ROFL
Admin
XML - eXtra Morons Lobotomized
Admin
I think it was Hunter S Thompson who once said, "I hate to advocate drugs, alcohol, XML, or insanity to anyone, but they've always worked for me." But I may have just dreamed that after some particularly dodgy Ibogaine.
Admin
BUT we still haven't taken into account that there is apparently two spaces in front of each tag pair, and a newline after each tag pair, for a grand total of 20.5x.
This is the definition of enterprisey...
Admin
That really makes my head hurt.
Please stop doing it.
Admin
And try being on the receiving end of an uncompressed BMP embedded in an e-mail sent out weekly by a local hotel chain advertising the same deals with no unsubscribe/opt-out (even after calling the F&B director). OK, so 2MB isn't too much to download nowawdays, but I've even sent back a compressed JPEG of the same image at decent quality for 25KB to try and help them and nothing has come of it.
Admin
That'll give you an int between 0-255. Casting back to byte also works as it should, i.e. the bits are correct, though if you print it out or look in a debugger it'll look "signed".
Admin
Admin
Base64 encoding anyone?
Admin
WTF?? Why not Base[16|32|64]?
Admin
Perhaps I'm missing something, but wouldn't CSV be a little less wasteful?
Admin
Don't forget about the indentation and the CR/LF. What would be even cooler is if the bytes tag had attributes like type=signed.
Admin
That example wouldn't solve interoperability at all; you'd just change the signed vs unsigned problem in to an endianness problem!
Admin
Hmmm... xml ... like a hot date with uml thurman...
Admin
Turns out a major benefit to this representation is that it compresses MUCH better than the original.
Admin
Ehrm... Are you serious? Images are nowhere near suited for the XML code as you describe it. As stated before: your image size would explode this way... Images should always be stored in a binary format if you ask me.
Admin
Admin
Admin
XML isn't really even a language, just a specification of how you're supposed to write your own language.
Admin
Errm, that isn't a PNG file (in Matt's example) that's a PDF file. I hope it's an uncompressed PDF then we might get upto a gigabyte per page then.
Admin
In C#/.NET if you have a property called "bytes" (with lower case first letter, against convention), which of type byte[] that is the default way it is serialized by the System.XML.Serialization.
Of course, you should apparently NOT use the default behavior, but add a property such as string Base64Bytes that does the necessary conversion, and add [XmlIgnore] attribute to the raw byte array.
XML serialization is my favorite feature in .NET (time saver in its own league), and it really hurts me to see it used in such a horrible way.
Admin
Admin
The real WTF is that the spec says they are right!
http://www.w3.org/TR/xmlschema-2/#byte
the real wtf the real wtf the real wtf the real wtf the real wtf the real wtf the real wtf
Admin
That's clearly a professional enterprise-ready mission-critical turnkey five-nines HA business solution.