Programming is an art. And just like any other art, it can be distilled down into easily digested parts that you can profit from. The problem is that by putting this profit layer on your art, you’re psychologically more likely to do less. This was shown in a study done by Desmond Morris in 1962, and witnessed by anyone who’s ever gone from doing code because they loved the challenge, to doing it for a paycheck. The luster of the quest for control loses its sheen, and suddenly you’re just gathering tickets and knocking out patches.
That’s why I say it’s important to add that layer of unpaid open source into your routine. And going off of the study I linked to above, the earlier the better. The chimps in the study permanently stopped enjoying their artwork as much as they had before being paid for it. If you can trick yourself into not looking at the paycheck as the product of your code — or artwork — and instead look at it as simply paying you to show up, you’re a step ahead.
This is easier if you’re salaried. If you have the freedom to not go into work one day, and it won’t affect your paycheck, then you’re effectively not getting paid to do your artwork. You’re just getting paid to be.
But the easiest way, by far, to trick your mind into working better is by doing your artwork for free. Find an open source project that you love, open the tickets, and fix one of them. It’s that simple. Submit your patch, and then walk away. Don’t stick around and wait for the merge, don’t refresh the screen until you’re single handedly DOSing Github. Just walk away. Check your email later, or just go find another ticket, and keep doing it. Do it for the love of the code, for the search for the answer, and feeling you get when you hit submit.
Just don’t do it for money.