Discussion:
[Freecol-developers] First Successful Merge Request completed
Caleb Williams
2015-03-30 03:31:37 UTC
Permalink
Hey all,

After a long time of bashing (no pun intended) my head against the
SourceForge git wall, I've managed to make a successful merge request.

All it should be is slight code clean up involving some of the following
(client/gui/panel) files:

- Remove unneeded packages
- Add @Override tag where appropriate
- Add @param and @return were appropriate
- One or two if else to switch statements
- A couple log syntax changes --- those are what needs to be tested more
of all as I'm not sure how they'll effect FreeCol.log (I'm hoping not at
all)

I've compiled the changes and have received no issue so far.

As I mentioned, this is all semi-automated work from what NetBeans is
telling me can be added. I'm not attempting any complex changes.

Thanks,

--
*Caleb R. Williams*
Caleb Williams
2015-03-30 05:15:43 UTC
Permalink
On Sun, Mar 29, 2015 at 10:31 PM, Caleb Williams <***@gmail.com> wrote:

> Hey all,
>
> After a long time of bashing (no pun intended) my head against the
> SourceForge git wall, I've managed to make a successful merge request.
>
> All it should be is slight code clean up involving some of the following
> (client/gui/panel) files:
>
> - Remove unneeded packages
> - Add @Override tag where appropriate
> - Add @param and @return were appropriate
> - One or two if else to switch statements
> - A couple log syntax changes --- those are what needs to be tested
> more of all as I'm not sure how they'll effect FreeCol.log (I'm hoping not
> at all)
>
> I've compiled the changes and have received no issue so far.
>
> As I mentioned, this is all semi-automated work from what NetBeans is
> telling me can be added. I'm not attempting any complex changes.
>
> Thanks,
>
> --
> *Caleb R. Williams*
>

Just an FYI:

{@inheritDoc} existed previously. I did not add that in. I could easily run
a search for all of them in Panel directory and get rid of them.

--
*Caleb R. Williams*
w***@genial.ms
2015-03-30 06:09:20 UTC
Permalink
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Caleb Williams
2015-03-30 06:13:32 UTC
Permalink
That totally makes sense. I reconfigured NetBeans to give more relevant
hints. Plus it didn't help that I misinterpreted Michael's comment on the
merge request.

Now that I have that sorted, it's much easier to not worry about the
JavaDoc stuff.

On Mon, Mar 30, 2015 at 1:09 AM, <***@genial.ms> wrote:

> When editing the code I try to reduce its size, because Java is verbose
> and the less code to maintain the easier it is done.
> Thats why I only add to the Java-Doc comments when I think of some halfway
> useful text to type in manually. I'd suggest you do same.
>
> Regards
>
> wintertime
>
> *Gesendet:* Montag, 30. MÀrz 2015 um 07:15 Uhr
> *Von:* "Caleb Williams" <***@gmail.com>
> *An:* "FreeCol Developers" <freecol-***@lists.sourceforge.net>
> *Betreff:* Re: [Freecol-developers] First Successful Merge Request
> completed
> On Sun, Mar 29, 2015 at 10:31 PM, Caleb Williams <***@gmail.com>
> wrote:
>
>> Hey all,
>>
>> After a long time of bashing (no pun intended) my head against the
>> SourceForge git wall, I've managed to make a successful merge request.
>>
>> All it should be is slight code clean up involving some of the following
>> (client/gui/panel) files:
>>
>> - Remove unneeded packages
>> - Add @Override tag where appropriate
>> - Add @param and @return were appropriate
>> - One or two if else to switch statements
>> - A couple log syntax changes --- those are what needs to be tested
>> more of all as I'm not sure how they'll effect FreeCol.log (I'm hoping not
>> at all)
>>
>> I've compiled the changes and have received no issue so far.
>>
>> As I mentioned, this is all semi-automated work from what NetBeans is
>> telling me can be added. I'm not attempting any complex changes.
>>
>> Thanks,
>>
>> --
>> *Caleb R. Williams*
>>
>>
>>
>
> Just an FYI:
>
> {@inheritDoc} existed previously. I did not add that in. I could easily
> run a search for all of them in Panel directory and get rid of them.
>
> --
> *Caleb R. Williams*
>
>



