Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92783

Re: Classic OOP in Python

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'python,': 0.02; 'subject:Python': 0.05; 'failing': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'test,': 0.05; 'important,': 0.07; 'wednesday,': 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; '"right"': 0.16; 'design:': 0.16; 'fits': 0.16; 'imo,': 0.16; 'inputs': 0.16; 'meanwhile,': 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; 'threw': 0.16; 'wrote:': 0.16; 'string': 0.17; 'tests.': 0.18; 'tests': 0.18; 'input': 0.18; 'language': 0.19; '>>>': 0.20; 'fix': 0.21; '(the': 0.22; 'java': 0.22; 'back.': 0.22; 'lawrence': 0.22; 'pass': 0.22; 'code.': 0.23; '2015': 0.23; 'wrote': 0.23; 'header:In-Reply-To:1': 0.24; 'developers': 0.24; 'written': 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; 'factor': 0.29; 'hour.': 0.29; 'prints': 0.29; 'sure,': 0.29; 'thus,': 0.29; 'branch': 0.31; 'putting': 0.31; 'waste': 0.31; 'window': 0.31; 'code': 0.31; 'run': 0.32; 'system,': 0.32; 'language.': 0.32; 'point': 0.33; 'class': 0.33; 'done,': 0.33; 'another': 0.34; 'requirements': 0.34; 'to:addr:python-list': 0.35; 'really': 0.35; 'but': 0.36; 'project': 0.36; 'possible': 0.36; 'cases': 0.36; 'should': 0.37; 'agree': 0.37; "didn't": 0.37; 'subject:: ': 0.37; 'starting': 0.38; 'front': 0.38; 'version': 0.38; 'received:org': 0.38; 'green': 0.38; 'unit': 0.38; 'say': 0.38; 'doing': 0.38; 'end': 0.39; 'test': 0.39; 'to:addr:python.org': 0.39; 'build': 0.40; 'where': 0.40; 'mark': 0.40; 'further': 0.60; 'learn': 0.60; 'your': 0.60; 'even': 0.61; 'simple': 0.61; 'video': 0.61; 'more.': 0.62; 'is.': 0.63; 'complete': 0.63; 'great': 0.64; 'minutes': 0.64; 'email addr:gmail.com': 0.64; 'our': 0.64; 'due': 0.65; 'charset:windows-1252': 0.65; 'us,': 0.73; 'brand': 0.75; 'life.': 0.81; 'batchelder': 0.84; 'beats': 0.84; 'exercise,': 0.84; 'pythonistas,': 0.84; 'subject:Classic': 0.84; 'utc-7,': 0.84; 'zen': 0.84; 'watched': 0.91; 'taught': 0.97
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Classic OOP in Python
Date Wed, 17 Jun 2015 22:49:28 +0100
References <23b2fae3-91d5-486b-9898-78b34bee486f@googlegroups.com> <16dc8c92-50e3-4fc8-ae25-cbc5b13e8971@googlegroups.com> <87eglaqdca.fsf@elektro.pacujo.net> <6944ae86-86eb-4a9b-be05-21d0be7bb206@googlegroups.com>
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 <6944ae86-86eb-4a9b-be05-21d0be7bb206@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.565.1434577799.13271.python-list@python.org> (permalink)
Lines 56
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434577799 news.xs4all.nl 2839 [2001:888:2000:d::a6]:50664
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92783

Show key headers only | View raw


