I've recently been assigned to work on a project written in PHP. I can't change that, and have no intention of really trying.
However, this can't be an uncommon scenario. How do you motivate yourself to work on the project when the code you're looking at and producing constantly makes you want to cry?
EDIT:
It should be noted that this is pretty much the only on-campus job doing anything software related available at the moment, so "just change jobs" isn't really an option :(