--
*Caleb R. Williams*

*Photographer*
w: http://calebwilliamsphotography.com
b: http://blog.calebwilliamsphotography.com
e: ***@gmail.com
c: 612-275-7796
w***@genial.ms
2015-03-30 07:34:40 UTC
Permalink
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
w***@genial.ms
2015-03-30 07:49:17 UTC
Permalink
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Caleb Williams
2015-03-30 19:07:23 UTC
Permalink
On Mon, Mar 30, 2015 at 2:49 AM, <***@genial.ms> wrote:

> Hi,
>
> I found the problem with your merge requests on sourceforge.
> There has to be a new branch in your private repository for each request,
> preferably named to give a
> hint as to the contained changes, so the merge request can remember
> correctly which commits you
> like to have merged.
> Otherwise all merge requests get intermingled and screwed up as they are
> now when you continue
> pushing commits to the same branch.
>
>
> Regards
>
> wintertime
>
>

Hello,

So far I have not succeeded in submitting a Merge request so that only one
commits I want pushed in that change are being submitted as part of the
Merge Request.

For instance, I submitted a simple request in MR#14 to change a couple
lines of the project.xml file within the config/nbproject directory. That
went fine. That commit is [e657b6].

Then, I made another new branch (SACC_1) that should have only contained
the change for a few lines of new cleanup in the panel directory (MR #15),
but while it submitted that change, it also submitted a change for the
previous MR#14 change as well. The commit I want submitted is [163903]
alone and not [e657b6] as well.

Is there some type of admin access that I can have that will allow me to
edit the Merge Requests I make so that I can trip off excess commits from
each MR and that way when the Developer comes along to approve the change
and actually commit to the FreeCol source code, the proper changes are
submitted and not those that would try to change code that has already been
changed.

For reference, I'm using GitExtentions to produce commits (I can also use
NetBeans for this and it's the exact same result) and then GitExtensions
again to push the change to my private Fork.

Thanks in advance for any tips.

Best,

--
*Caleb R. Williams*
Michael T. Pope
2015-03-30 08:06:00 UTC
Permalink
On Mon, 30 Mar 2015 01:13:32 -0500
Caleb Williams <***@gmail.com> wrote:
> Plus it didn't help that I misinterpreted Michael's comment on the
> merge request.

I should probably clarify here (rather than on the merge request) some
JavaDoc practices used in FreeCol. Obviously there are two consumers of
JavaDoc: humans reading the code, and JavaDoc-manipulating programs. The
former is more important IMHO:-), but the latter can not be ignored.

- There has been little consistency about when JavaDoc is added. It is ok
to add new code without it, especially for small obvious routines. I
personally prefer to err on the side of more doco rather than less, but
I have never seen a contribution bounced due to its documentation or
lack thereof.

- Functions that inherit documentation just get {@inheritDoc} and nothing
more. Anything else is clutter. Of course, @Override etc is ok though.

- Running "ant javadoc" every so often, and cleaning up the inevitable
slips is a good idea.

Cheers,
Mike Pope
Caleb Williams
2015-03-30 19:11:20 UTC
Permalink
On Mon, Mar 30, 2015 at 3:06 AM, Michael T. Pope <***@computer.org> wrote:

> On Mon, 30 Mar 2015 01:13:32 -0500
> Caleb Williams <***@gmail.com> wrote:
> > Plus it didn't help that I misinterpreted Michael's comment on the
> > merge request.
>
> I should probably clarify here (rather than on the merge request) some
> JavaDoc practices used in FreeCol. Obviously there are two consumers of
> JavaDoc: humans reading the code, and JavaDoc-manipulating programs. The
> former is more important IMHO:-), but the latter can not be ignored.
>

I understand that better now. Thanks. The issue is that I cannot access the
Merge Request discussion in any way once it's been submitted. After that,
email is the only recourse.


