FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
March 26, 2003
Understanding First Principles

Rosalyn Lum
Advocates of Emergent Design sing the praises of cohesion, coupling, focus and redundancy.
Untitled Document

Understanding First Principles

Advocates of Emergent Design sing the praises of cohesion, coupling, focus and redundancy.

By Rosalyn Lum
March 26, 2003

“If you have a hammer and a screwdriver in your toolbox, the question is not what tool you should use, but what problem you want to solve,” remarked Net Objectives CEO Alan Shalloway in his Monday morning tutorial, “Emergent Design: Refactoring and Design Patterns For Agile Development,” at SD West 2003 in Santa Clara, Calif. Shalloway and his co-presenter Scott Bain sought to answer the question: What does it take to design good software? Both presenters advocate the Emergent Design approach, based on agile principles: Understanding the problem as you’re trying to solve it, requiring developers to embrace, rather than resist change. According to Shalloway, “You have to step back and see things that neither you nor your customer will ever think of, and the ability to think in patterns will help.”

To do this, sufficient but not excessive methodology must be in place—an agile approach allows developers to respond to the changes in the project. Shalloway outlined agile principles, explaining that though an agile approach won’t necessarily truncate development time, it will give the customer what he wants: “Agility creates more work (more tests), but saves time later in finding errors in your system,” he explained.

Shalloway then enumerated the “first principles” of good software design:

  • Cohesion: The degree of relation of the operations in a class. The stronger the cohesion, the clearer your code.
  • Coupling: The strength of connection of two routines. In general, loose coupling allows objects to be responsible for themselves.
  • Focus: Related concepts should be organized in an understandable way, so that you have one place to look for things.
  • Redundancy: There should be none.

    Shalloway admitted that these ideals are reminiscent of the analyst’s advice to “buy low and sell high,” so he used the rest of the session to describe methods of pinning down abstractions into practice with unit testing, along with refactoring and coding standards.

    Why test before coding? Class testing, Shalloway noted, is a demonstration of knowledge that confirms you’re on the right track. Testing success largely depends on how well the first principles are implemented: The test-change-test-again methodology helps to re-enforce refactoring tenets (cleaning up bad code and accommodating changing requirements). Other vital practices aim at eliminating redundancy; employing exception handling, commonality and variability; identifying and encapsulating code variance; and promoting composition over inheritance. Finally, Shalloway added, pattern-oriented development allows developers to ignore the details while promoting proper interfaces to classes.

    TOP 5 ARTICLES
    No Top Articles.
  • DR. DOBB'S CAREER CENTER
    Ready to take that job and shove it? open | close
    Search jobs on Dr. Dobb's TechCareers
    Function:

    Keyword(s):

    State:  
  • Post Your Resume
  • Employers Area
  • News & Features
  • Blogs & Forums
  • Career Resources

    Browse By:
    Location | Employer | City
  • Most Recent Posts:
    MEDIA CENTER  more
    NetSeminar
    Modernize your Development by Moving Build and Code Quality Upstream
    Moderated by Jon Erickson, Editor-in-Chief of Dr. Dobb's, this interactive panel discussion brings industry experts Anders Wallgren, CTO of Electric Cloud and Gwyn Fisher, CTO of Klocwork together for a candid discussion of the cost savings, productivity and quality benefits that can be achieved by stabilizing builds and code quality as early in the development cycle as possible.

    The reality of today's development environment - geographically distributed teams, the use of Agile development practices, increasing application complexity, etc. - is straining the viability of the traditional coding, build and release process. To stay ahead of the curve, development teams are modernizing their approach to dealing with these issues, and as a result are achieving new levels of development productivity. Register for the webcast.
    Date: Wednesday, July 15, 2009
    Time: 11 am PT/2 pm ET
    Modernize your Development by Moving Build and Code Quality Upstream
    Moderated by Jon Erickson, Editor-in-Chief of Dr. Dobb's, this interactive panel discussion brings industry experts Anders Wallgren, CTO of Electric Cloud and Gwyn Fisher, CTO of Klocwork together for a candid discussion of the cost savings, productivity and quality benefits that can be achieved by stabilizing builds and code quality as early in the development cycle as possible.

    The reality of today's development environment - geographically distributed teams, the use of Agile development practices, increasing application complexity, etc. - is straining the viability of the traditional coding, build and release process. To stay ahead of the curve, development teams are modernizing their approach to dealing with these issues, and as a result are achieving new levels of development productivity. Register for the webcast.
    Date: Wednesday, July 15, 2009
    Time: 11 am PT/2 pm ET
                                   
    INFO-LINK

    Resource Links: