On Mon, Jun 2, 2014 at 5:30 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Tue, Jun 3, 2014 at 10:22 AM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>> On Mon, 02 Jun 2014 20:05:29 +0200, robertw89 wrote:
>>> I invoked the wrong bug.py :/ , works fine now (this happens to me when
>>> im a bit tired sometimes...).
>> Clarity in naming is an excellent thing. If you have two files called
>> "bug.py", that's two too many.
>> Imagine having fifty files called "program.py". Which one is which? How
>> do you know? Programs should be named by what they do (think of Word,
>> which does word processing, or Photoshop, which does photo editing), or
>> when that isn't practical, at least give them a unique and memorable name
>> (Outlook, Excel). The same applies to files demonstrating bugs.
> Heh. I agree, but I've been guilty of this exact problem myself.
> Suppose you have a program that segfaults when given certain input, so
> you take the input that crashes it, and progressively simplify it
> until you have a minimal test-case. What do you call the file that
> you're editing? What if you have a few different variants? I've had a
> few called "boom" and "boom2" and "booooooom" and so on, because
> there's really nothing else to call it - if I knew what the cause of
> the crash was, I wouldn't be naming the testcase files, I'd be fixing
> the problem.
test1, test2, test3, .... testn.
At least it will be unique. ;-)