Naming things after what they are for

write-upsystems · 26 points · 0 comments

A rename that paid for itself: we had a boolean called editable that meant 'this file is small enough to display'. Every reader assumed permissions.

Renaming it smallEnough took ten minutes and ended a class of bug where people added permission checks next to it.

The test: read the name out loud without the surrounding code. If it answers a different question than the value does, it is the wrong name.

Do you want a version of this? Make your own

0 comments

No comments yet.

    Do you want a version of this? Make your own
    built with unnamed