>
> - There has been little consistency about when JavaDoc is added. It is ok
> to add new code without it, especially for small obvious routines. I
> personally prefer to err on the side of more doco rather than less, but
> I have never seen a contribution bounced due to its documentation or
> lack thereof.
>
> - Functions that inherit documentation just get {@inheritDoc} and nothing
> more. Anything else is clutter. Of course, @Override etc is ok though.
>

That is the bulk of what I'm adding, which as I understand it hurts
nothing, but *can* help the compiler do its job. Fortunately, it looks like
I'll be duplicating some work so we'll see how long that takes, and if I
can get the issues I described in the previous email licked so that I'm not
resubmitting changes that include previous changes.

>
> - Running "ant javadoc" every so often, and cleaning up the inevitable
> slips is a good idea.
>

I'll have to look more at that when I'm done doing this semi-automated code
clean to see what the results are.

Best,


--
*Caleb R. Williams*
Michael T. Pope
2015-03-30 22:29:07 UTC
Permalink
On Mon, 30 Mar 2015 14:11:20 -0500
Caleb Williams <***@gmail.com> wrote:
> On Mon, Mar 30, 2015 at 3:06 AM, Michael T. Pope <***@computer.org> wrote:
>
> > On Mon, 30 Mar 2015 01:13:32 -0500
> > Caleb Williams <***@gmail.com> wrote:
> > > Plus it didn't help that I misinterpreted Michael's comment on the
> > > merge request.
> >
> > I should probably clarify here (rather than on the merge request) some
> > JavaDoc practices used in FreeCol. Obviously there are two consumers of
> > JavaDoc: humans reading the code, and JavaDoc-manipulating programs. The
> > former is more important IMHO:-), but the latter can not be ignored.
> >
>
> I understand that better now. Thanks. The issue is that I cannot access the
> Merge Request discussion in any way once it's been submitted. After that,
> email is the only recourse.

This is a surprise. I have kicked your Sourceforge FreeCol permissions,
hopefully improving your access.

> That is the bulk of what I'm adding, which as I understand it hurts
> nothing, but *can* help the compiler do its job.

@Override is also a helpful reminder to the programmer. Its worth adding.

However, please do not do this:
+ * @throws java.io.IOException

This is just silencing a warning without adding anything for the
programmer. The programmer can already see "throws IOException" in the
function's signature. The same applies to "@param foo". I much prefer to
see:

@throws IOException <Simple reason why the exception is thrown>

The quality of the explanation does not have to be high. What I hope
for is for a human to have looked at it and thought about it, however
briefly.

Now, do you think you could write some documentation of the Merge Request
system? doc/developer.tex would be the standard place for it. Just about
everyone who uses it finds it confusing.


While I am writing, just a warning that I am about to rework a bunch of
the messages. If you have looked at FreeColMessages.properties, you can
see that it is:

1. A mess

2. Has some naming conventions that are intermittently used

I am going to add some new sections, enforce a naming convention for
.../client.panel.*, and add a fair bit of comment. I have talked to the
translatewiki people about how to minimize impact on them. Its likely to
cause a lot of small changes all over the place, so beware if you have
private trees.

Cheers,
Mike Pope
Caleb Williams
2015-03-30 22:52:27 UTC
Permalink
Forward.

---------- Forwarded message ----------
From: Caleb Williams <***@gmail.com>
Date: Mon, Mar 30, 2015 at 5:52 PM
Subject: Re: [Freecol-developers] First Successful Merge Request completed
To: "Michael T. Pope" <***@computer.org>


On Mon, Mar 30, 2015 at 5:29 PM, Michael T. Pope <***@computer.org> wrote:

