Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'suppose': 0.07; 'agree,': 0.09; 'input,': 0.09; 'processing,': 0.09; 'cc:addr:python-list': 0.11; "wouldn't": 0.14; 'bugs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guilty': 0.16; 'naming': 0.16; 'applies': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'input': 0.22; 'cc:addr:python.org': 0.22; 'fine': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'least': 0.26; 'certain': 0.27; 'header:In- Reply-To:1': 0.27; 'on,': 0.29; '(this': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'crash': 0.31; "d'aprano": 0.31; 'fixing': 0.31; 'steven': 0.31; 'file': 0.32; 'minimal': 0.33; "i'd": 0.34; 'problem': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; '+0200,': 0.36; 'should': 0.36; 'wrong': 0.37; 'too': 0.37; 'two': 0.37; 'tired': 0.38; 'files': 0.38; 'does': 0.39; 'called': 0.40; 'how': 0.40; "you're": 0.61; 'name': 0.63; 'different': 0.65; 'photo': 0.78; 'fifty': 0.84; 'heh.': 0.84; 'photoshop,': 0.84; 'to:none': 0.92; 'imagine': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=n7H8jhoDpkTEG2Q7q37EGCXLpvxyyvyLdb2L2uKTNH4=; b=SUjyR5372HPSsd2OcmXgqW8qRgBW++35YGIAhYBfqXLt2iTKyLRUL4aEb+HOTBvwZ/ E7AZdy3tdX0260gI5DWbtVrvJW0yqeWW4Xo+getphqCCvlD60Xerfd7vv45qZK4BRPg3 +sXY+crOjow64UXmKImU5Y5NV9ald9GPKl2ilo6visy2pXbk2PuJyUvwraMARWhQCiwr DN3khCDeoj21q0olpQwE/dKbmMrFEHi5uGsVLk440kqihs9UbsrRTn/KG8lLLfkutpFR PFeprZVc0RRBi//TdfD9kp7GTJqUTfOZ3kELkBSTLGezKVKYPm46pNf9OOQBMqeZjGjS bbCg== MIME-Version: 1.0 X-Received: by 10.221.44.73 with SMTP id uf9mr33550751vcb.9.1401755400399; Mon, 02 Jun 2014 17:30:00 -0700 (PDT) In-Reply-To: <538d1532$0$29978$c3e8da3$5496439d@news.astraweb.com> References: <538d1532$0$29978$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 3 Jun 2014 10:30:00 +1000 Subject: Re: Strange Behavior From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401755402 news.xs4all.nl 2954 [2001:888:2000:d::a6]:57748 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72452 On Tue, Jun 3, 2014 at 10:22 AM, Steven D'Aprano 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. ChrisA