Common Solution Domain Words to Be Wary Of

Common Solution Domain Words to Be Wary Of

These words do not always refer to the solution domain of some given code, but they often do. If you find yourself creating variable names with these terms, take some time to re-evaluate if these are solution domain terms in your context. If so, see if there are ways to orient your variable names more in the problem domain and avoid these words (without causing problems in the ecosystem of other variables you’re working with):

  • array

  • collection

  • container

  • dictionary

  • entry

  • enum

  • field

  • function

  • handle

  • input

  • instance

  • iterator

  • key

  • list

  • method

  • nil

  • null

  • object

  • output

  • pair

  • predicate

  • set

  • span

  • struct

  • tuple

  • type

  • value

 

These words aren’t always bad, and sometimes they’re important in particular problem domains. This list just provides a quick reference of terms to think on where you might be able to adjust your names to be more in the problem domain, raising the level of abstraction so that the problem the code is solving is clearer.

Code in the zone ad.png