Mind you, I have no objection to providing code to help the OP.
I do have a real objection to one ignoring advice that lacks every last
freaking detail of the code and prevents the querent from having to do
any work whatsoever. The OP pretended that your answer came out of
nowhere, and that no one else had suggested the same thing, as if the
lack of code made the other answer(s) any less valuable.
Yes, that was an unacceptable snub.
If they really didn't see the value of being told, "Custom Comparator.
Load the entries into a SortedSet with that Comparator." then they
should have *asked* about it. Then when you gave the code for that (I
assume that's what they were really answering, not the post to which
they actually replied) they pretended like you were the first to even
suggest such a thing in answer to their question.
You may be right that laredotornado is just too lazy to do his own
programming.
I have a terrible vice of optimism. I think that for someone who doesn't
know about the collections API, and hasn't built up a general
understanding of the 'Tao of Java', if you will, that will let them grok
it from reading the docs, advice such as you gave, correct though it is,
might as well be in Greek. In that case, a picture is worth a thousand
words, and in programming a picture is a snippet.
Imagine if you were learning to maintain tractors, and you asked on a
tractor newsgroup about how to fix a noisy second gear, and someone said
"Tappet rod shim. Run the treadle via a coupling cone using that shim.",
would you be confident in going off to do that? Would you even know what a
sensible question to ask in response was? On the other hand, if someone
gave you detailed instructions, or ideally showed you how to do it, you'd
be able to do it, and if you were a smart person, you'd be looking at that
and figuring out how it works, and so learning how to do something similar
in future. I think there's enormous educational value in examples.
laredotornado, you are not going to make real progress in computer
programming until you grasp how to take a topic suggestion into code.
Yes. The theory advanced in the preceding paragraph hinges on "if you were
a smart person", and that's what's not clear in the OP's case. If this guy
is still around in two years asking the same entry-level questions, then
the theory will have been disproven, and i ought to start leaving him to
stew.
There are wise people out there, for example Roedy Green, who will give
you a signpost to the restaurant instead of a sandwich. Feed a man a
meal and you feed him for an hour; send him to the diner and you feed
him for a lifetime.
Send him to a diner in Bulgaria and he'll still starve, because he doesn't
know what to order.
tom