Find something about the task that intrigues you, and build your motivation around that. A new gem, or new language feature, etc.
I've also found focusing on tests helps. Write as many tests as possible - focusing on getting those to pass. In theory, by the time you're done, the feature will be to.
Always a good point. Based on OP's description, they may not feel the next dev would appreciate the code at all, and it's just a matter of fighting through this feature on a personal level.
I've also found focusing on tests helps. Write as many tests as possible - focusing on getting those to pass. In theory, by the time you're done, the feature will be to.