Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!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.059 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'tests.': 0.07; 'subject:string': 0.09; 'cc:addr:python-list': 0.11; 'behavior,': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'tests': 0.22; 'cc:addr:python.org': 0.22; 'driven': 0.24; 'cc:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'received:209.85.217': 0.29; 'important.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'received:209.85': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'possible': 0.36; 'received:209': 0.37; 'short': 0.38; 'does': 0.39; 'sure': 0.39; 'space': 0.40; 'easy': 0.60; 'smith': 0.68; 'complexity': 0.84; 'me).': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=3knQbh7NLRUv18nK1XBSxSnMp+Lgrtjt0ZAksRJZ/bc=; b=sag8zOWmCb1keAg28k+e7IELT7c+E1+2SNKRRhGKB9I9GpukwV9r1Mr/ll/nGwFXz9 QF1tRIf/s/d0B4i/83LOrr5ZA5uKhgpApzEL+f+fvNaKNfDTDFMQputW+W0wC1yAGTgJ 1xY4enNkvT7ErvR2qLR8KSLyYNtdi6W9Ignb/uMTUo15ku/3q0WgPVsjWj7GvAIVvMQX Ymc17XZLQMbSL70NEAi8yfUlX1nk1Y0JBN72X0Kq96eM6nio9rYFwEPbz1JLTfSXyEAP TgNgu45S/K+jHTe6sqkBwhb9ICNUuXGSvJu2xFzRjYtCq7tLQMH/BYg4pVC6hR3SogJJ RANA== MIME-Version: 1.0 X-Received: by 10.112.47.1 with SMTP id z1mr11859294lbm.11.1365433859554; Mon, 08 Apr 2013 08:10:59 -0700 (PDT) In-Reply-To: References: <5161e996$0$29995$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 8 Apr 2013 16:10:59 +0100 Subject: Re: Splitting of string at an interval From: Arnaud Delobelle To: Roy Smith Content-Type: text/plain; charset=UTF-8 Cc: Python 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365433862 news.xs4all.nl 6899 [2001:888:2000:d::a6]:49711 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43078 On 8 April 2013 14:21, Roy Smith wrote: > For a while, I was rabidly(*) into TDD (Test Driven Development). The > cycle I was using was, "Write a specification of a behavior, write a > (failing) test for that behavior, then write the least possible amount > of code to make the test pass. Lather, Rinse, Repeat, Ship" > > The "least possible" part is important. It makes sure the cycles stay > short (ideally, just a few minutes), and that you don't write any code > for which you don't have tests. The least amount of code is often also not the best in terms of time or space complexity. Does this mean you have to write tests for time and space complexity as well? That's interesting, but I don't know of tools to help do that (time complexity seems easy enough, but space complexity seems tougher to me). -- Arnaud