F6Beginner

Naming Review

30 minEvery code review

Format: Check whether variable names and function names are clear.

Good Naming vs Bad Naming:

Bad: d, tmp, data, handle, process, doStuff
Good: daysSinceLastLogin, userProfile, handlePaymentSubmission

Bad: function calc(a, b, c)
Good: function calculateShippingCost(weight, distance, isExpress)

Exercise: Have AI generate a code snippet, then check every variable name and function name:

  • Can you guess what it does just by reading the name?
  • Are there confusing abbreviations?
  • Is the naming style consistent? (All camelCase or all snake_case)

My Notes