Kenneth Reitz has been the subject of some controversy but this is worth reading:
“If you're maintaining open source projects and you notice that your productivity comes in surges, that you don't sleep much during the good periods, that your best work happens in states that feel elevated and electric, please pay attention to that. It might just be flow. It might be something else. I didn't know the difference, and by the time I learned, the crash had already happened.”