> On Mon, 30 Mar 2015 14:11:20 -0500
> Caleb Williams <***@gmail.com> wrote:
> > On Mon, Mar 30, 2015 at 3:06 AM, Michael T. Pope <***@computer.org>
> wrote:
> >
> > > On Mon, 30 Mar 2015 01:13:32 -0500
> > > Caleb Williams <***@gmail.com> wrote:
> > > > Plus it didn't help that I misinterpreted Michael's comment on the
> > > > merge request.
> > >
> > > I should probably clarify here (rather than on the merge request) some
> > > JavaDoc practices used in FreeCol. Obviously there are two consumers
> of
> > > JavaDoc: humans reading the code, and JavaDoc-manipulating programs.
> The
> > > former is more important IMHO:-), but the latter can not be ignored.
> > >
> >
> > I understand that better now. Thanks. The issue is that I cannot access
> the
> > Merge Request discussion in any way once it's been submitted. After that,
> > email is the only recourse.
>
> This is a surprise. I have kicked your Sourceforge FreeCol permissions,
> hopefully improving your access.
>

No change. I cannot seem to access the discussion for the Merge Request
after submission.


> > That is the bulk of what I'm adding, which as I understand it hurts
> > nothing, but *can* help the compiler do its job.
>
> @Override is also a helpful reminder to the programmer. Its worth adding.
>

Perfect. I understand that what I'm doing won't make a huge difference to
the end user, but hopefully can improve some things for the programmers.


However, please do not do this:
> + * @throws java.io.IOException
>
> This is just silencing a warning without adding anything for the
> programmer. The programmer can already see "throws IOException" in the
> function's signature. The same applies to "@param foo". I much prefer to
> see:
>
> @throws IOException <Simple reason why the exception is thrown>
>
> The quality of the explanation does not have to be high. What I hope
> for is for a human to have looked at it and thought about it, however
> briefly.
>
> I do try to do so, but unfortunately quite a bit of the code is over my
head. Now that I've changed the NetBeans code hint settings, I don't seen
Java Doc related hints at this time, so I'll have to leave that for another
time (when I know more about it) or for the next person to come along.


> Now, do you think you could write some documentation of the Merge Request
> system? doc/developer.tex would be the standard place for it. Just about
> everyone who uses it finds it confusing.
>

If I could figure out how to do it, I could write some thing up. My issue
is getting past the fact that I'm not used to working on a command line
interface to such a degree that I almost need a GUI to get me through. Git
just seems to not work the way I want it to. I want it to be an interface
where I can see what I've submitted and remove any extraneous bits *before*
I submit the request, then once it's submitted, all the admin would see is
the proper merge request that will edit the existing FreeCol code.

While I am writing, just a warning that I am about to rework a bunch of
> the messages. If you have looked at FreeColMessages.properties, you can
> see that it is:
>
> 1. A mess
>
> 2. Has some naming conventions that are intermittently used
>
> I am going to add some new sections, enforce a naming convention for
> .../client.panel.*, and add a fair bit of comment. I have talked to the
> translatewiki people about how to minimize impact on them. Its likely to
> cause a lot of small changes all over the place, so beware if you have
> private trees.
>

The other thing I'm not happy with is that Source Forge doesn't keep up
with changes automatically to the main tree. I'd like to be more automatic
in the way it clones out of FreeCol and into my own private repository.

Best,

--
*Caleb R. Williams*
w***@genial.ms
2015-03-31 08:24:11 UTC
Permalink
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Caleb Williams
2015-03-31 02:30:11 UTC
Permalink
All:

Just submitted MR#16. Now that's showing blank too (as in 0 commits). I'm
not sure why this is. Doing a search for this issue indicate these errors
within SourceForge have been fixed, so it's puzzling.

MR#16 should be checked before committing into the SF repository. There are
a few changes more than adding @Override, but I've been testing these
changes by running the program and so far, so good.

Best,

--
*Caleb R. Williams*
w***@genial.ms
2015-04-02 11:35:51 UTC
Permalink
Hi,

