Bone roll and axis facing problem. General guidelines?

Hello,

I am new to Blender. Just went through David Ward’s tutorial “Rigging an Alien”. It is very good.

However, I experience difficulties, I think it is about bone roll or bone facing.
In pose mode and side view (numpad 3), I stretch a leg to front but knee bends outside. Whatever I reset or recalculate rotation (ctrl+n, z-axis, etc) it doesn’t help.

Speaking of bone axis and facing, what are the general guidelines when rigging a character?
Do all the bones should be facing the same direction?

Like, when you add spine bone for instance, in front view (numpad 1). It’s Z axis looks forward, so is rib cage, neck and head (after size up and subdividing the spine bone).

What about leggs and arms bones (facing)? And what should it be like when you flip copy the armature on the opposite side.

Is only a one, certan axis meant to be for bending direction?

Thank you

big topic

generally, Nathan Vegdahl likes the primary axis of rotation to be the X-axis, and since he writes so many of the rigging scripts, I try to follow his convention