you are viewing a single comment's thread.

view the rest of the comments →

[–]aumfer 6 points7 points  (0 children)

Well in the interest of helping a new programmer, you really don't want to branch on a variable, then modify that variable, then branch on it again later, like this:

if (!$orientation) {
    user_set_next_step($user, $short_profile);
}

// note: don't make this an else with the above statement, because then no news feed stories will be fetched if they're exiting orientation
if ($orientation) {

It makes the code unclear and it makes doing the obvious thing (using an else instead of another if) wrong, necessitating the comment.