My impression is that this article reflects a disconnect with the real world, as if you’d be coding…
Adrian Salceanu
42

Naming a method properly is really not an ‘intellectual pursuit’ or even a waste of time of the clients money. Meaningful and concise naming is one aspect of meaningful and concise modelling.

Your applications architecture and its naming should be as close as possible to the reality you’re modelling. In the case of this articles example its kind of up to the developer to get a picture of what this reality really is.

With the first naming approach of “PrivateNetworkProtector.protect_against_internal_ip_address(ip)” it is really hard to imagine anything in the ‘real world’ that would map on this piece of code.

With a guard that is enforcing a public-ip the role of this code is a great deal more apparent. DHH writes he would have spend about 5 minutes on finding a satisfying name for this class and method. If every future developer who’s looking at or touching this code in the future is saving only 1 minute by faster grasping the concept behind it, the ‘lost time’ will quickly be regained.

But chances are that way more time would get lost on the less concise naming. If I as a developer find a class, and I don’t quickly understand what it does, but it might affect my current mission in any way, I will quite likely start reading its code (or tests) and make sure I fully understand it.

On a bigger team, let this happen a dozen of times over the course of a year and you will have saved a valuable bit of time.

And not only will it safe time but also frustrating. So, by spending a little bit of time on this supposed ‘details’ you can not only improve your own happiness, but also saving your team some frustration while at the same time in the long run saving your client (or company) money.