SuperAPI AI Directory

meaningful-identifiers

Coding & development

View repository

Updated 11-15 00:54

About this skill

Meaningful identifiers

Callback parameters and local variables must describe the value they hold.

Rules

  • Name array callback params after the element's domain type: batches.map((batch) => …), bins.filter((bin) => …), checkpoints.find((checkpoint) => …). Never reuse right/left/column for values that are not sort operands or table columns.
  • Name reduce accumulators after what they accumulate: sum/total for a running total, not step.
  • Name percentile/ratio arguments for the quantity they represent (percentileRank, multiplier), not an unrelated domain noun.

Leave correct uses untouched

  • Sort comparators: (left, right) => left - right.
  • (column) => column.key over a real .columns array.
  • for (const row of …Rows) where the items are genuinely rows.