The encoder I am using has three pins to interface with: A, B, and common.
I first wired up the encoder as such to test:
A -> resistor -> GND
B -> resistor -> GND
common -> 5V
As expected, when I rotated the wheel, the results were (keep in mind visible to the eye):
Clockwise: A and B on, only B, both off
Counter: only B, A and B on, both off
So it seems that the code from the playground should work adequately, or am I totally off?