On 17/06/2015 22:33, sohcahtoa82@gmail.com wrote:
> On Wednesday, June 17, 2015 at 1:39:31 PM UTC-7, Marko Rauhamaa wrote:
>> Ned Batchelder <ned@nedbatchelder.com>:
>>
>>> 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
>
> I had a Java class where we had to learn TDD, and that's the way TDD was taught to us, and I hated it.  We watched a video of this guy explaining TDD with a hat that was red on the front and green on the back.  It involved writing a simple failing unit test, then write code to fix it, then refactor the tests and/or code.
>
> As an in-class exercise, we had to write an implementation of Conway's Game of Life.  I threw TDD out the window and just wrote the damn program in under 15 minutes, then another 10 minutes to write unit tests that tested every possible code branch and several invalid inputs.  Meanwhile, the people doing TDD the "right" way didn't even have a complete program after over an hour.
>
> The brand of TTD we were taught would end up multiplying development time by at least a factor of 3, and by the time you were done, at least 75% of the tests you had written will have been removed due to rampant refactoring.
>
> IMO, that kind of TTD is an utter waste of time.
>

Couldn't agree with you more.  To once again quote my favourite part of 
the Zen of Python, "practicality beats purity".

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Classic OOP in Python "Jason P." <suscricions@gmail.com> - 2015-06-17 12:21 -0700
  Re: Classic OOP in Python Skip Montanaro <skip.montanaro@gmail.com> - 2015-06-17 14:38 -0500
  Re: Classic OOP in Python Ned Batchelder <ned@nedbatchelder.com> - 2015-06-17 12:44 -0700
    Re: Classic OOP in Python Marko Rauhamaa <marko@pacujo.net> - 2015-06-17 23:39 +0300
      Re: Classic OOP in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-17 22:07 +0100
      Re: Classic OOP in Python Ned Batchelder <ned@nedbatchelder.com> - 2015-06-17 14:14 -0700
        Re: Classic OOP in Python Laura Creighton <lac@openend.se> - 2015-06-18 00:33 +0200
          Re: Classic OOP in Python Ned Batchelder <ned@nedbatchelder.com> - 2015-06-17 15:55 -0700
        Re: Classic OOP in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-18 11:50 +0100
        Re: Classic OOP in Python Laura Creighton <lac@openend.se> - 2015-06-19 01:01 +0200
        Re: Classic OOP in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-20 23:52 +0100
        Re: Classic OOP in Python Laura Creighton <lac@openend.se> - 2015-06-21 10:26 +0200
      Re: Classic OOP in Python sohcahtoa82@gmail.com - 2015-06-17 14:33 -0700
        Re: Classic OOP in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-17 22:49 +0100
        Re: Classic OOP in Python Laura Creighton <lac@openend.se> - 2015-06-18 00:22 +0200
        Re: Classic OOP in Python Marco Buttu <marco.buttu@gmail.com> - 2015-06-18 11:00 +0200
      Re: Classic OOP in Python Laura Creighton <lac@openend.se> - 2015-06-18 00:09 +0200
      Re: Classic OOP in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-17 23:27 +0100
      Re: Classic OOP in Python Steven D'Aprano <steve@pearwood.info> - 2015-06-18 08:58 +1000
        Re: Classic OOP in Python Cousin Stanley <cousinstanley@gmail.com> - 2015-06-18 08:10 -0700
      Re: Classic OOP in Python Terry Reedy <tjreedy@udel.edu> - 2015-06-17 19:46 -0400
      Re: Classic OOP in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 10:07 +1000
      Re: Classic OOP in Python "Jason P." <suscricions@gmail.com> - 2015-06-18 04:24 -0700
    Re: Classic OOP in Python "Jason P." <suscricions@gmail.com> - 2015-06-18 04:21 -0700
      Re: Classic OOP in Python Ned Batchelder <ned@nedbatchelder.com> - 2015-06-18 04:54 -0700
    Re: Classic OOP in Python "Jason P." <suscricions@gmail.com> - 2015-06-18 04:22 -0700
  Re: Classic OOP in Python sohcahtoa82@gmail.com - 2015-06-17 14:16 -0700
    Re: Classic OOP in Python Fabien <fabien.maussion@gmail.com> - 2015-06-18 13:03 +0200
      Re: Classic OOP in Python Marko Rauhamaa <marko@pacujo.net> - 2015-06-18 14:25 +0300
      Re: Classic OOP in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 21:43 +1000

csiph-web