Java Programming Best Practices

Discussion in 'Java' started by clusardi2k@aol.com, Jul 21, 2012.

  1. Guest

    I have a dozen books on java, but no book specifically on best practices. What do you think. Will some thing short suffice.

    Thank you,
    , Jul 21, 2012
    #1
    1. Advertising

  2. Eric Sosman Guest

    On 7/21/2012 10:19 AM, wrote:
    > I have a dozen books on java, but no book specifically on best practices. What do you think. Will some thing short suffice.


    I like "Effective Java" by Josh Bloch. This book is about
    best practices down in the trenches: How to write good Java code
    and what to avoid that would make it less good. It's not much
    concerned with best practices at the Big Picture level -- system
    design, data integrity and security, etc. -- but an excellent
    resource at the let's-write-some-code level.

    --
    Eric Sosman
    d
    Eric Sosman, Jul 21, 2012
    #2
    1. Advertising

  3. Arne Vajhøj Guest

    On 7/21/2012 10:19 AM, wrote:
    > I have a dozen books on java, but no book specifically on best practices. What do you think. Will some thing short suffice.


    Best practices of exactly what?

    If it is general Java coding techniques, then I completely agree
    with Eric's recommendation of "Effective Java".

    But if it is web apps, XML, web services, EJB's, multithreaded
    or any other specialized topic, then other books may be relevant.

    Arne
    Arne Vajhøj, Jul 21, 2012
    #3
  4. Roedy Green Guest

    Roedy Green, Jul 21, 2012
    #4
  5. Arne Vajhøj Guest

    On 7/21/2012 5:55 PM, Roedy Green wrote:
    > On Sat, 21 Jul 2012 10:53:39 -0400, Eric Sosman
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >
    >> I like "Effective Java" by Josh Bloch.

    >
    > ditto. http://mindprod.com/book/9780321356680.html


    It is not difficult to Google.

    Of course Google would produce links without
    referrals.

    Arne
    Arne Vajhøj, Jul 22, 2012
    #5
  6. Philip Brown Guest

    On Saturday, July 21, 2012 11:41:59 PM UTC-7, Lew wrote:
    > mindprod.com has the best overall advice about Java, minus a few glitches here
    > and there but always well meant.


    Please don't spread hate propaganda.

    When any site makes statements, in its top paragraph no less, such as

    "XYZ is the #1 source of evil on the planet today." against a group of people collectively, that is pretty much the definition of hatred, prejudice, and bigotry.

    Pretty ironic and hypocritical, given that I'm guessing they would claim they are "fighting hatred and intolerance".


    To the curious reader:
    If you cannot agree with the above statement as-is, and have to check specifically what the "XYZ" above is, to say "Well, if it's (this) group, its okay, but if it's (that) group, well, that's just bigoted"...
    that in itself would be hypocritical.
    Philip Brown, Jul 22, 2012
    #6
  7. Lew Guest

    Philip Brown wrote:
    > Lew wrote:
    >> mindprod.com has the best overall advice about Java, minus a few glitches here
    >> and there but always well meant.

    >
    > Please don't spread hate propaganda.


    I said, "about Java", and I am not spreading hate propaganda here.

    > When any site makes statements, in its top paragraph no less, such as
    >
    > "XYZ is the #1 source of evil on the planet today." against a group of people collectively, that is pretty much the definition of hatred, prejudice, and bigotry.


    If "XYZ" is a racial, ethnic or gender distinction you're right. If "XYZ" is
    someone or group of someones excoriated for their choices, not their inherent
    being, you're wrong.

    > Pretty ironic and hypocritical, given that I'm guessing they would claim they are "fighting hatred and intolerance".
    >
    >
    > To the curious reader:
    > If you cannot agree with the above statement as-is, and have to check specifically what the "XYZ" above is, to say "Well, if it's (this) group, its okay, but if it's (that) group, well, that's just bigoted"...
    > that in itself would be hypocritical.


    Bullcrap.

    You fail to distinguish hate speech, which targets people based on their
    inherent characteristics, from criticism, which targets people based on their
    actions.

    You don't get to simplistically sloganize morality and lock everyone else into
    your idiolectic definitions.

    I stand by my claim that Roedy's site gives generally decent information about
    Java. Agree or disagree with his politics, but if you're going to accuse him
    of "hate propaganda", you'd better be ready to back that up with actual
    evidence, not vague handwaving and slander about political discourse with
    which you personally happen to disagree.

    --
    Lew
    Honi soit qui mal y pense.
    http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
    Lew, Jul 22, 2012
    #7
  8. Philip Brown Guest

    On Sunday, July 22, 2012 1:07:17 PM UTC-7, Lew wrote:
    >> Philip Brown wrote:

    >
    >> Please don't spread hate propaganda.

    >
    >> When any site makes statements, in its top paragraph no less, such as

    >
    >> "XYZ is the #1 source of evil on the planet today." against a group of people collectively, that is pretty much the definition of hatred, prejudice, and bigotry.

    >
    > If &quot;XYZ&quot; is a racial, ethnic or gender distinction you're right. If &quot;XYZ&quot; is
    > someone or group of someones excoriated for their choices, not their inherent
    > being, you're wrong.
    >


    So you're saying it's wrong to be bigoted against people because of ethnicity or gender, but its perfectly fine for any other reason.
    And words like " I would be interested in hearing your ideas about would could be done to help eliminate XYZ", and comparing that group of people, to a disease, is just fine.
    Interesting.

    Personally, my view is that if bigotry is wrong, then it's wrong for any and all reasons.
    (In the same way that if someone is for "free speech", they should support speech they dont agree with... if someone is against bigotry, they should be uniformly against it, even when directed against groups they dont personally like)


    Let's try this for size:

    "Hindus are a crazy messed up people. They're like a disease. Let's do everything we can to eliminate Hinduism from the planet."

    Whether or not you agree with the statement, do you think that is hate speech?

    If you do, you're a hypocrite, since you said it wasnt when directed against a DIFFERENT group of people. If you dont think so... you might want to get a second opinion from someone outside your normal circle of acquaintances.

    PS:
    >You fail to distinguish hate speech, which targets people based on their
    > inherent characteristics, from criticism, which targets people based on their
    > actions.



    hate speech is hate speech, no matter whether it's directed at "inherent characteristics", or "I hate everyone whose first name starts with the letter Q"

    Legal != moral. Legally,I can go stand up in a public square and rant about how much I hate people who have names starting with Q. Clearly, that's hate speech, even though there is no legal recognition of it.

    But even from a legal standpoint, religion is a protected characteristic, so that site is clearly engaging in hate speech.
    Philip Brown, Jul 22, 2012
    #8
  9. Lew Guest

    On 07/22/2012 01:43 PM, Philip Brown wrote:
    > On Sunday, July 22, 2012 1:07:17 PM UTC-7, Lew wrote:
    >>> Philip Brown wrote:

    >>
    >>> Please don't spread hate propaganda.

    >>
    >>> When any site makes statements, in its top paragraph no less, such as

    >>
    >>> "XYZ is the #1 source of evil on the planet today." against a group of people collectively, that is pretty much the definition of hatred, prejudice, and bigotry.

    >>
    >> If &quot;XYZ&quot; is a racial, ethnic or gender distinction you're right. If &quot;XYZ&quot; is
    >> someone or group of someones excoriated for their choices, not their inherent
    >> being, you're wrong.
    >>

    >
    > So you're saying it's wrong to be bigoted against people because of ethnicity or gender, but its perfectly fine for any other reason.


    I did not say that.

    You misquoted me.

    I said nothing about whether it's right to be bigoted. Instead, thank you for
    disingenuously misstating my point, I said that it is not bigotry to castigate
    someone for their behavior.

    You are engaging in begging the question and straw-man arguments.

    And not talking about
    > And words like " I would be interested in hearing your ideas about would could be done to help eliminate XYZ", and comparing that group of people, to a disease, is just fine.
    > Interesting.
    >
    > Personally, my view is that if bigotry is wrong, then it's wrong for any and all reasons.
    > (In the same way that if someone is for "free speech", they should support speech they dont agree with... if someone is against bigotry, they should be uniformly against it, even when directed against groups they dont personally like)


    Fine, if we were discussing someone's bigotry, which we aren't.

    We're discussing Roedy's political statements, which are not bigoted.

    > Let's try this for size:
    >
    > "Hindus are a crazy messed up people. They're like a disease. Let's do everything we can to eliminate Hinduism from the planet."
    >
    > Whether or not you agree with the statement, do you think that is hate speech?
    >
    > If you do, you're a hypocrite, since you said it wasnt when directed against a DIFFERENT group of people. If you dont think so... you might want to get a second opinion from someone outside your normal circle of acquaintances.


    I never said any such thing. You made that up out of whole cloth.

    >
    > PS:
    >> You fail to distinguish hate speech, which targets people based on their
    >> inherent characteristics, from criticism, which targets people based on their
    >> actions.

    >
    >
    > hate speech is hate speech, no matter whether it's directed at "inherent characteristics", or "I hate everyone whose first name starts with the letter Q"


    You are like Humpty Dumpty in _Through the Looking Glass_: "When I use a word,
    it means exactly what I choose it to mean, no more, no less."

    But your definitions happen to be wrong.

    Hate speech is hate speech, as you so circularly claim, but speech excoriating
    someone's actions is not hate speech.

    You don't get to just make up your own definitions.

    > Legal != moral. Legally,I can go stand up in a public square and rant about how much I hate people who have names starting with Q. Clearly, that's hate speech, even though there is no legal recognition of it.


    Wonderful _non sequitur_, absolutely impressive in its irrelevancy.

    > But even from a legal standpoint, religion is a protected characteristic, so that site is clearly engaging in hate speech.


    Huh? Religion?

    And religion is a matter of choice, so one is perfectly free to speak against
    the practices of any relgion, including even atheism.

    Otherwise statements like, "That church stole gazillions from gullible poor
    people" would be hate speech, which it isn't, or "That other church engages in
    hate speech" would be hate speech, which it isn't.

    You continue to slander Roedy's site with no basis.

    You need to stop using incorrect definitions, and you definitely need to stop
    derailing Java conversations with your trollery.

    Please, I ask politely, go back on topic or shut the frak up.

    --
    Lew
    Honi soit qui mal y pense.
    http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
    Lew, Jul 22, 2012
    #9
  10. On 22.07.2012 23:25, Lew wrote:
    > On 07/22/2012 01:43 PM, Philip Brown wrote:


    >> But even from a legal standpoint, religion is a protected
    >> characteristic, so that site is clearly engaging in hate speech.

    >
    > Huh? Religion?
    >
    > And religion is a matter of choice, so one is perfectly free to speak
    > against the practices of any relgion, including even atheism.


    I think you are arguing from very different legal systems here. If
    anything, Philip you should mention the legal basis you are arguing
    from. The US, for example and as far as I know, are strictly liberal
    when it comes to freedom of speech. In the US you are allowed to say
    things which are banned, for example, in Germany (for historic reasons).

    I don't think Roedy's statements qualify as hate speech (and I come from
    Germany which has a more restrictive approach to freedom of speech).
    Whether you think those claims are true or not, or even good to have
    that on the site is a totally different question.

    Cheers

    robert

    --
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/
    Robert Klemme, Jul 22, 2012
    #10
  11. Daniel Pitts Guest

    On 7/21/12 6:59 PM, Arne Vajhøj wrote:
    > On 7/21/2012 5:55 PM, Roedy Green wrote:
    >> On Sat, 21 Jul 2012 10:53:39 -0400, Eric Sosman
    >> <> wrote, quoted or indirectly quoted
    >> someone who said :
    >>
    >>> I like "Effective Java" by Josh Bloch.

    >>
    >> ditto. http://mindprod.com/book/9780321356680.html

    >
    > It is not difficult to Google.
    >
    > Of course Google would produce links without
    > referrals.

    And yet, google would still somehow make money on the search. Perhaps
    its not a bad thing to link to a relevant page which also provides the
    linker with some financial incentive to link in the first place?
    Daniel Pitts, Jul 23, 2012
    #11
  12. Arne Vajhøj Guest

    On 7/22/2012 7:11 PM, Daniel Pitts wrote:
    > On 7/21/12 6:59 PM, Arne Vajhøj wrote:
    >> On 7/21/2012 5:55 PM, Roedy Green wrote:
    >>> On Sat, 21 Jul 2012 10:53:39 -0400, Eric Sosman
    >>> <> wrote, quoted or indirectly quoted
    >>> someone who said :
    >>>
    >>>> I like "Effective Java" by Josh Bloch.
    >>>
    >>> ditto. http://mindprod.com/book/9780321356680.html

    >>
    >> It is not difficult to Google.
    >>
    >> Of course Google would produce links without
    >> referrals.

    > And yet, google would still somehow make money on the search.


    Of course. I think most people understand that Google is a business
    and that they make money from ads.

    > Perhaps
    > its not a bad thing to link to a relevant page which also provides the
    > linker with some financial incentive to link in the first place?


    I am not generally against people making money on being helpful.

    If Roedy has been the first to suggest that book with the link
    and the page had contained a note explaining that he would make
    money if the reader clicked the link and bought the book then
    I would certainly not have posted anything.

    If just one of the these has been the case, then I would
    probably not have posted either.

    But trying to make money from usenet without really
    providing any help and hiding that one is making money
    is a tad too greedy in my book.

    Arne
    Arne Vajhøj, Jul 23, 2012
    #12
  13. Arne Vajhøj Guest

    On 7/22/2012 7:11 PM, Daniel Pitts wrote:
    > On 7/21/12 6:59 PM, Arne Vajhøj wrote:
    >> On 7/21/2012 5:55 PM, Roedy Green wrote:
    >>> On Sat, 21 Jul 2012 10:53:39 -0400, Eric Sosman
    >>> <> wrote, quoted or indirectly quoted
    >>> someone who said :
    >>>
    >>>> I like "Effective Java" by Josh Bloch.
    >>>
    >>> ditto. http://mindprod.com/book/9780321356680.html

    >>
    >> It is not difficult to Google.
    >>
    >> Of course Google would produce links without
    >> referrals.

    > And yet, google would still somehow make money on the search.


    Of course. I think most people understand that Google is a business
    and that they make money from ads.

    > Perhaps
    > its not a bad thing to link to a relevant page which also provides the
    > linker with some financial incentive to link in the first place?


    I am not generally against people making money on being helpful.

    If Roedy has been the first to suggest that book with the link
    and the page had contained a note explaining that he would make
    money if the reader clicked the link and bought the book then
    I would certainly not have posted anything.

    If just one of the these has been the case, then I would
    probably not have posted either.

    But trying to make money from usenet without really
    providing any help and hiding that one is making money
    is a tad too greedy in my book.

    Arne
    Arne Vajhøj, Jul 23, 2012
    #13
  14. markspace Guest

    On 7/22/2012 3:43 PM, Robert Klemme wrote:

    > I don't think Roedy's statements qualify as hate speech (and I come from
    > Germany which has a more restrictive approach to freedom of speech).



    Furthermore I recall that Roedy lives in Canada, and maintains his web
    presence there, complicating the whole "US law" thing even more. (What
    treaties exist to cover speech? I don't know.)
    markspace, Jul 23, 2012
    #14
  15. Eric Sosman Guest

    On 7/22/2012 6:43 PM, Robert Klemme wrote:
    > On 22.07.2012 23:25, Lew wrote:
    >> On 07/22/2012 01:43 PM, Philip Brown wrote:

    >
    >>> But even from a legal standpoint, religion is a protected
    >>> characteristic, so that site is clearly engaging in hate speech.

    >>
    >> Huh? Religion?
    >>
    >> And religion is a matter of choice, so one is perfectly free to speak
    >> against the practices of any relgion, including even atheism.

    >
    > I think you are arguing from very different legal systems here. If
    > anything, Philip you should mention the legal basis you are arguing
    > from. The US, for example and as far as I know, are strictly liberal
    > when it comes to freedom of speech. In the US you are allowed to say
    > things which are banned, for example, in Germany (for historic reasons).
    >
    > I don't think Roedy's statements qualify as hate speech (and I come from
    > Germany which has a more restrictive approach to freedom of speech).
    > Whether you think those claims are true or not, or even good to have
    > that on the site is a totally different question.


    Here's something I know about R.G.: He favors vigilantism
    and vandalism as a means of regulating the Internet. See the
    thread he started this past Valentine's Day titled "the Olson
    Timezone Database," in which he writes (apparently in haste, but
    he reaffirmed his position in follow-ups):

    "A hope Anonymous soon gets round to putting these
    unprintables out of business."

    --
    Eric Sosman
    d
    Eric Sosman, Jul 23, 2012
    #15
  16. On 7/22/2012 8:18 PM, markspace wrote:
    > On 7/22/2012 3:43 PM, Robert Klemme wrote:
    >
    >> I don't think Roedy's statements qualify as hate speech (and I come from
    >> Germany which has a more restrictive approach to freedom of speech).

    >
    >
    > Furthermore I recall that Roedy lives in Canada, and maintains his web
    > presence there, complicating the whole "US law" thing even more. (What
    > treaties exist to cover speech? I don't know.)


    There's some blathering about freedom of speech in the UN Declaration of
    Human Rights, but it's vague on where freedom of speech stops. The
    Durham Conference produced a toothless document a few years ago, but
    considering that several notable countries boycotted, it's not really
    worth talking about.

    The US has extremely liberal free speech laws--hate speech is actually
    protected free speech here; considering that, e.g., Arab countries have
    attempted to push for making defamation against (read: criticism of)
    religion not-free speech, it's very doubtful that any treaty the US
    would agree to would be tenable to the rest of the world.

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
    Joshua Cranmer, Jul 23, 2012
    #16
  17. On 7/22/2012 5:25 PM, Lew wrote:
    > On 07/22/2012 01:43 PM, Philip Brown wrote:
    >> On Sunday, July 22, 2012 1:07:17 PM UTC-7, Lew wrote:
    >>>> Philip Brown wrote:
    >>>
    >>>> Please don't spread hate propaganda.
    >>>
    >>>> When any site makes statements, in its top paragraph no less, such as
    >>>
    >>>> "XYZ is the #1 source of evil on the planet today." against a group
    >>>> of people collectively, that is pretty much the definition of
    >>>> hatred, prejudice, and bigotry.
    >>>
    >>> If &quot;XYZ&quot; is a racial, ethnic or gender distinction
    >>> you're right. If &quot;XYZ&quot; is
    >>> someone or group of someones excoriated for their choices, not their
    >>> inherent
    >>> being, you're wrong.
    >>>

    >>
    >> So you're saying it's wrong to be bigoted against people because of
    >> ethnicity or gender, but its perfectly fine for any other reason.

    >
    > I did not say that.
    >
    > You misquoted me.
    >
    > I said nothing about whether it's right to be bigoted. Instead, thank
    > you for disingenuously misstating my point, I said that it is not
    > bigotry to castigate someone for their behavior.


    And the relevancy is?

    The political parts of Roedy's web site seems at be very
    negative towards entire groups without evaluating any
    individual behavior.

    > You are engaging in begging the question and straw-man arguments.
    >
    > And not talking about
    >> And words like " I would be interested in hearing your ideas about
    >> would could be done to help eliminate XYZ", and comparing that group
    >> of people, to a disease, is just fine.
    >> Interesting.
    >>
    >> Personally, my view is that if bigotry is wrong, then it's wrong for
    >> any and all reasons.
    >> (In the same way that if someone is for "free speech", they should
    >> support speech they dont agree with... if someone is against bigotry,
    >> they should be uniformly against it, even when directed against groups
    >> they dont personally like)

    >
    > Fine, if we were discussing someone's bigotry, which we aren't.
    >
    > We're discussing Roedy's political statements, which are not bigoted.


    The before mentioned parts of his web site does seem to fit the
    definition of bigotry pretty well.

    A very one sided and rather extreme point of view with a tendency
    to ignore facts on certain topics.

    >> PS:
    >>> You fail to distinguish hate speech, which targets people based on their
    >>> inherent characteristics, from criticism, which targets people based
    >>> on their
    >>> actions.

    >>
    >>
    >> hate speech is hate speech, no matter whether it's directed at
    >> "inherent characteristics", or "I hate everyone whose first name
    >> starts with the letter Q"

    >
    > You are like Humpty Dumpty in _Through the Looking Glass_: "When I use a
    > word, it means exactly what I choose it to mean, no more, no less."
    >
    > But your definitions happen to be wrong.
    >
    > Hate speech is hate speech, as you so circularly claim, but speech
    > excoriating someone's actions is not hate speech.
    >
    > You don't get to just make up your own definitions.


    Given that having a first name that starts with Q is
    not an action of that person (unless he changed his
    name himself), then I can not see that example
    conflict with your definition.

    >> But even from a legal standpoint, religion is a protected
    >> characteristic, so that site is clearly engaging in hate speech.

    >
    > Huh? Religion?
    >
    > And religion is a matter of choice, so one is perfectly free to speak
    > against the practices of any relgion, including even atheism.
    >
    > Otherwise statements like, "That church stole gazillions from gullible
    > poor people" would be hate speech, which it isn't, or "That other church
    > engages in hate speech" would be hate speech, which it isn't.


    But it would be hate speech to say that "Everybody belonging to that
    church are thieves".

    Arne
    Arne Vajhøj, Jul 23, 2012
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. karim
    Replies:
    0
    Views:
    444
    karim
    Jul 13, 2003
  2. John Dalberg
    Replies:
    3
    Views:
    560
    samuelhon
    Nov 16, 2006
  3. swille

    programming best practices

    swille, Nov 7, 2005, in forum: Ruby
    Replies:
    15
    Views:
    188
    Stu Glaser
    Nov 12, 2005
  4. harshal
    Replies:
    9
    Views:
    194
    Pedro Del Gallego
    Mar 11, 2008
  5. Chicken McNuggets

    Best book on C gotchas and best practices?

    Chicken McNuggets, Jul 31, 2013, in forum: C Programming
    Replies:
    9
    Views:
    255
    Fred J. Tydeman
    Aug 5, 2013
Loading...

Share This Page