• 0 Posts
  • 287 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle

  • I have settled into this pattern:

    1. Name expands as I understand better the structural role of a thing. Duplication in names begins to become easier to spot.
    2. Removing duplication in names means introducing helpful structures, resulting in shortening names again, particularly as the intent/purpose of thing becomes clearer.

    Long names stay unnecessarily long when we don’t notice the patterns that suggest the missing structures.

    The more examples of this kind of thing, the better!

    (And my preferred name for that is rolesByEmployee. In general, “values by key”.)





  • Is this a problem for you or merely annoying? I mean the difference between you being blamed for their poor results and you merely being inconvenienced by doing extra work.

    You might need to train yourself to accept the situation as it is and hope for someone in authority to make things better. It’s not easy, but this might be a good chance for you to build that skill. 🤷

    Can you talk openly with your manager about this situation? Would it be helpful to you to propose to your manager that you help that group? Maybe your manager would appreciate your attempt at leadership.

    Good luck.










  • Best Practices thinking considered harmful. 🤷

    I like test names that are full sentences. Doing this for its own sake is unnecessary. It’s probably wise to practise this for a year, then decide when you still need it.

    For me, quite often, a combination of the test group name (often naming a behavior) and test function name (often naming a special case of that behavior) suffices, even though it is not a full sentence. (Example: test class SellOneItem, test method productNotFound. Is this not clear enough?)

    Test function names that merely repeatedly duplicate details (“conversion should…” to start 12 test names) indicate a test group trying to emerge (“Conversion Tests”). Insisting on full sentences for its own sake often either masks this risk (and delays helpful refactoring) or represents redundancy (merely reiterating what has been helpfully refactored).

    I have found this attention to full sentence names most helpful for tests whose audience is not programmers, since those folks are not accustomed to common source code conventions and patterns. For Programmer Tests, I think “should” turns this helpful advice into a risky overstatement.