Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Follow publication

Code Smell 47 — Diagrams

Maximiliano Contieri
Dev Genius
Published in
2 min readDec 9, 2020

Photo by Nick Seagrave on Unsplash

Problems

  • Maintainability
  • Trash code
  • Code Duplication
  • Diagrams focus only on structure (accidental) and not behavior (essential).

Solutions

  1. Use diagrams only to communicate ideas with other humans.
  2. Program on your favorite IDE.
  3. Thrash all diagrams. Even the ones generated from the source code.
  4. Trust your tests. They are alive and well maintained.
  5. Use Domain Driven Design technique.

Sample Code

Wrong

Right

Detection

We can remove all code annotations and forbid them by policy.

Examples

Conclusion

Designing is a contact sport. We need to prototype and learn from our running models.

Papers and JPGs don’t run. They live in the utopic world where everything works smoothly.

CASE was a very hot trend back in the 90s. No good system was developed with these tools.

Relations

More info

The Diagram is Not the Model. The model is not the diagram. It is an abstraction, a set of concepts and relationships between them.

Eric Evans

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Written by Maximiliano Contieri

I’m a senior software engineer specialized in declarative designs. S.O.L.I.D. and agile methodologies fan. Maximilianocontieri.com

No responses yet

Write a response