• Cows Look Like MapsOP
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Or you’re stuck within the confines of a horrible legacy system which the business will not allow you the time to refactor/rewrite but still want your code to be somewhat readable.

    But in general, I agree with your argument. When writing from scratch or improving reasonably well designed code, often documentation could be replaced by breaking it up into another function or naming variable better. It’s a bit of a code smell for violating the SRP. And yet there are times that documentation is needed for the “why”. Things are nuanced I guess.