[dev] saving program options

From: Justin Jackson <jjackson385_AT_gmail.com>
Date: Sun, 24 Jan 2010 16:01:27 -0600

Well said.

> TAOUP also recommends small programs that do just one thing.  If you
> have so many options that you need a "huge structure" to store them,
> that might be a sign that your program is overly complex.  Consider
> factoring it into a set of smaller cooperating processes.
> Many people have become accustomed to thinking in terms of large,
> monolithic applications. This leads them to think of modularity as
> something that only applies to the functions within that kind of
> application.
> Instead, think of the *shell* as the main program and your set of small
> utilities as the modules.  The classic Unix utility designed to do one
> thing and do it well is the paradigm example of what we mean by
> coherence.  The operating system enforces encapsulation.  When the
> modules communicate with each other using text streams over stdin and
> stdout, or using sockets and text-based protocols like those described
> in TAOUP, then they will be loosely coupled.  These are the virtues
> which are usually associated with good "modularity".
> Take those rules of thumb like the ones you cite above and apply them to
> the programs themselves.  A program that takes a lot of options is like
> a function that takes a lot of arguments.
Received on Sun Jan 24 2010 - 22:01:27 UTC

This archive was generated by hypermail 2.2.0 : Sun Jan 24 2010 - 22:12:02 UTC