Revise Computingrevisecomputing.co.uk
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates

Knowledge organisers / Maintainable Code

Meaningful names

All topicsPractise exam questions
Knowledge organiser

Maintainable Code

301.7a

Clear and descriptive identifiers.

What you need to know

Meaningful names tell the reader what a variable or function does without needing extra comments. Code with clear names is easier to debug and maintain.

Key points

  • Use full words: total_score not ts
  • Name should describe purpose, not type
  • Functions should describe their action: calculate_area()
  • Avoid abbreviations unless universally known

Code examples

Meaningful vs unclear names
python
# Clear
student_age = 15
total_marks = 87

# Unclear
sa = 15
tm = 87