Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92777
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: Classic OOP in Python |
| Date | Wed, 17 Jun 2015 23:39:17 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <87eglaqdca.fsf@elektro.pacujo.net> (permalink) |
| References | <23b2fae3-91d5-486b-9898-78b34bee486f@googlegroups.com> <16dc8c92-50e3-4fc8-ae25-cbc5b13e8971@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="5244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6q4E8b16/vr4oCsyjJwub" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| Cancel-Lock | sha1:6z/fXKYaL5+tCwl8QiHzFwtyeWo= sha1:NWvXCZaAnrt9o8ndyjufXXKg4co= |
| Xref | csiph.com comp.lang.python:92777 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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