podia/counter

Naming things

ideasasylum opened this issue · 0 comments

Starting with the easy problems in computer science 😉

I'm trying not to worry too much about names at this stage or it would give me an excuse for procrastination. Instead, let's fix it in post! Ideas and discussions welcome/needed on…

  • Counter::Value holds the reconciled value of the counter. I'm not overly happy with this name, especially as it has a value column and Value#value sounds daft
  • Counter::Change holds the changes pending/made to the counter value. A Value has_many :changes but this clashes with the Rails changes method. It's currently Value has_many :updates but it might be nice to resolve this early on
  • Counter::Counters.counters.find_counter 😬 Not sure about the find_counter method on the association but I couldn't think of another name… (but also it's dangerously/hilariously close to Counter::Counters.counters.counter
  • Counter::Countable 🤷‍♂️ probably ok
  • Counter::CounterConfig isn't the right thing but I think this struct should be a first-class object and perhaps mixed-in to Counter::Value?
  • Counting is model doing the counting, a.k.a the parent model, e.g. a store;
  • Countable is the thing which is counted, e.g., an order