๐Ÿงผ Clean Code

  • CUPIDโ€”for joyful coding [๐Ÿ‡ฌ๐Ÿ‡ง] [Feb 2022]

    What started as lighthearted iconoclasm, poking at the bear of SOLID, has developed into something more concrete and tangible. CUPID is an alternative to SOLID.

    CUPID stands for:

    • Composable: plays well with others

    • Unix philosophy: does one thing well

    • Predictable: does what you expect

    • Idiomatic: feels natural

    • Domain-based: the solution domain models the problem domain in language and structure

      CUPID are properties, while SOLID are principles. Properties are qualities or characteristics of code rather than rules (principles) to follow.

      The greatest programming trait is empathy; empathy for your users; empathy for support folks; empathy for future developers; any of whom may be future you. Writing "code that humans can understand" means writing code for someone else.