Štěpán Stenchlák
We decompose a code because:
Therefore individual functions
// Universal functions
int findArrayMin(int[] values, int size);
void repeatCharacter(char character, size_t count);
// Task specific functions
void printCelmometherLine(int value, int leftPadding);
void printCelmomether(int[] values, int size);
You do not usually need comments if you correctly name variables, functions, and arguments.
Function name and its arguments are the only things that the programmer sees (besides the comments).
void textHelper(char c, size_t i);
void repeatCharacter(char character, size_t count);
void printLine(...);
void printCelmometherLine(...);
if (i > 0) {
doSomething(i, true);
} else {
doSomethingElse(-i, false);
}