Self-documenting Code
This first example uses poor variable names and explains what the names mean
using comments. This comes from pg. 40, C by Dissection by Kelley and Pohl.
#include <stdio.h>
int main(void)
{
int h, /* number of half dollars */
q, /* number of quarters */
d, /* number of dimes */
n, /* number of nickels */
p; /* number of pennies */
...
}
The following declarations use good variable names and no comments. This
is considered to be self-documenting code. You should be using this type
of naming for variables.
#include <stdio.h>
int main(void)
{
int halves, quarters, dimes, nickels, pennies;
...
}