The gyro sensor

Hey all I am new to vex coding but day to day continue to grasp the concepts of coding in Vex Coding Studio. I was wondering if anyone could help me with some gyro sensor code as this hhas been the one thing that has stumped me. Specifically I need the code that minimizes drift while driving the robot in autonomos and driver control.
Thanks

Info: are you using the old gyrosensor, or do you have one of the new inertial sensors to use?