Hi,

--- On Wed, Nov 16, 2011 at 7:54 AM, Girish Venkatachalam
<girishvenkatacha...@gmail.com> wrote:
| int
| dl(char *url)
\--

Answering to your reply on dl() function not being too long. It is not
just that. It is a question of being modular.

Tomorrow, if I want to change the way I connect or download, I only
need to change the function that does that rather than the dl()
function. In fact, one can have multiple functions for different types
of connections, and let the user choose based on options
(static/dynamic). A function must do one job and do it well. This
allows the design to scale, rather than having to maintain multiple
versions of the dl() function.

Write programs that do one thing and do it well ~ Douglas McIlroy

Of course, this is a trivial example for demonstration, but, good
habits start early.

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to