Login  Register

Re: bug report: -batch command adds txt extension and macros directory automatically

Posted by dscho on Mar 14, 2014; 5:59pm
URL: http://imagej.273.s1.nabble.com/bug-report-batch-command-adds-txt-extension-and-macros-directory-automatically-tp5006916p5006924.html

Hi Carnë,

On Fri, 14 Mar 2014, Carnë Draug wrote:

> [...] a 20 years old bug should not be made into a feature. But, I am
> sure everyone has seen that happening for much worse cases, all in the
> name of backwards compatibility, so I'm not going to argue with that
> [...]

That opinion is a comfortable one to have, unless, of course, when you are
relying on scripts and macros that have been developed over the course of
twenty years.

However, that scenario is quite real, and therefore it is the duty of a
good maintainer to pay attention to backwards compatibility, even if it
offends our sense of elegance from time to time. After all, ImageJ is a
tool to be used, heavily, not an art project.

Having said that, major new releases are exactly what maintainers do to
allow a partial redesign.

> The bigger problem, which if fixed would not break backwards
> compatibility, is that after looking into the macros directory with a
> file extension that was never defined,

Please specify the exact file name, then, and do not let ImageJ guess what
you want.

For that matter, I also would like to recommend prefixing the path
argument with a "./" to be explicit in your wish to load this file from
the current directory.

Further, I would *strongly* recommend using the file extension ".ijm"
instead of ".txt". The latter is a well-established file extension
denoting human-readable text, while ".ijm" is the recommended file
extension for ImageJ macros for some years already. ImageJ 1.x' support to
interpret ".txt" as macros' file extension is a historical wart of the
same sort as criticised above; there is no need to make use of it.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html