[Discuss] OT Rant/Discussion C vs C++

Doug sweetser at alum.mit.edu
Wed Dec 19 15:05:37 EST 2012


I am becoming a fan of Test Driven Development using Python.  The hope
is for code that is a little more readable than alternatives.  All the
tests do two things.  First, it drives smaller methods because they
are easier to test.  Second it shows explicitly how to use the code.

The process of writing tests and code has made me a code re-writer
more than just a writer.  My first drafts of code are BAD, although
parts work.  The tension between the test and the class file help make
things simpler and more consistent.

Another advantage in maintaining the code is that any new changes made
after the original writer has left can be tested.  There are so many
hidden dependencies, it is hard to tell if a new fix breaks something
else.

Doug



More information about the Discuss mailing list