Good Design

I’ve learned not to assume a team has experienced a variety of software design skills. Some are writing elegant functional-paradigm code in archaic, challenging languages. Others are writing strongly-coupled, heavily-commented, and procedural static methods in Java or C#.

 

I’ve found that “good design,” though not really subjective, is certainly contextual. It depends on the composition of the team, their combined experiences, how they communicate with each other (or avoid communicating), the history of their code, and what they’ve learned about Design Patterns, S.O.L.I.D. principles, etc.

Good software design is a career-spanning journey of discovery.
Because there are so many different ways to describe “good software design,” I tend to start with a pragmatic definition, and two simple techniques, that fit nicely into the notion of incremental (or emergent) design. These make up a minimal initial set of software design guidelines, necessary for an Agile team to begin delivering quality and value, and to quickly grow and learn as a team.

Rob Myers CoachingThe definition: A good design is one that is easy for the team to understand and maintain.

Can the team understand what the system does? Can the team easily extend or repair the system’s functionality?

To get there, I ask teams to absorb Kent Beck’s “Four Rules of Simple Design” and to refine their sensitivity towards “code smells.” From these, I believe, all other attributes, principles, and wisdom could be derived (eventually).

From an “Agilist’s” standpoint, these permit an opportunity for later, deeper learning to be applied to the existing system, without preventing that embryonic system from reaching sufficient robustness.

The Four Rules

Kent Beck’s Four Rules of Simple Design are (in the order of precedence):

  1. It works! It has tests, and they all pass.
  2. It’s understandable: The code is expressive, concise, and obvious to the team.
  3. Once and only once: Behaviors, concepts, and configuration details are defined in one location in the system (code, build scripts, config files). Don’t Repeat Yourself (DRY).
  4. Minimal: Nothing extra. Nothing designed for some as-yet-unforeseen future need. You Aren’t Going to Need It (YAGNI)

 

You’ll notice that there is a lot of overlap. For example, rules 2 through 4 could all dissuade you from creating an unnecessary class. Two respected colleagues have been able to reduce even this simple list to a list of two items (and a boatload of caveats or explanatory context). There were also some fiery debates over the order of the middle two rules.

And they’re all equally correct. Instead of arguing philosophically, I prefer to encourage the team to adopt practices that help avoid “breaking” these “rules”: TDD and BDD, Diligent Refactoring, Continuous Integration, Sit Together, Collective Responsibility, Pair Programming, Continuous Learning.

Code Smells
New behaviors introduced by changing requirements leave their mark on the design. This is the very thing that used to drive good developers away from software development: We design our system, and then an unexpected change request alters our preconceived design.

This deterioration happens on a large scale, as it did in my pre-Agile years, or even on a tiny scale, with Test-Driven Development.

When we use TDD, each tiny new micro-test, and the implementation of that specified behavior, has a commensurately tiny negative impact on design. We can repair the damage through Diligent Refactoring, but we have to be able to first recognize and identify the damage.

How to see the damage done on such a tiny scale? You’ve likely been doing it your whole development career: You notice that something isn’t quite right, or that a few small changes could place the new and old behaviors in a better relationship to each other.

