Programming in state of flow

State of flow

Today I wanted to talk about a fun topic for me. I think that the name of this state is quite imprecise and it will probably hard to explain, but I'll try to explain it on a few examples.

State of flow can be easier explained in any art form as creating/playing music, painting, singing, freestyling ( dancing, rhyming, singing, playing instrument ) in a moment when the particular activity seems flawless and magical. This is a moment which most of the artists want to be when they perform and whenever they want to their best.

That's the best explanation of this state of "flow" I can write here in short words. I believe that when programming, very similar state can be achieved.

A moment

This is a moment where you write flawless code without bugs, which is running almost always good at the first time. You are super productive and whenever you produce a bug writing code, you find solution for it very quickly and immediately implement it. Most of the times when working as a developer, this state isn't easy to achieve and as far as I have experienced it - this isn't a sustainable state of a mind for a longer period of time, it has some magical substance in it too

As you can read, this is a very good place to be as a programmer and probably this kind of work efficiency can be achieved with lot's of experience and hard work writing code, but just without the magic which makes you that 10% better at every level of expertise.

So how you get into the state of Flow as a programmer ? As far as I think I have been in this kind of state only a few times I noticed that it always happen whenever I worked for a long hours with the code. Focused and uninterrupted for a couple of days straight in a row I found out that after a few days like this I felt being "in the zone" just smashing some tasks and doing super productive job.

My explanation

This is the best way I could try explain it, any fellow developers have similar thoughts ? Let me know in the comments if you experienced this kind of super productivity state of Flow.