Home

Use Really Long Names

Start with a name that's really long. Write a sentence there in camel case. It won't be that way forever.

function createABouquetAndThenFillItWithFlowers() { ... }

var allOfTheFlowersWhichHaveAnyAmountOfRedInThem = [];

Try to fill the name with meaning specific to your problem space or your goal. Avoid words that repeat obvious information such as "variable" or "function" or "data" or "info". If you write a name and it immediately looks wrong, that's a sign that the past 5 seconds you spent typing helped you refine your problem or goal.

Or use tiny names.

You will update and refine these names in the future. For that, you have frictionless tools at your fingertips such as find-and-replace, multiple cursors, or language server name changes. Pick a name and move forward.

I think I picked this up from Clean Code by Robert C. Martin.

Backlinks
    No backlinks
Keywords
    No keywords