Path: csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'important,': 0.07; 'invalidate': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'satisfy': 0.09; 'surrounded': 0.09; 'python': 0.11; 'design:': 0.16; 'fits': 0.16; 'inputs': 0.16; 'outputs': 0.16; 'parentheses': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:OOP': 0.16; 'wrote:': 0.16; 'string': 0.17; 'tests.': 0.18; 'tests': 0.18; 'input': 0.18; 'language': 0.19; '(the': 0.22; 'lawrence': 0.22; 'pass': 0.22; "i've": 0.24; 'header:In- Reply-To:1': 0.24; 'developers': 0.24; 'testing': 0.25; 'header :User-Agent:1': 0.26; 'idea': 0.26; 'header:X-Complaints-To:1': 0.26; 'wonder': 0.27; 'least': 0.27; 'prints': 0.29; 'sure,': 0.29; 'thus,': 0.29; 'putting': 0.31; 'code': 0.31; 'run': 0.32; 'system,': 0.32; 'language.': 0.32; 'point': 0.33; 'another': 0.34; 'requirements': 0.34; 'to:addr:python-list': 0.35; 'really': 0.35; 'but': 0.36; 'project': 0.36; 'cases': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'starting': 0.38; 'version': 0.38; 'received:org': 0.38; 'say': 0.38; 'test': 0.39; 'things': 0.39; 'to:addr:python.org': 0.39; 'build': 0.40; 'mark': 0.40; 'further': 0.60; 'your': 0.60; 'even': 0.61; 'is.': 0.63; 'great': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; 'awesome,': 0.84; 'batchelder': 0.84; 'pythonistas,': 0.84; 'subject:Classic': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Classic OOP in Python Date: Wed, 17 Jun 2015 22:07:43 +0100 References: <23b2fae3-91d5-486b-9898-78b34bee486f@googlegroups.com> <16dc8c92-50e3-4fc8-ae25-cbc5b13e8971@googlegroups.com> <87eglaqdca.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-183-3.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <87eglaqdca.fsf@elektro.pacujo.net> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434575416 news.xs4all.nl 2872 [2001:888:2000:d::a6]:37813 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92779 On 17/06/2015 21:39, Marko Rauhamaa wrote: > Ned Batchelder : > >> TDD is about writing tests as a way to design the best system, and >> putting testing at the center of your development workflow. It works >> great with Python even without interfaces. > > I wonder how great it really is. Testing is important, that's for sure, > but to make it a dogmatic starting point of development is not that > convincing. > > The way it was explained to me was that in TDD you actually don't write > code to any requirements or design: you simply do the least to pass the > tests. Thus, say you need to write a program that inputs a string and > outputs the same string surrounded by parentheses (the requirement), the > starting point might be this test case: > > - run the program > - give it the word "hello" as input > - check that the program prints out "(hello)" > > The right TDD thing would be to satisfy the test with this program: > > input() > print("(hello)") > > That *ought* to be the first version of the program until further test > cases are added that invalidate it. > > > Another interesting ism I have read about is the idea that the starting > point of any software project should be the user manual. The developers > should then go and build the product that fits the manual. > > > Marko > Awesome, one of the funniest things I've read in years. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence