3 ms·
One thing I do when I can't immediately think of a domain-appropriate name is to give an obviously wrong one, like "new_function_01". During a complex refactori
by vinceguidry 10y ago
One thing I do when I can't immediately think of a domain-appropriate name is to give an obviously wrong one, like "new_function_01". During a complex refactoring, I may have dozens of such methods or variables. Eventually the variations are all smoothed out and I can replace 20 different method calls with one method call with perhaps an additional argument. That method is way easier to name.
Naming seem to be the last step of refactoring. Refactoring is the process of manipulating / identifying the semantics of an application, names are human-readable tags that ease the mental task of understanding semantics.
- BurningFrog 10y agoI do the ugly names too. One of two things usually happen: - As I work with the code, the name becomes obvious. - The variable/function turns out to disappear during the work. One more case of how it can be better to decide something later, when you know more.