in reply to Re^17: Renaming an image file
in thread Renaming an image file

Are you suggesting that I should given cast-iron guarantees with my suggestions?
No. Did I ever say that? But, if you knew all this when writing your original reply:
When I made the original suggestion, I was aware that in some scenarios the potential to eliminate duplicate files was beneficial; and that in others it could be compensated for by the necessary re-mapping of links to files.

I was also aware that in some scenarios, eliminating the user name entirely might lead to even greater disk-space savings, provided the link re-mapping mechanism was sufficiently robust to compensate.

I was also aware that there could be some scenarios where hashing the contents alone would be insufficient.

The why keep you all that for yourself, and didn't mention it? That's a lot more than the average perlmonk would consider. If you indeed did realize that duplicate files hash to the same filename, why didn't you say so? Instead, you say that the chance of collisions is remote.

Replies are listed 'Best First'.
Re^19: Renaming an image file
by BrowserUk (Patriarch) on Nov 29, 2010 at 20:31 UTC
    If you indeed did realize that duplicate files hash to the same filename, why didn't you say so?

    Because it is so obvious that it didn't even cross my mind to consider it worth mentioning.

    Of course duplicate files hash to the same value. How could they not. (That's a rhetorical question!)

    Instead, you say that the chance of collisions is remote.

    Duplicate files hashing to the same value is neither surprising, nor "a collision". Not by any meaning of the term, no matter how contrived.

    I don't treat OPs as idiots by explicitly stating such obvious truths.

    Just as nobody--when they offer a line-by-line solution--explicitly states that if a large file contains no newlines; or a single line that is larger than memory; that the solution will fail.

    Are we done with the meta discussion now?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.