shlogg · Early preview
Maxi Contieri @mcsee1

Imperative Function Names Simplify Communication And Code Maintenance

Functions with unclear names confuse readers, increase cognitive load and reduce readability. Use descriptive, action-oriented names to convey intent and simplify communication.

Be Imperative!!

TL;DR: Functions with unclear names hide intent and confuse readers. Use descriptive, action-oriented names.

  
  
  Problems

Unclear function purpose
Increased cognitive load
Misleading context
Reduced readability
Difficult collaboration
Hidden functionality

  
  
  Solutions

Use action-oriented verbs
Make names descriptive
Reflect the function’s purpose
Avoid generic terms
Provide meaningful context
Express single responsibility clearly
Match action to outcome

  
  
  Refactorings


  
    
      
    
  
  
    
      Refactoring 005 - Replace Comment with Function Nam...