in reply to Re: Directory tree explorer with stats reporting
in thread Directory tree explorer with stats reporting

Thanks for the improvements. A couple of minor things:

count_to_plural_suffix would be better return $_[0] != 1 ? 's' : ''; In English - 0 apples, 1 apple, many apples.

The new display size is nice for general purpose, but for the application that catalysed the code I needed the exact number of bytes. Just shows, you can't write code to suit everyone. :)


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^3: Directory tree explorer with stats reporting
by parv (Parson) on Mar 12, 2006 at 02:45 UTC

    I personally like seeing "0 X" than to "0 Xs" where things are being counted like in this case. (Or, just do away w/ the count_to_plural_suffix). But as you said, "you can't...".

    I have been myself in situation where i wanted to see the exact number of bytes (or rather in 512-blocks), so no argument there. (I suppose "more appropriate units" caused your response?:)

    This is my first experience w/ Tk, otherwise i would have added some more key bindings (namely rebuilding the tree on request) and options to (interactively) modify the display. Slowly, but surely, one day ...

      "0 apple" isn't conventional English usage. In Russian useage I understand that there are three plural cases - perhaps you could redo the user interface in Russian? :)

      Not sure I noticed "more appropriate units", not to the point of objecting anyway. More comment concerning units was a "more than one way to use it" type comment. I'll likely change my version to insert comas however to make the numbers more readable. Perhaps we need to add a configuration menu?

      I use Tk in a fairly light weight way fairly often for simple GUI apps such as this. I guess I didn't spend much more than an hour on the original code before I posted it - post early and often they say.


      DWIM is Perl's answer to Gödel