Find something else to reward yourself with. For example, a drink of flavored water or a sip of coffee/tea. Also, try coding offline. I always do my best programming when offline– pencil and paper is the best.
If you've already implemented a method in pseudocode, you can use StackOverflow/documentation/Google/etc to look up the actual API calls once you're translating the program into code.
If you've already implemented a method in pseudocode, you can use StackOverflow/documentation/Google/etc to look up the actual API calls once you're translating the program into code.