#2 is a serious misunderstanding of flow and is against research arguing that flow states facilitate learning.
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.
In my opinion, to achieve your maximum potential as a programmer, you should be striving to hit a flow state as much as possible.