yesterday I was too tired to write something, though I'd like to tell why I put
nearly 2 hours into changing all the logger calls back.
When reading the logfile to check my other changed I saw at many places "{0} {1}"
and so on, not the data values one would want to have there.
I wanted to revert using a few git commands, but found it was all intermingled
with other changes. I thought I'd go for the best result and separate the good
parts from the bad parts manually, by finding each affected file, opening each in
Netbeans, go to the diff view, find the last good commit and scroll through to
find and click all relevant changes. When I found more and more of these changes,
I had already invested too much effort to discard it and wanted to get it done
before even more other changes get added to the codebase, which would have made
it even more tedious.
As a positive sideeffect the logger calls only take 1 or 2 lines again, not
up to 8, which helps readability.

The moral is:
- Keep each commit to a single logical change to avoid turning a 1 minute revert
into a massive task.
- Don't change working code just for the sake of change or making an IDE happy.


Regards

wintertime
Michael T. Pope
2015-04-05 04:15:34 UTC
Permalink
On Thu, 2 Apr 2015 13:35:51 +0200
***@genial.ms wrote:
> yesterday I was too tired to write something, though I'd like to tell why I put
> nearly 2 hours into changing all the logger calls back.
> When reading the logfile to check my other changed I saw at many places "{0} {1}"
> and so on, not the data values one would want to have there.

Certainly sufficient reason: it did not work. Pity, the {}-syntax is
better IMHO.

> I wanted to revert using a few git commands, but found it was all intermingled
> with other changes...
> The moral is:
> - Keep each commit to a single logical change to avoid turning a 1 minute revert
> into a massive task.

True, but this is the ideal. In practice, I do not pretend to always
succeed in keeping all my patches completely compartmentalized. Sometimes
complex stuff does indeed get interconnected, or more simply, if I am
fixing a bug in a routine and discover it has two bugs, I usually just
rewrite it to fix both. The *most* important thing is to make progress.
Purity of the commit tree is indeed good, but secondary.

> - Don't change working code just for the sake of change or making an IDE happy.

Agreed on the first. On the second category, I think you have to make an
informed judgement as to whether the IDE is right to be whining. If you
go through the FreeCol codebase you can see @SuppressWarning directives
which a developer has put there to make the compiler happy. I can assure
you that I have checked all of these and either agree that the developer
was right or prefer to defer fixing the problem for now. I can not
comment on netbeans or the other Java IDEs, but I have looked at findbugs
output and registered FreeCol for free coverity scans --- both of these
complain a lot more, often excessively, but both also found potential race
conditions (now fixed, IIRC). IRL I write a fair bit of C, which is a lot
less forgiving than Java:-), and there I also have a policy of running the
compiler with all the useful warnings turned on, and fixing every problem
as soon as it occurs. Ultimately, you want to know what you are doing,
and know what your tools are doing. AFAICT the only way you get there is
through experience, and the only way to get experience is to do stuff.
So IMHO fixing IDE warnings is a pretty good thing to be doing if you are
looking to gain some familiarity with Java and the FreeCol codebase.


Meanwhile, while I am writing, what is happening with MR#14 folks? You
know I have been ignoring that warning, but if you think it can be fixed it
would indeed be nice.

Cheers,
Mike Pope
Caleb Williams
2015-04-05 04:31:22 UTC
Permalink
> Meanwhile, while I am writing, what is happening with MR#14 folks? You
> know I have been ignoring that warning, but if you think it can be fixed
it
> would indeed be nice.

Mike,

Unless wintertime is aware of a more specific issue that I am not aware of,
all i know is that the project.xml file is out dated in source version
number (1.5 to 1.7) and the Jars.

For me, I just update NetBean's Project Properties for it anytime it's
overridden due to Git rebase/merger or a redownload of the source code.

The Jars update fine and Netbeans will process those Jars in such a way as
to not complain about attempting to import MigLayout and it not existing
(for example).

However, when you go to update the source code version, it throws an error
when you change it to 1.7. It doesn't seem to change the config.xml file,
but it still processes it as 1.7.

I'm on my phone, so I can't look up the exact error message off-hand ARM,
but it's a NetBeans issue.

WT,

Yup, I'm using 8.02 with all the latest plugins.

Do you know where the the Project Properties live if not in each project's
project.xml file? Changing the settings as above seem to have no effect on
the file, making me wonder if they are stores elsewhere.

