I used to have wrist pain after particularly-long coding bouts. Then I decided to type like you play piano - hands up, wrists straight, move arms rather than wrists to punch keys in other locations.
No pain again. Ever. Only later did I find out that it's the recommended wrist posture. I still cringe a bit when I see people buying keyboards with wrist-rests (and using them), especially "ergonomic" ones - why improve one ergonomic point while intentionally worsening another?