Post APuPMxZK6fPtfqEVpw by MoskitoHero@ruby.social
 (DIR) More posts by MoskitoHero@ruby.social
 (DIR) Post #APuPMxArZbqoRymyi8 by MoskitoHero@ruby.social
       2022-11-23T20:44:29Z
       
       0 likes, 0 repeats
       
       Hello ruby fellows !How do you pick name for your concerns? Sometimes, the -able suffix is odd or does not describe the responsibility of the inclusion.I have Orders, Bookings and Quotes for which I want to centralize price calculations and behaviour in a model: calculating VAT, rebates etc.I could create Rebatable, Taxable, etc. But since this is a refactor, I want to go for a single concern and split it later.I think Priceable is odd, Orderable doesn't really fit the use... HasPricing?
       
 (DIR) Post #APuPMxZK6fPtfqEVpw by MoskitoHero@ruby.social
       2022-11-23T20:56:18Z
       
       0 likes, 0 repeats
       
       Naming things is so important in code.A well-picked class or variable name is what turns your working code into meaningful, actionable code.
       
 (DIR) Post #APuPMxzuVogT0IfkHI by MoskitoHero@ruby.social
       2022-11-23T21:15:15Z
       
       0 likes, 1 repeats
       
       Today, there was this class name I was not happy with. I couldn't find any satisfying alternative.I started a discussion on Slack, asking for people's opinion. Other developers (even non-rubyists) started proposing names.Then our marketing lead surprisingly joined in and asked one or two questions. Those questions guided into picking a name that was both clear and meaningful.I wouldn't summon the marketing team for every variable name hesitation, but that was a pleasant experience.