Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'modified': 0.05; '425': 0.09; 'prevents': 0.09; 'sep': 0.09; 'terry': 0.09; 'worse': 0.09; 'cc:addr:python-list': 0.10; 'fail,': 0.16; 'im:': 0.16; 'reedy': 0.16; 'run.': 0.16; 'useless.': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'passes': 0.17; 'test.': 0.17; 'tests': 0.18; 'voting': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'first,': 0.27; "doesn't": 0.28; 'run': 0.28; 'sleep': 0.29; 'code': 0.31; "can't": 0.34; 'fail': 0.35; 'but': 0.36; 'test': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'being': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'step': 0.39; 'your': 0.60; 'skip:u 10': 0.60; 'back': 0.62; 'header:Message-Id:1': 0.62; 'day.': 0.63; 'more': 0.63; 'discovered': 0.83; 'democracy': 0.84; 'received:98.158': 0.84 Date: Wed, 12 Sep 2012 17:47:13 -0400 From: D'Arcy Cain To: Terry Reedy Subject: Re: avoid the redefinition of a function In-Reply-To: References: X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: python-list@python.org 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347486433 news.xs4all.nl 6967 [2001:888:2000:d::a6]:52712 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29001 On Wed, 12 Sep 2012 16:37:11 -0400 Terry Reedy wrote: > assures one that the test is being run. (I don't always test first, but > I once discovered a test not being run when I modified it in a way that > should have made it fail, but it didn't.) 1. Write the test 2. Run the test - make sure it fails 3. write code until test passes 4. Stop writing code People underestimate the importance of steps 2 and 4. Number 2 is important because a test that can't fail is worse than useless. Number 4 is important because it prevents code that doesn't have a corresponding test. If you feel the need to write more code then go back to step 1. And run all of your tests every day. You will sleep better at night. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner. IM: darcy@Vex.Net