Briefle words · Code & architecture
Identifier
Any name a programmer chooses in code: a variable, a function, a parameter or a class.
Say it to an AI
TypeScript function calculateOrderTotal(cart: Cart) that sums line items, applies the coupon's percentOff and adds shipping unless the free-shipping minimum is met. Use intention-revealing names for every identifier (subtotal, discount, shippingFee, no single letters or tmp) so the code is self-documenting.
How an expert would brief the stronger version of “Order total”.
See it
Try it as a puzzle →The function that adds up a shopping cart at checkout in an online store.
Why: The chosen names are the only thing that changed: 'calculateOrderTotal', 'subtotal', 'discount' and 'shippingFee' in A versus 'getTotal', 't', 'd' and 's' in B.
Related words
Room 1 · Essentials
Learn “Identifier” in a five-minute lesson