On Fri, Dec 11, 2009 at 12:06 PM, Philip Potter <philip.g.pot...@gmail.com>wrote:
> The point is that in the first version, you are constantly bouncing > from the big-picture ideas to the low-level messy details. By > abstracting code out into subroutines populate_x(), populate_y() and > process_xy(), you have the main script which deals in big ideas, and > three subroutines which deal with messy details. A subroutine should > do one thing, and do it well. > Check out literate programming <http://www.literateprogramming.com/>. It moves big-picture ideas into the structure. Then you can add subroutines where they make sense - for code used by more than one place. Leo <http://webpages.charter.net/edreamleo/front.html> is a pretty nice tool fro writing programs in a literate style. -- Robert Wohlfarth