software design question

Michele Simionato michele.simionato at poste.it
Wed Feb 11 02:16:07 EST 2004


llothar at web.de (Lothar Scholz) wrote in message news:<6ee58e07.0402080823.75df2850 at posting.google.com>...
> > Is 500 lines a good count to start splitting up the code?
> 
> No !
> My modules are normally between 1000-3000 lines. Having to much files
> (worst case scenario is PHP) is just another form of spaghetti code.

Oh! As a comparison, my modules are typically 100-200 lines long. I don't
feel they are spaghetti, since they are collected in directories with
well chosen names and/or in packages. Also, they are typically intended
to be reusable. Moreover, I feel much easier to edit simultaneously 
three or four buffers than to navigate back and forth on a very long single 
buffer. Finally, I don't want to be too dependent on the editor features, so
small modules are a win should I need to use Notepad (God save me! ;)

P.S. once I computed the average lenght of modules in the standard library.
The result was something like 200 lines.

   Michele Simionato



More information about the Python-list mailing list