Re: File browser
Peter Duniho wrote:
On Tue, 05 Feb 2008 19:36:02 -0800, Lew <lew@lewscanon.com> wrote:
[...]
Me, I'm shocked at how hard people resist making programs more
maintainable, and spend many ergs arguing how less safe idioms are
actually acceptable. I guess they never had to maintain software
themselves, or they'd come down a lot more on the side of *good*
practices and *safer* programming idioms.
You are misinterpeting the situation here.
I am not proposing to write code in violation of recommendations. I am
proposing to know the difference between what is guaranteed not to work,
and what is simply recommended so as to ensure something always works
without additional effort.
But hey, argue all you want for unsafe, buggy code idioms. Go for
it. Just don't write any software I have to use, please.
What's the point in implying that people will actually disobey the
recommendation? Trying to get more information in no way implies that
one is going to go off and write software that doesn't comply with the
tutorial's recommendation. And while I intend to take the tutorial's
recommendation seriously, I'll point out that IMHO a tutorial is a long
way off from an API specification or documentation. I've seen far too
many flawed tutorials and code samples to think that a tutorial is the
last word on how to use an API.
Granted, the Java API is not all that thoroughly documented in many
areas, and the tutorials do serve an important role in filling those
gaps. But it's the API documentation that is the last word (well, at
least next-to-the-last word...I suppose the last word is really had by
the implementation itself :) ).
Pete
I think the point that we all need to accept is that code that doesn't
follow this recommendation may /appear/ to work, so in that since it
isn't a must.
The reason that Lew and I have been so vehement about it being a "must"
is that someone who doesn't understand why will read the "it's a
recommendation, not a must", and decide that they don't need to do it
themselves because it works fine. This is faulty reasoning to be sure,
but we want to eliminate all doubt about whether or not you should use
the EDT.
As this is a public forum where plenty of "newbies" look for
information, it is our social responsibility to provide as accurate
information as possible, in as unambiguous way as possible.
To be fair, Swing code *can* appear to work without using the EDT
explicitly, but is just an appearance that could break unexpectedly.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>