• lysdexic
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year ago

    but we can agree on which of two implementations is shorter.

    Shortness for the sake of being short sounds like optimizing for the wrong metric. Code needs to be easy to read, but it’s more important that the code is easy to change and easy to test. Inline code and function calls are renowned to render code untestable, and introducing abstract classes and handles is a renowned technique to stub out dependencies.