Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Hello from the middle of a decade's worth of legacy code...

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Location
    Ottawa
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hello from the middle of a decade's worth of legacy code...

    I am at this point the last most experienced Java programmer dealing with enhancements to a Java GUI wrapped around a legacy C/C++ app...which is to say, distinctly short on local help, when my own relatively modest skills aren't enough to sort out why the wretched thing doesn't behave, or doesn't work consistently. It doesn't help, that the GUI of which I now have custody has been developed by a variety of people over the past 10-12 years, each with their own unique approach to programming Java (read, all sorts of inconsistent approaches), and most of them apparently in the process of learning it on the job.

    I can only hope not to frustrate people too much, as I flounder around trying to figure out what my options are for dealing with the beast.


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Re: Hello from the middle of a decade's worth of legacy code...

    Refactoring may be the best approach. Especially if it is old code. Chances are, it is not optimized for Java 7.
    Before doing a proper refactor, open it with an IDE, like Eclipse, where you can tell it to mark warnings and stuff in code. And turn on most of the available warning markers, and deal with those before refactoring. That way you can get rid of all the obviously "dirty" code before attempting to refactor it.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Location
    Ottawa
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Hello from the middle of a decade's worth of legacy code...

    I could wish I had that freedom, but no...our system restricts me to making only the smallest changes necessary to implement any fix or enhancement, and I'm code-reviewed on that. And Java 7? Oh, heck. This thing's been written in everything from Java 1.2 through (mostly) Java 1.4, through (now) Java 6, which I and my last team lead were able to get pushed in a year or two back, only once we hit an enhancement nothing less would allow us to push through.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,295
    My Mood
    Mellow
    Thanks
    193
    Thanked 669 Times in 656 Posts

    Default Re: Hello from the middle of a decade's worth of legacy code...

    Welcome, and we'll help if we can, but I doubt those who help here will be sensitive to your company's rules, and are not keen to show you how to do what we might consider to be the "wrong" thing. But, we'll do our best.

  5. #5
    Junior Member
    Join Date
    Dec 2013
    Location
    Ottawa
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Hello from the middle of a decade's worth of legacy code...

    No problem. I don't expect anyone to countenance insanity (I'm the only one getting paid to do) and have no great hopes that anyone may be able to do more than occasionally point me in the direction of possible additional things to search/study.

  6. #6
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Re: Hello from the middle of a decade's worth of legacy code...

    Well, ideally, your company should have a coding standards document or something. If they don't, you should go ahead and suggest to your boss that one should be established. At the very least, your company should be using java's coding standards documentation (Code Conventions for the Java Programming Language).
    You can take the messy approach to refactoring and code cleaning: doing it as you go about your usual tasks. If you need to fix a bug in a section of code, consider gently modifying the surrounding code to meet the java coding standard (things like adding qualifiers, javadocs, and other non-invasive adjustments).
    If you notice deprecated methods or classes being used, point them out to a coworker, saying a possible improvement needs to take place there. Just be vigilant on significant issues and try to send them up the chain of commands. You can't do much more than that.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. Is ITIL certification worth it?
    By Sanjana in forum Totally Off Topic
    Replies: 0
    Last Post: October 29th, 2013, 05:46 AM
  2. Is Hibernate worth it?
    By tools in forum JDBC & Databases
    Replies: 6
    Last Post: October 8th, 2013, 02:59 PM
  3. Replies: 12
    Last Post: September 3rd, 2011, 07:07 AM