Extreme programming argues that documentation is not needed, since code is the best description of what the program does. In order for this to be true, code has to be readable. Very readable.
It is important to be able to tell what is the direction of data in every line you read. In the following case, which variable is the source and which is the destination ?
Array *names;
struct Detail details;
...
set_name_details (names, &details);
Here is a simple rule to make the caller code clearer...
It is important to be able to tell what is the direction of data in every line you read. In the following case, which variable is the source and which is the destination ?
Array *names;
struct Detail details;
...
set_name_details (names, &details);
Here is a simple rule to make the caller code clearer...