commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-1026) Separate Optimization Problem from Algorithm
Date Mon, 16 Sep 2013 21:19:52 GMT


Gilles commented on MATH-1026:

bq. But any patch on the test cases would have been large because of all the code that was
copied and pasted between the methods.

The patch _can_ be big if it's clear that it contains the same repetitive change. but in this
case, it changes too many things at once.

bq. think of it as fewer lines of code to review.

I'm not sure I understand what you mean.
The simplest for review is to change things iteratively. In this case, I wanted to be sure
that all tests are run and produce the same results. This is easy if the number of tests stays
the same, and their name stays the name.
Just look at it from this viewpoint: we had 23 unit tests for the old "LevenbergMarquardtOptimizer",
and now we have only 2! We thus have to read code to look for an explanation? Where is the

A test is also often a small use-case, and it is probably clearer that they are relatively
independent. This is not to say that they cannot share code (see e.g. "MinPackTest").

bq. you would prefer JUnit to directly execute each test case

As I said, you can later raise an improvement request for the tests layout.
Alternately, you can try and raise your point now on the ML, and have someone else review
those changes.

> Separate Optimization Problem from Algorithm
> --------------------------------------------
>                 Key: MATH-1026
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Evan Ward
>         Attachments: opt.tar.gz
> See discussion on the mailing list starting with:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message