CISC 121 Lecture Notes - Lecture 1: Complex Instruction Set Computing
wunch and 39345 others unlocked
35
CISC 121 Full Course Notes
Verified Note
35 documents
Document Summary
What makes a program readable: use of descriptive variable and function names clarifies their purpose and helps differentiate them from other, similar variables, eg) bad names: num1, num2. Good names: birth_year, birth_month: consistent use of either camel case or snake case for variable names makes reading variable names easier as the individual words are more obvious. Good: this_is_a_variable_name: eg) bad: thisisavariablename, use single-line and block comments to explain the purpose of each section of code. Lines of code should read almost like a sentence, so oddly spaced phrases make understanding the line more difficult: eg) bad: age= Good: age = 25: try to group code that does one task together. This way, one block comment can be used to explain the section instead of multiple smaller comments.