In Martin Fowler’s book, Refactoring, Kent Beck and Fowler chose to call these infractions against good design “code smells.” They list many of the common smells and gave them names, similar to Design Pattern names, so teams can communicate effectively about the smells they dislike. They also provided a table (in the back of the Refactoring book, or here, courtesy Joshua Kerievsky at Industrial Logic: http://www.industriallogic.com/wp-content/uploads/2005/09/smellstorefactorings.pdf) mapping code smells to the refactorings that will help.

In the next Developer Essentials newsletter, we’ll see what this looks like in practice. Including, finally, some code!

Related Articles

Responses

https://bezaleelsolutions.com/privacypolicy/ https://okalyfleurs.com/ https://protogelvictory.it.com https://latotovictory.it.com https://tabichill.com/mancingduit/ https://snowsofthenile.com/contact-us/ https://aimlautism.com/FATCAI99/ NANASTOTO LATOTO TVTOTO WDBOS DEPOBOS PROTOGEL HOKIJITU FATCAI99 LUNATOGEL MANCINGDUIT https://archidiocesisgranada.es/santo-del-dia/santa-sofia-2/ https://archidiocesisgranada.es/noticias/contacto/ PROTOGEL TVTOTO TVTOTO JUTAWANBET WDBOS FATCAI99 FATCAI99 LUNATOGEL NANASTOTO LUNATOGEL PROTOGEL WDBOS JUTAWANBET DEPOBOS MANCINGDUIT WDBOS LUNATOGEL MANCINGDUIT DEPOBOS NANASTOTO LUNATOGEL JUTAWANBET NANASTOTO LATOTO TVTOTO JUTAWANBET NANASTOTO LATOTO TVTOTO MANCINGDUIT FATCAI99 BANDAR80 LAPAK99 JUTAWANBET NANASTOTO LATOTO TVTOTO WDBOS DEPOBOS PROTOGEL HOKIJITU LUNATOGEL MANCINGDUIT FATCAI99 BANDAR80 LAPAK99 BANDAR80 LUNATOGEL MANCINGDUIT JUTAWANBET LATOTO HOKIJITU TVTOTO PROTOGEL LATOTO TVTOTO WDBOS PROTOGEL HOKIJITU LUNATOGEL MANCINGDUIT BANDAR80 LAPAK99 TOGELON LIGABANDOT SITUSTOTO JUTAWANBET NANASTOTO LATOTO TVTOTO WDBOS DEPOBOS PROTOGEL HOKIJITU LUNATOGEL MANCINGDUIT FATCAI99 BANDAR80 MANCINGDUIT FATCAI99 SITUSTOTO LAPAK99 LIGABANDOT TOGELON SITUSTOTO LUNATOGEL https://www.maleributiken.se/integritetspolicy/ https://www.maleributiken.se/allmanna-villkor/ https://www.maleributiken.se/integritetspolicy/ LATOTO TOGELON SITUSTOTO JUTAWANBET NANASTOTO LATOTO TVTOTO WDBOS DEPOBOS PROTOGEL HOKIJITU LUNATOGEL MANCINGDUIT FATCAI99 BANDAR80 LAPAK99 DEPOBOS SITUSTOTO LIGABANDOT TOGELON NANASTOTO WDBOS DEPOBOS LUNATOGEL NANASTOTO HOKIJITU MANCINGDUIT FATCAI99 LAPAK99 LIGABANDOT SITUSTOTO JUTAWANBET NANASTOTO WDBOS DEPOBOS DEPOBOS DEPOBOS LAPAK99 PROTOGEL NANASTOTO DEPOBOS DEPOBOS NANASTOTO TVTOTO LATOTO PROTOGEL DEPOBOS NANASTOTO LUNATOGEL MANCINGDUIT DEPOBOS NANASTOTO LUNATOGEL MANCINGDUIT TVTOTO TOGELON SITUSTOTO LAPAK99 JUTAWANBET NANASTOTO TOGELON SITUSTOTO JUTAWANBET NANASTOTO TOGELON SITUSTOTO LUNATOGEL DEPOBOS NANASTOTO TOGELON SITUSTOTO JUTAWANBET LUNATOGEL TOGELON NANASTOTO JUTAWANBET TOGELON JUTAWANBET JUTAWANBET LATOTO NANASTOTO DEPOBOS LUNATOGEL NANASTOTO DEPOBOS TOGELON LUNATOGEL JUTAWANBET LATOTO SITUSTOTO JUTAWANBET LATOTO SITUSTOTO TVTOTO MANCINGDUIT NANASTOTO DEPOBOS TOGELON LUNATOGEL PROTOGEL TVTOTO MANCINGDUIT NANASTOTO TVTOTO MANCINGDUIT LAPAK99 HOKIJITU LATOTO FATCAI99 BANDAR80 PROTOGEL DEPOBOS JUTAWANBET TVTOTO https://barryvilleny.com/donation/ https://barryvilleny.com/scholarship/ https://barryvilleny.com/sitemap/ https://barryvilleny.com/privacy-policy/ MANCINGDUIT NANASTOTO TOGELON TVTOTO DEPOBOS LATOTO TOGELON NANASTOTO MANCINGDUIT FATCAI99 TVTOTO PROTOGEL NANASTOTO TOGELON LUNATOGEL PROTOGEL DEPOBOS WDBOS LATOTO TVTOTO MANCINGDUIT LAPAK99 FATCAI99 HOKIJITU LIGABANDOT BANDAR80 JUTAWANBET NANASTOTO TOGELON LUNATOGEL PROTOGEL DEPOBOS WDBOS LATOTO TVTOTO MANCINGDUIT LAPAK99 FATCAI99 HOKIJITU LIGABANDOT BANDAR80 JUTAWANBET NANASTOTO TOGELON LUNATOGEL PROTOGEL DEPOBOS DEPOBOS NANASTOTO TOGELON SITUSTOTO LUNATOGEL PROTOGEL DEPOBOS NANASTOTO TOGELON SITUSTOTO NANASTOTO TOGELON SITUSTOTO LUNATOGEL PROTOGEL DEPOBOS DEPOBOS NANASTOTO TOGELON NANASTOTO TOGELON SITUSTOTO SITUSTOTO PROTOGEL LUNATOGEL DEPOBOS LUNATOGEL https://desertbar.com/fee-arbitration/ MANCINGDUIT TVTOTO JUTAWANBET FATCAI99 LAPAK99 HOKIJITU TVTOTO LATOTO NANASTOTO NANASTOTO TVTOTO LATOTO DEPOBOS TOGELON WDBOS TVTOTO LATOTO NANASTOTO NANASTOTO DEPOBOS SLOT GACOR SLOT GACOR SLOT GACOR SLOT GACOR MANCINGDUIT TVTOTO WDBOS DEPOBOS LATOTO LIGABANDOT HOKIJITU NANASTOTO LUNATOGEL TOGELON MANCINGDUIT TVTOTO WDBOS DEPOBOS LATOTO HOKIJITU LIGABANDOT SITUSTOTO NANASTOTO TVTOTO MANCINGDUIT PROTOGEL NANASTOTO TOGELON LUNATOGEL SITUSTOTO DEPOBOS WDBOS JUTAWANBET TVTOTO MANCINGDUIT https://ebcconnects.com/resources/faq/ https://ebcconnects.com/resources/church-resources/ PROTOGEL JUTAWANBET TVTOTO MANCINGDUIT FATCAI99 HOKIJITU BANDAR80 JUTAWANBET TVTOTO MANCINGDUIT TVTOTO MANCINGDUIT NANASTOTO NANASTOTO TVTOTO TOGELON MANCINGDUIT WDBOS DEPOBOS LATOTO NANASTOTO LUNATOGEL SITUSTOTO TOGELON WDBOS DEPOBOS LATOTO JUTAWANBET HOKIJITU FATCAI99 NANASTOTO LUNATOGEL SITUSTOTO TOGELON LATOTO WDBOS DEPOBOS JUTAWANBET HOKIJITU FATCAI99 LIGABANDOT DEPOBOS LATOTO WDBOS NANASTOTO LATOTO TVTOTO LIGABANDOT BANDAR80 JUTAWANBET SITUSTOTO FATCAI99 DEPOBOS WDBOS DEPOBOS JUTAWANBET HOKIJITU FATCAI99