Comment with parsimony (was something else)

Monte Goulding monte at sweattechnologies.com
Tue May 13 18:40:01 EDT 2003


>
> >Firstly I should state that if you need to know where you call a function
> >from it's poor design.
>
> I don't agree.

I'm sorry my comments have touched a nerve. However, if you take almost any
software engineering class you will learn that a fundamental concept of
maitainable and reusable code is that it has low coupling and high cohesion.

Low coupling means that it has a well defined interface that is a given.
Changing the implementation doesn't matter if the interface is constant. It
also means that you avoid referencing the environment wherever possible
(globals, other objects, etc).

High cohesion means that everything that happens in the code serves a single
purpose. That means you would separate things like data access, manipulation
and display into scripts that just do those things. If you can write short
general purpose functions then you do.

Sometimes you need to break the rules but you avoid it as much as possible.

Regards

Monte




More information about the metacard mailing list