CS461 – Post # 4


I read this article that I found on butterfly.com (https://www.butterfly.com.au/think-pieces/clean-high-quality-code-a-guide-on-how-to-become-a-better-programmer/) that provides a guide for writing good/readable code.

One of the main things that this article promotes is the usage of good variable names. This means that variable names should be descriptive of their respective purposes. For example, if you wanted to create a variable for modifying timestamps, instead of using something like public $genymdhms, it would be better to use something more clear like public $modificationTimestamp. Even though the variable name is considerably longer, it’s still better than using the shorter, more muddled variable name.

Print Friendly, PDF & Email