PID is a well known technique for smoothing out control, to avoid oscillation. PID stands for
Applying PID control to your algorithm will make it more robust and perform more consistently. When used with a wall follower it will help better follow the wall without too much fluctuation.
It will make the robot turn at a higher speed when you are too away from the designated route (too far or too close to the wall), and turn at a slower speed when you are close to it.
Example Code
Graph
Nice video
Here are some great links. You will be amazed at how well this works.