Also, after the error described above, NetBeans has no issues
reading/processing/compiling the code as 1.7.

Best,

Caleb
w***@genial.ms
2015-04-05 09:52:40 UTC
Permalink
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Michael T. Pope
2015-04-05 10:37:50 UTC
Permalink
On Sun, 5 Apr 2015 11:52:40 +0200
***@genial.ms wrote:
> I would just keep the request as a reminder for now, to recheck someday.

OK. That is making sourceforge useful. I will ignore that MR.

Cheers,
Mike Pope
Caleb Williams
2015-04-07 05:43:33 UTC
Permalink
All:

Based on WT's non-public comment on the issue, SF's Git integration seems
problematic to say the least.

I submitted a few MR's tonight and #29 combines all three, so please push
that one of any of them. Sorry for the confusion.

----

You'll notice that the above MR attempts to add commons-lang3-3.4.jar as a
required dependency. That's not required for any of the code changes I've
made, but hopefully it will be useful in the future.

One of the issues I have with Java is that it just doesn't work the same
way as I'm used to in PHP and it's very strict with object types. It is
truly a different way of thinking that I have not mastered.

For instance, given ".addStringTemplate("%unit%", unit.getLabel())" in
ServerColony.java, the end result of unit.getLabel() needs to should be in
title case (for example, Printing press to Printing Press), so that when
the Message shows up it will read, for example: "Jamestown has completed
building Printing Press" where the "p" in press is currently not
capitalized. This is line #579.

If I could extract the string that unit.getLabel() produces (in other
words, just the text itself), then I could apply WordUtil's capitalizeFully
method to easily produce Printing Press from Printing press (again, that's
just an example).

I'm hoping one of you devs can point me in the right direction so that I
can stop banging my head against this wall. FWIW, I did find the toString
Method in StringTemplate.java as well as its SuperClass iteration in the
Java.String class, but I couldn't quite put 2 and 2 together (or in this
case morph a String Template object to a String object).

I appreciate all your patience on my Java learning journey.

Best,

--
*Caleb R. Williams*
w***@genial.ms
2015-04-07 06:31:42 UTC
Permalink
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
Caleb Williams
2015-04-07 06:36:57 UTC
Permalink
Excellent point and one i had not considered. From an Anglocentric point of
view, it makes sense, but perhaps not in other languages.

I can look at the sting file later on and see what there is to see there.

Best, Caleb

On Apr 7, 2015 1:31 AM, <***@genial.ms> wrote:
>
> Hi,
>
> just saw you wrote something while I was working on your merge requests.
> In terms of internationalization it is bad to programmatically change any
string, because different languages
> have different, sometimes strange rules. How will you capitalize, for
example, Chinese?
> The way of doing it is put the string into the English language file in
the way it is needed, then rely on
> the translators to translate it appropriately (hopefully giving them
enough information so they know of
> special circumstances like the text being put in a header).
>
>
> Greetings,
>
> wintertime
>
>
> Gesendet: Dienstag, 07. April 2015 um 07:43 Uhr
>
> Von: "Caleb Williams" <***@gmail.com>
> An: "FreeCol Developers" <freecol-***@lists.sourceforge.net>
> Betreff: Re: [Freecol-developers] First Successful Merge Request completed
> All:
>
> Based on WT's non-public comment on the issue, SF's Git integration seems
problematic to say the least.
>
> I submitted a few MR's tonight and #29 combines all three, so please push
that one of any of them. Sorry for the confusion.
>
> ----
>
> You'll notice that the above MR attempts to add commons-lang3-3.4.jar as
a required dependency. That's not required for any of the code changes I've
made, but hopefully it will be useful in the future.
>
> One of the issues I have with Java is that it just doesn't work the same
way as I'm used to in PHP and it's very strict with object types. It is
truly a different way of thinking that I have not mastered.
>
> For instance, given ".addStringTemplate("%unit%", unit.getLabel())" in
ServerColony.java, the end result of unit.getLabel() needs to should be in
title case (for example, Printing press to Printing Press), so that when
the Message shows up it will read, for example: "Jamestown has completed
building Printing Press" where the "p" in press is currently not
capitalized. This is line #579.
>
> If I could extract the string that unit.getLabel() produces (in other
words, just the text itself), then I could apply WordUtil's capitalizeFully
method to easily produce Printing Press from Printing press (again, that's
just an example).
>
> I'm hoping one of you devs can point me in the right direction so that I
can stop banging my head against this wall. FWIW, I did find the toString
Method in StringTemplate.java as well as its SuperClass iteration in the
Java.String class, but I couldn't quite put 2 and 2 together (or in this
case morph a String Template object to a String object).
>
> I appreciate all your patience on my Java learning journey.
>
> Best,
>
> --
> Caleb R. Williams
>
>
Caleb Williams
2015-04-07 15:15:02 UTC
Permalink
In response to https://sourceforge.net/p/freecol/git/merge-requests/29/:

