Jaaved Ali Khan

26%
Flag icon
The second option is to name a method after what it is supposed to accomplish and leave “how” to the various method bodies. This is hard work, especially when you only have a single implementation. Your mind is filled with how you are about to accomplish the task, so it’s natural that the name follow “how.” The effort of moving the names of method from “how” to “what” is worth it, both long term and short term. The resulting code will be easier to read and more flexible. • Name methods after what they accomplish.
Jaaved Ali Khan
Method name should describe what not how. How is implementation detail which should be defined by actual code not by name.
Smalltalk Best Practice Patterns
Rate this book
Clear rating
Open Preview