Good programming as seen in: Fw: Is this possible in Python ?

Alex Martelli aleax at aleax.it
Sun May 18 04:22:58 EDT 2003


King Kuta wrote:
   ...
> No "debbugging" ? Wow that sounds heaven if OOP could save me taht....

That's an overbid and not what Chad said:

>> building your software in such a way as you don't have to ever do this
>> kind of debugging (the old "peek at variables and trace program flow",

not THIS KIND OF debugging.  Bugs still exist and you still have to
find them (then you beef up your test suite to ensure the bug is caught
in testing).  But you can do that in different ways.


> Can I ask anybody to explain to me (or simply point me to online
> references...) the meaning of:
> (i) ...you design with testing suites (such as unit tests)...

I took over 30 pages in the Nutshell to cover "Testing, Debugging
and Optimizing" (chapter 17) and I'm not going to summarize them
here.  Google for "test-driven" and "test-first" to get the gist of 
this approach.


> (ii) ...and "contracts" (often reduced to putting 'assert' statements

Similarly, goggle for "design by contract".

BTW, since you're posting from a .it address -- it.comp.lang.python
is now open and you can discuss Python in Italian there -- much lower
volume than comp.lang.python, of course, but still could be useful.


Alex





More information about the Python-list mailing list