>I took the jar out, as I think, introducing any external dependencies
would be worth asking on mailing list in most projects.
Thank you. I couldn't figure out how to get that out of the commit (I guess
I should have just deleted the file). As noted, I don't know that this
dependency will ever be needed by the FreeCol project. There are a few
interesting components in the commons-lang3 dependency though that could be
worth a look for debugging purposes (such as time() being used to measure
how long certain tasks take).

>I forgot, if you do any functional changes like changing a font or moving
around GUI elements, you better put that information in the commit notice,
as its more than just code cleanup.
Noted. I will be doing a few similar changes to the panels. For instance,
the Negotiation panel (DiplomaticTradeDialog.java) requires some addition
revision in the way of sizing type.

Best,

--
*Caleb R. Williams*
Michael T. Pope
2015-04-07 22:04:06 UTC
Permalink
On Tue, 7 Apr 2015 10:15:02 -0500
Caleb Williams <***@gmail.com> wrote:
> >I took the jar out, as I think, introducing any external dependencies
> would be worth asking on mailing list in most projects.
> Thank you. I couldn't figure out how to get that out of the commit (I guess
> I should have just deleted the file). As noted, I don't know that this
> dependency will ever be needed by the FreeCol project. There are a few
> interesting components in the commons-lang3 dependency though that could be
> worth a look for debugging purposes (such as time() being used to measure
> how long certain tasks take).

Please do not introduce new dependencies and/or packaged .jars without
*really* strong justification. It may make things easier for us, but they
are a headache for several downstream distributions.

Cheers,
Mike Pope
Caleb Williams
2015-04-08 02:19:17 UTC
Permalink
On Tue, Apr 7, 2015 at 5:04 PM, Michael T. Pope <***@computer.org> wrote:

> On Tue, 7 Apr 2015 10:15:02 -0500
> Caleb Williams <***@gmail.com> wrote:
> > >I took the jar out, as I think, introducing any external dependencies
> > would be worth asking on mailing list in most projects.
> > Thank you. I couldn't figure out how to get that out of the commit (I
> guess
> > I should have just deleted the file). As noted, I don't know that this
> > dependency will ever be needed by the FreeCol project. There are a few
> > interesting components in the commons-lang3 dependency though that could
> be
> > worth a look for debugging purposes (such as time() being used to measure
> > how long certain tasks take).
>
> Please do not introduce new dependencies and/or packaged .jars without
> *really* strong justification. It may make things easier for us, but they
> are a headache for several downstream distributions.
>
> Cheers,
> Mike Pope
>

Mike, et. al.,

Understood. No offense intended.

For the record, I believe you or another on the mailing list mentioned
checking the latest version of the dependencies presently included in
FreeCol.

- commons-cli has been updated from 1.1 to 1.2 (it would seem 1.3 is in
development).
- There appears to be a non-final version of MigLayout 4.3 and 5.1, but
development seems somewhat stale on the former, but active as of April 4,
2015 on 5.1. Nothing final however.

Best,

--
*Caleb R. Williams*
Loading...