Efficient python programming...
peter at engcorp.com
Fri Jun 7 14:17:26 CEST 2002
Eddie Corns wrote:
> A friend is fond of quoting this to me:
> Rules of Optimization:
> Rule 1: Don't do it.
> Rule 2 (for experts only): Don't do it yet.
> -- M.A. Jackson
> I wasn't going to bother contributing since others have said the same thing
> but the more people say the more you'll believe it :)
> Especially for a beginner the important thing is to get clear and obvious
> code. Later, IF IT ISN'T FAST ENOUGH, then you think about ways to speed it
You forgot the even more important first thing for a beginner:
get it correct! The only good way to do this is to write unit
tests that prove it. If you don't have tests, you don't have
working code (or how can you prove it?).
More information about the Python-list