Final Fantasy 2 based gamesource code

Discussion in 'Java' started by Turtle Wizard, Mar 19, 2013.

  1. Turtle Wizard, Mar 19, 2013
    1. Advertisements

  2. Turtle Wizard

    Lew Guest

    - You should follow the Java Coding Conventions, at least as far as indentation and
    naming are concerned.

    - Consider encapsulating the long initialization sequences in methods of the class
    being initialized.

    - Sequences like

    public Image getFirstCharacterLeftImage(int idx)
    return firstplayercharacter.getLeftImage(idx);

    public Image getSecondCharacterLeftImage(int idx)
    return secondplayercharacter.getLeftImage(idx);

    public Image getThirdCharacterLeftImage(int idx)
    return thirdplayercharacter.getLeftImage(idx);

    are clumsy programming. Those should be calls the the same method,
    e.g., 'getLeftImage()', from each of the first, second, third, ... instances of
    some sort of 'GameCharacter' type.

    What you've done is the antithesis of object oriented.

    - Eschew import-on-demand for single-type imports.

    - Your hierarchies are strange, for example 'CityNameDatabaseBase'. Why is that split
    into two types?

    - Speaking of 'CityNameDatabaseBase',
    protected LinkedList words = new LinkedList();


    Declare the variable as a 'List<Something>', or 'Set<Something>', or 'Collection<Something>'.
    And why did you select 'LinkedList' for the implementation? Didn't 'ArrayList' suffice?
    And really, shouldn't it be a 'Set' (to avoid duplicates) rather than a 'List'?

    - Object o = words.get(index);
    String s = (String)o;

    This is why you don't use raw types. And 'o' and 's' are nasty variable names.

    - "Copyright (C) <year> <name of author>"

    - This is not how to do i18n:
    if (language == "Dutch" || language == "dutch") {
    textlib.addText("Er is onrust in het Oosten..");
    textlib.addText("een oud kwaad is aan het herrijzen..");
    //set to "-1" for not popping up the learn widget

    itemtextlib.addText("Hopelijk heb je het niet nodig.");
    learntextlib.addText("Dulandar is dit elfen dorpje.");
    learnedanotherwordtextlib.addText("Elfen dansen en zingen graag.");

    Use resource bundles. That's what they're for.

    And so on and so on.

    I don't know how to evaluate beginner projects, but you have a ways to go.

    You need to learn object-oriented programming, and Java.
    Lew, Mar 20, 2013
    1. Advertisements

  3. Lew, I want to start with a thank you for conducting a code review on
    Turtle's project. Technically it is mostly resonable advice.

    The problem is - and I'm not sure you are aware - the tone in your review
    could be perceived as rather hostile, you even shout at one place. Do you
    think people are more prone to listen to your advice when you shout? Also
    you needlessly use negative adjectives, like "clumsy" and "strange", where
    it would suffice to describe the technical problem with the code.

    Could it be possible that people would be more inclined to take your advice
    to heart if you took another approach?

    This is usenet, and obviously you are free to post in whatever tone you
    like. However, there is something to be said for being kind to others,
    especially newbies and people you do not know.
    Fredrik Jonson, Mar 20, 2013
  4. Turtle Wizard

    Joerg Meier Guest

    Condescension is the currency of programming support. Beginners get free
    advice and help, and experienced folks get to feel superiour. Both sides
    win. Personally, I offer condescension- and agression-free advice and
    reviews at a low rate of 39,99/h (EUR, not USD).

    Don't begrudge seasoned programmers their air of superiourity. At best you
    will make them stop responding to newbies, and at worst they will leave

    Liebe Gruesse,
    Joerg Meier, Mar 20, 2013
  5. Turtle Wizard

    paul.cager Guest

    I'm hoping this is a joke and I'm looking forward to Lew quoting your message with lots of [sic]s.

    If someone offered me free advice on the condition that they can be condescending and aggressive I would consider the price they are charging too high.
    paul.cager, Mar 20, 2013
  6. It isn't my code. I don't know who the original poster is, and I'm not
    familiar with his projects. I just had to call out on Lew's tone.
    Fredrik Jonson, Mar 20, 2013
  7. People remember negative emotions better than positive emotions. So,
    present your comments as a scathing critique, and it will be better
    remembered and applied in the future than a melancholy response. :)
    Joshua Cranmer ðŸ§, Mar 20, 2013
  8. Turtle Wizard

    Joerg Meier Guest

    It's not a joke, but that reply pretty much means that internally, you feel
    the same - you enjoy pointing out my flaws.

    I, on the other hand, would be happy to know which words I spelled wrong.
    English being my 3rd language, I am always eager to know how I can improve.
    That is certainly well within your rights, and a choice some people make.
    But the reality is that if you, as a newbie, are asking stupid questions in
    programming fora, you are going to a) get help and b) get condescension.

    Most newbies seem to feel that that is well worth the trade. When I enter a
    new field that I have no experience in, I certainly consider the smug
    patronizing I know I will face in programming fora or on IRC worth the
    advice I get without having to pay for class or private tutoring.

    Liebe Gruesse,
    Joerg Meier, Mar 20, 2013
  9. Turtle Wizard

    Joerg Meier Guest

    Joerg Meier, Mar 20, 2013
  10. Turtle Wizard

    Lew Guest

    You are free to interpret my "tone" however you please, but please do understand
    that that is entirely a projection on your part.

    Every statement I made to the OP was objective and supportable by the evidence.

    Every statement I made was meant to be taken literally. If you want "tone", read it
    out loud to yourself in a robot voice, keeping inflection as neutral and unvarying
    as you can.

    I am not overly concerned with your emotional interpretation of objective statements.
    Lew, Mar 20, 2013
  11. Turtle Wizard

    Lars Enderin Guest

    2013-03-20 17:49, Joerg Meier skrev:
    The only words you misspelled were "superior(ity)". Your sig, however,
    seems to show that you feel superior to people who would try to email
    you. Why?
    Lars Enderin, Mar 20, 2013
  12. Turtle Wizard

    Joerg Meier Guest

    Ah, I thought that was the proper English spelling (as opposed to the
    American spelling) of that word. Thanks for the correction.

    My sig, while probably largely useless here since it's German, just says
    that I don't read the emails going to the account in my From:-field, since
    I only get spam there. I usually check it once every other month or so, but
    if someone were to try to contact me there, they would likely wait in vain
    for a reply.

    I just like to separate the two things, no value judgement included.

    Liebe Gruesse,
    Joerg Meier, Mar 20, 2013
  13. Turtle Wizard

    Lars Enderin Guest

    2013-03-20 23:15, Joerg Meier skrev:
    Ok. A little awkward way of saying that the email address given is a
    throwaway address and shouldn't be used. Another more common way is to
    give a fake address, for example with a domain like "invalid".
    Lars Enderin, Mar 20, 2013
  14. Turtle Wizard

    Joerg Meier Guest

    Well, it's not a fake address, and on the rare occasion, I will ask someone
    or agree to someone mailing me there, and then I'll check it. It's just
    that I don't usually do.

    Liebe Gruesse,
    Joerg Meier, Mar 20, 2013
  15. Turtle Wizard

    Arne Vajhøj Guest

    First, it was not Fredrik's code. So I will give you the advice
    of understanding who wrote what in a thread before you start
    giving them advice.

    Second, I can not see that Fredrik is claiming that Lew wants to
    be rude. He is only suggesting that Lew could get the message better
    through by wording things differently. Which is a reasonable suggestion.
    What is acceptable behavior in a job interview situation depends
    on the local culture.

    But in many places non-desperate job seekers would walk
    out at rude behavior from interviewers side.

    And it makes sense, because a company with an unprofessional
    attitude towards interview most likely behave unprofessionally
    in many other contexts.

    Arne Vajhøj, Mar 21, 2013
  16. Turtle Wizard

    Arne Vajhøj Guest

    There were plenty of good objective advice based on evidence in your

    But as Fredrik pointed out, then there were also a few cases of
    more colorful language.

    "clumsy programming"

    "antithesis of object oriented"


    "nasty variable name"

    These are neither objective, polite or technical.
    Communication is an important part of software development.

    Good communication includes using precise well defined terms for
    clarity and terms that does not offend people and by that move
    attention from substance to form.

    So if you want to become a better developer, then you should
    learn to communicate without "clumsy", "nasty" etc..

    Arne Vajhøj, Mar 21, 2013
  17. The idea that some pain helps remembering has been dropped
    as a preferred learning methodology in most places.

    I don't think it is that productive to go in let us call
    it quarter-flame-mode in this case where somebody simply
    posted a link to some code.

    Just give the recommendations without the spicy
    extra remarks.

    If OP comes back and is rude in the reply, then we have
    a new situation and I think setting the flame throwers
    to max power is fine.

    But I have not seen that in this thread.

    Arne Vajhøj, Mar 21, 2013
  18. Turtle Wizard

    Arne Vajhøj Guest


    I think you were making the observation that you are
    an idiot.

    Arne Vajhøj, Mar 21, 2013
  19. Turtle Wizard

    Arne Vajhøj Guest

    That is not a pretty picture that you paint of seasoned/experienced

    I don't believe that in general they are so horrible.

    Most would help because they like to help and they learn themselves
    by helping others - not to feel superior.

    Arne Vajhøj, Mar 21, 2013
  20. Ha! The programmers that I have seen with an air of superiority
    are the ones who do not know so much.

    Given my above statement, that would be a benefit.
    People tend to notice jerks. The quiet, polite guy is generally
    not noticed as much.
    Yes, and it is paying it forward for the times I have gotten


    Gene Wirchenko
    Gene Wirchenko, Mar 21, 2013
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.