Briefle words · Code & architecture
Verb-noun naming
The convention of naming functions as an action plus its object, like send_email or calculate_total.
Say it to an AI
Python module statements.py for our ledger: build_statement(account_id, month) that uses fetch_transactions for the DB query and calculate_monthly_interest for the math. Use verb-noun naming for every function, nouns only for data, so any side effect like a query is obvious from the name.
How an expert would brief the stronger version of “Monthly statement”.
See it
Try it as a puzzle →Python module in a fintech app that builds a customer's monthly account statement.
Why: A has calculate_monthly_interest, fetch_transactions and build_statement; B has the bare nouns monthly_interest, transactions and statement_data.
Related words
Room 2 · Naming
Learn “Verb-noun naming” in a five-minute lesson