recall

← recall

primitive obsession termsmell

using strings/ints where a domain type would carry meaning

Phone numbers, emails, money, dates as strings or ints throughout the code. No validation at the boundaries; no type-level distinction between

    0 and 10°C; bugs of the form 'we passed a userId where we wanted a productId.' Fix: domain types (value objects) for things that aren't just primitives.

    topics: refactoring, engineering-judgment

    references: