2 ms·
I usually write out a bunch of names without thinking to hard about them and then try to read them. In this instance, given that you've already had showButton a
by smcl 16y ago
I usually write out a bunch of names without thinking to hard about them and then try to read them. In this instance, given that you've already had showButton and shouldShowButton i'd probably look at:
result = buttonShown()
result = buttonVisible()
result = buttonIsVisible()
result = visibleButton()
result = !buttonHidden()
To a lot of programmers this would seem like a waste of time, but I'm with the article's author (and, I'd hope, other HN readers) in that it's time well spent.