If you end with very small functions, each function so small that you almost can?t make errors, you might end in quite reliable programs. Easy to review, debug and test small functions.
This is an important style guide for Smalltalk applications
// This is C-Code
int user_is_for_login(user_t *user) {
return !(user->is.anonymous || user->is.admin);
}
void user_collect_for_login(void) {
user_t *u;
for(u=R->users;u;u=u->next) if(user_is_for_login(u)) push(u);
}
char *strnull(char *t) {return t?t:"";} // avoid 0-pointer exception
int main() {
// Print all User on stdout
mount_database(); // R->users become a valid list now
push(0); // Mark beginning of Stack
user_collect_for_login();
user_t *u;
while(u=pop()) printf("user: %s\n", strnull(u->name));
return 0;
}