how to become a really good Python programmer?

Eric S. Johansson esj at harvee.org
Thu Jun 17 19:47:20 CEST 2004


Richie Hindle wrote:

 > A concrete example of why it's hard and why it leads to better code: I have
> a lightweight RPC system (as yet unpublished) that sends "safe pickles" over
...
> tiny transport module to implement a socket transport for it.  Done right,
> the transport module would be so trivial that either it didn't need unit
> tests, or the tests would be very simple.
> 
> A question for experienced TDD-ers: is TDD really more intellectually
> demanding than code-first, or am I either a) doing it wrong, or b) stupid?

it sounds to me like it's a code focused variant of programming by contract.  google will turn up any number of good references on the concept as well as practical implementation.

TDD reminds me of a technique I used for many years called radical top-down design.  This technique was developed in the 1970s but probably became not PC because you could not predict (even grossly) how long you would take and the team requirements.  The reason it was successful is because you never wrote more than a few lines of code before writing a test case to exercise those lines of code.  You are always thinking one level ahead (at least) in terms of what services you wanted available.  Granted, it was pre-object-oriented but it's still works well today in small teams that communicate well.

you'll need to go to physical paper in order to find references.  I don't believe anybody has put this information on the Web.  At least not in a place that can be found by google.

---eric






More information about the Python-list mailing list