January 12, 2020

Modelling Time


Eric Evans, creator of Domain Driven Design


Very interesting detour of how to take a well established concept like JodaTime and create your own set of abstractions.

I like his main points:

  1. Produce tension with awkward examples

  2. Generate variation. Look for 'productive' models

  3. Introduce rigor

  4. Play in code

  5. Practice modeling

  6. Drill into one domain for a while

  7. Novelty and overcoming legacy blindness

the choose of the language matters a lot: it is inspirational, it provides constraints.


Geeneric subdomains makes good practice grounds

Why so stable?

  1. JodaTime is good enough. We stop searching

  2. We are used to it; it feels natural

  3. Our minds are captured, unable to imagine alternatives

Legacy blindness - specially when the legacy is good

The millisecond anchor - one of the awkwardness of JodaTime because which culture has these expectations?

Ideas: 1. String Time 2. Time Expressions


  1. Practice breaking out of a familiar legacy model

  2. Might even make a better time library?

  3. Examples that show awkwardness

  4. Generate lots of variations about the model (what are the things you hate?)

  5. The main criteria to evaluate a model is usefulness

  6. Is the model productive? Does it lead to other interesting thoughts?

  7. Loose the connection with the Clock

  1. Allen’s Interval Algebra. James F. Allen, 1983. A mathematical formalism of relations between time intervals.

Tags: design ddd