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.
0 comments
No comments yet.
- jNext
- kPrevious
- EnterOpen
- oOpen, without leaving the letters
- .Its acts
- rReply
- cWrite
- /Search
- ?These keys