I used to believe that flow state is great for coding and all the personal literature I read seems to confirm this and some of my personal experience as well. However after reading some literature that debate and argue against this idea, stating that you often are doing productive work that you feel like is productive due to it feeling almost like rote work but really not might not cause a real impact whereas if you had more questioning (See: https://en.wikipedia.org/wiki/Hyperfocus), you would figure out easier ways to accomplish the goal long term etc if you weren't so self-absorbed.
I wasn't too sure if this right and I think not many people question the theory of flow state enough and after searching through academics and research, I realized there isn't much on flow state and work so I was wondering if Flow state is legitimate with proven effects or is it like one of the personal voodoo stuff that everybody repeats and just believes without having ever shown how scientifically it works and its scientific effects.
EDIT: Found the paper by the professor who coined flow state:
https://www.researchgate.net/publication/224927532_Flow_The_Psychology_of_Optimal_Experience