Use descriptive variable names to model good naming practice so that students learn the value of descriptive names.

  • Explain to students why choosing certain variable names.
    • For example, age holds the person’s age, and isOpen holds a boolean that identifies if the mailbox is open.
  • Compare the readability of code using good variable names versus bad variable names with students.
  • Assess student use of descriptive variable names in their programs explicitly to reinforce good programming habits.

More about this tip

External Source

Tip-A-Thon with Michelle Friend.