---
title: Function Names Verb-Noun
impact: LOW
impactDescription: makes code self-documenting
tags: naming, functions, readability, conventions, quality
---

## Function Names Verb-Noun

Methods in Ruby should describe actions clearly. Action verbs make the purpose manifest.

**Incorrect (vague names):**

```ruby
def user           # Noun only
end

def user_data       # Noun only
end

def do_something    # Vague
end

def handle_stuff    # Vague
end
```

**Correct (action verbs):**

```ruby
def fetch_user
end

def create_user_account
end

def validate_email_format?
end

def calculate_total_price
end

def send_confirmation_email
end

def convert_currency_to_usd
end
```

**Verb categories:**

| Category | Verbs |
|----------|-------|
| Retrieval | `get`, `fetch`, `find`, `load`, `query` |
| Creation | `create`, `build`, `make`, `generate` |
| Modification | `set`, `update`, `modify`, `change` |
| Deletion | `delete`, `remove`, `destroy`, `clear` |
| Validation | `validate`, `verify`, `check`, `ensure` |
| Computation | `calculate`, `compute`, `parse`, `format` |
| Boolean | `is`, `has`, `can`, `should`, `will` |

**Tools:** PR review, RuboCop
---
