Even considering the actual implementation instead of the simplified
example, I wouldn't consider that renaming p1 to priority_min is
really helping anyone, because they already know p1 is the minimum
priority by looking two lines above. All uses of p1 lie within 5 lines of
code, so using a longer name doesn't do much more than making the name
longer to read. In some extreme situations (not this function) this can
make the code harder to read, as the longer names clutter the function.
> fprintf(stderr, "priority %d scheduling enabled.\n", priority);
> fprintf(stderr, "couldn't change process priority to %d.\n",
> priority);
> fprintf(stderr, "%s (%d)", strerror(error_desc), error_desc);
You didn't replace the fprintfs by posts. It should be posts because then
it can be routed through the GUI.
> - Localization can be done here,
No, localization should be done in the GUI. What should be done
server-side, is to make error messages easier to process by the GUI.
> - Safe fprintf can be used to avoid overflow.
Which overflow?
> An explicit name saves the dev brain power at coding time ;)
I assert that often it doesn't. A name shouldn't be more explicit than it
needs to be, and it's certainly possible for names to be too explicit, and
i don't mean the "parental advisory" sys_defaultfontshit, I mean saying
things that are too obvious because they're already in your face 15 times
in the same page and cause the code to go on for longer than you should
have to read.
Are variable names descriptive of the physical or functional property represented? Do uniquely recognizable functions contain adequate comments so that their purpose is clear? Are deviations from forward logical flow adequately commented? Are all elements of an array functionally related?"
+