#2 is a serious misunderstanding of flow[0] and is against research arguing that flow states facilitate learning[1].
Flow is not easy-peasy non-frustration time, it is getting "fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity." To deny yourself that is blocking yourself from the most productive and rewarding of human experiences.
One of the fundamental ideas of flow is that when the task is challenging enough to break one out of the state, additional skills are learned to return to the flow state.[2]
In my opinion, to achieve your maximum potential as a programmer, you should be striving to hit a flow state as much as possible.
[0]: https://en.wikipedia.org/wiki/Flow_(psychology)#Education
[1]: https://www.learning-theories.com/flow-csikszentmihalyi.html
[2]: https://www.amazon.com/Flow-Psychology-Experience-Perennial-...
A couple of ideas for taming it.
0) Media detox. It's can be so uncomfortable at first, feel what its like to go without for a week. A similar thing worked for me when I was trying to lose weight, getting used to fasting and what true hunger felt like allowed me to restrict my calories effectively without falling off the wagon.
1) Don't pick up new shows, finish out current seasons and leave it at that.
2) Make a rule that you won't watch TV/movies unless you are watching with someone else, so it's a social activity.
3) Only watch shows when you are working out, cleaning, other mundane task like that. Although you could go the other direction and say those are great activities to practice mindfulness with.
4) Pick one day/week to allow for watching things, ie Part of Sunday is just a lazy day in bed. Kind of like a cheat day.
No fun allowed then?
The whole point of point 3 is to work for your rewards instead of getting them instantly at the push of a button. It's too easy to get addicted to the latter and with any kind of addiction comes a decrease in motivation.
By all means, make your Skinner cage to lengthen assumed times for rewards, but make sure you can still run.
2. Avoid flow[0]. It's tempting, seducing and addicting, but you don't learn anything when you're in a state of flow. Anything sufficiently hard as to improve your skills should leave you feeling a little frustrated. Get used to that feeling.
3. Drop TV, Porn, news, music and video games. These things all give you rewards without having to do any work. In doing so, they steal your motivation and energy.
4. Stop eating sugar. If you want to get things done, strive for a steady blood sugar level. It's hard to work when your blood sugar drops and you fall asleep at your desk.
5. Sleep during the hours of 10pm and 2am[1]. That's when your body makes most of the hormones you need every day.
6. Do the opposite of this video: 7 ways to maximize misery by CGP Grey: https://www.youtube.com/watch?v=LO1mTELoj6o
[0]: http://calnewport.com/blog/2011/12/23/flow-is-the-opiate-of-...
[1]: http://www.anitarossiter.com.au/blog/early-nights-are-in-ord...