*sigh*... Why do I even try? A novlet on StackOverflow
-
A method called main() could maybe exist in some patterns badly applied. Like, let's say I decide I'm going to get Inner System and make a Process class. B/c/o raisins.
-
I think the following question epitomizes the StackOverflow experience; I'm not sure if it's a meme, but it's certainly one around the office...
Both the asker and the answerer seem have an incredibly high number of reps (I guess?), and both need to be slapped upside the head. I think the Pounding a Nail: Glass Bottle or Old Shoe question/answer scenario I wrote about a decade ago is less idiotic than these guys.
I should get started on that "Making the Internet a worse place" soapbox/rant about...
-
Edit: there's also this one: http://stackoverflow.com/a/1732454/2664560
Here's a summary of the edit history of that answer:
[snip huge edit war]
-
Here's a summary of the edit history of that answer:
What a moderator-fight! It figures who was involved too…
-
Both the asker and the answerer seem have an incredibly high number of reps (I guess?), and both need to be slapped upside the head.
It's not super-high as these things go, and could have been acquired after they both wrote their pieces of idiocy. (BTW, does .NET really not check if the source and destination types of arrays being copied between match?! If so, does it at least only permit it between what are effectively value types? It'd be a foul hole in things otherwise…)
-
This post is deleted!
-
The worst part of the answers to that question is that the documentation for the
string
class has an example of how to do it as part of itsShowHexValue
sample.Edit: That's assuming people know that
string
is a set of utf-16char
s.
-
You're thinking at the wrong abstraction layer. We don't want to display the bytes, as that would require interpreting them. We just want to know what the bytes are, so we can use BlockCopy.
-
What exactly are we going to do with the bytes if we're never going to do anything with them?
Oh, right.
-
It works kinda like futures.
-
By the way, if you want to turn a
string
into a[]byte
in Go, you just do[]byte("whatever")
.
-
If I'm
reinventing the wheelwriting a hex editor in .NET do I really care how they bytes are interpreted? Maybe. Ish. Something-something-duck-sauce.Why the fuck doesn't disco-sauce have a god-damned duck emoji? I assume raisins.
-
writing a hex editor in .NET
Why would that use strings? You shouldn't be loading binary files as strings in any language.
-
Because:
System.StreamReader.ReadToEnd()
exists?
-
-
So Google hasn't learned why using a gun as a toe-nail-clipper isn't a bad idea?
-
For things that need the entire file in memory anyway, it's nice to not have to fiddle around with opening a file, reading its contents into a buffer, and then closing the file and handling any errors that may have come up along the way. For example, I use that in my HQ9++ compiler, because the Q command needs the entire source code of the program at runtime.
-
http://sourceforge.net/projects/hexbox/reinventing the wheelwriting a hex editor in .NETreinventing the wheel
There's even a package for it in Debian.
-
Why the fuck doesn't disco-sauce have a god-damned duck emoji? I assume raisins.
The emoji set is standard. Blame the Unicode Consortium.
-
-
The question which gives me the most points is still this one:
That's from 2009 and the only reason is because it seems to be the first one of its kind.
-
Because:
System.StreamReader.ReadToEnd()
exists?What does that class do again? Oh right, it...
Implements a TextReader that reads characters from a byte stream in a particular encoding.
So, in other words, because you're using the wrong class for reading binary data.