×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

complexity question

complexity question

complexity question

(OP)
why is complexity an issue and discuess cohesion and coupling, networks vs hierarchies? not sure what the answer to this question is. ive looking up several books and internet.

RE: complexity question

Not sure what kind of complexity you mean, but I can make a guess. There are different kinds of complexity metrics. The one I encountered the most was the "depth of loops", which is obviously not meant here.

Let me give you an example. You might have an audio set of devices. They are wired to each other, each to the wall socket (the electrical system of your house), each to the amplifier, which connects to the loudspeakers. This is a fairly normal design.

Some people connect the grounding connection to a water pipe. Water pipes are grounded, so this looks like a good deal. However, this makes the system overly complex. Your system now also depends on the water system, which can lead to unwanted consequences. Your audio system can suffer from ground loops if it is also grounded through the electrical system, and if a device fails, you could get electricity on your tap water. Ouch!

So, from a design point of view, there should not be a dependency to the water system at all when there is no water involved. Not even if the water system is conveniently close.

I think your complexity mainly deals with "lone ranger" objects that try to everything themselves, and therefore have knowledge of too many objects outside their field of responsibility.

If you distribute the responsibilities, you can introduce levels of abstraction that makes the design more flexible and more maintainable. In you audio system, the sound plugs are a good example of such abstraction. Your amplifier does not care if you connect a cassette player, a DVD player, an MP3 player, etc. A bad example is the gramophone plug, as this refuses to implement the standard "audio plug" interface by giving the wrong signal strength. So each amplifier has to deal with them separately, which makes the system overly complex.

Does this answer your question?
 

+++ Despite being wrong in every important aspect, that is a very good analogy +++
   Hex (in Darwin's Watch)

RE: complexity question

the reason you may have trouble finding information is the topic is either
1. too broad
2. not well defined.

I don't know what you mean by networks vs. hierachies, but coehsion, coupling and complexity are common OOP issues. The best information for this are the S.O.L.I.D. design principles. these are language agnostic, but c# and java are the most common languages for examples.

where you see the term "interface" think contract (which could be an interface, abstract class, or non-sealed class with virtual members)

Jason Meckley
Programmer
Specialty Bakers, Inc.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close