Live data from Hacker News

Coder's High – The Intense Feeling of Absorption

slate.com

31–40 of 52 posts

Re: Coder's High – The Intense Feeling of Absorption

#32

The sound and tactile feedback from my model-m and my instant flow CD (the lne I always listen to) is combined into a unbelivable nice feeling when I lift my fingers from the keybord after 45 minutes of coding. The ahhhhh is like no else.

Recently I discovered Progressive House Mixes on YouTube, and suddenly found my xen coding music. It's exactly the right level of intensity to keep me focused, and bland enough to not distract me with tracks I don't like.

Re: Coder's High – The Intense Feeling of Absorption

#33

I suspect that you get this kind of high doing a lot of things other than programming; programmers are not unique in this regard. I'm insanely jealous of people who can do stuff like this. I hear stories of people like John Carmack locking themselves away in a room and finishing an entire project or implementing an entire feature in a night or over a weekend. In contrast it takes me days to finish anything, I just do…

Miyamoto Musashi:

> The primary thing when you take a sword in your hands is your intention to cut the enemy, whatever the means. Whenever you parry, hit, spring, strike or touch the enemy's cutting sword, you must cut the enemy in the same movement. It is essential to attain this. If you think only of hitting, springing, striking or touching the enemy, you will not be able actually to cut him. More than anything, you must be thinking of carrying your movement through to cutting him. You must thoroughly research this. [1]

I've been able to experience the flow for as far as I can remember. It was years before anyone even told me it even had a name. I've read the wikipedia article [2], but not the actual book. So I'm not an expert. But as far as I can tell, reaching the flow involves knowing your goal, closing the feedback loop, and pouring all your attention toward the goal.

For example, consider reading a novel (written in English). Someone who can't read English obviously won't be able to read it. But for someone who speaks English as a 2nd language, sure, they'll be able to read it. But more slowly since they have to think about things which are non-central to reading. Things like syntax, spelling, idiomatic expressions, irregular verbs, conjugations, etc. I.e. the implementation details; the cruft. The non-central things get in the way of the important things, which include semantics, plot, character development, irony, point of view, theme, tone, mood, etc.

Personally, I see novels (and sometimes non-fiction) as a gateway. As in a gateway into another universe. Because for one reason or another, I don't struggle at all with piercing through the syntax or get the slightest bit fatigued (though technical documents are different, those take effort for me). But I think that for some people (even for whom English is their primary language), text represents a barrier. "Why not just watch the movie?" Rather than using the semantics to simulate this alternate universe, they get bottle-necked into trying to translate the glyphs. So where I see as an epic space battle, others see an intimidating bulwark of text.

Because some people have this mental image, guys like Chris Granger have been trying to figure out how to translate a wall of text like a C source file into a novel's equivalent of a movie. We've gotten a lot of cruft out of the way with higher level languages, but it's not enough because programming still text based. I don't know if it'll work out, but that's the ideal.

The second thing is the feedback loop. Feedback has to be immediate. The feedback also has to be exact. I.e. you've got to know your craft better than the back of your hand. A musician will know in real time how well they are performing. They don't just notice the obvious mistakes, but even the minutia like jliechti1 was discussing. And they have to be confident about knowing that they indeed made a mistake so they can immediately act to correct it. The reason feedback comes second is because if you're still bushwhacking through a jungle of cruft, the feedback loop won't ever feel instantaneous.

Another analogy is being able to unwind the recursion without having to plug and chug each step. There's simply no effort expended. You can model the function well enough that you can visualize the path it takes, like the chess master could in the article. You simply cut through to the base case.

I like the Musashi quote because it perfectly embodies the first two items. The goal is to win the fight. But some people get caught up in thinking too much about the techniques. E.g. parrying is useful. But if you don't understand how to take advantage of it, it's mental cruft [3]. Additionally, if you're not confident, you'll hesitate and probably die. The stakes aren't as high in programming, but the same idea applies: perfect mastery is only a prerequisite to achieving the flow.

Third is the focusing of attention. It involves a state of mind where you're naturally able to block out all distractions, and focus everything on the task at hand. This part is a little like falling in love: you can't force it, you have to set the right conditions and pray things simply work out. This part is really frustrating compared to the first two items. You can always review your specs to better understand the goal and constraints, and maybe philosophize a bit. You can always practice and acquire skill in order to better fine-tune the feedback loop. But when it comes to focusing attention, all you can do is remove distractions. Which sounds ironic since "why would I want to block out distractions if I've removed them already?" I don't know how to explain it better, but that's how it works for me.

Interruptions are the worst. If you go out to lunch for an hour but you're still pondering the problem, then flow won't necessarily break. But if someone asks you to help them move furniture for 3 minutes, that forces a context switch and everything collapses like a house of cards.

Cthulu below mentions something about growing up in the proverbial basement. I think there's a lot of truth to that. Basements = zero distractions. Maybe childhood better conditions some people for the flow than others. But I did notice that once I heard the name "flow" and realized I already experience the emotion on a common basis, I was able to (try to) actively graft it into other activities. I think being able to actively seek it out helps. So I think it's at least somewhat trainable.

So here's a recap. In order to achieve the flow: master your craft; tighten the loop; avoid distractions.

[1] http://www.uvm.edu/~asnider/IDAS_2011_CD/Teachers/Steve%20Ll...

[2] http://en.wikipedia.org/wiki/Flow_(psychology)

[3] http://starwars.wikia.com/wiki/Form_III:_Soresu

Re: Coder's High – The Intense Feeling of Absorption

#34
post #17

Employers have absolutely no idea how productive one programmer solving one problem on his own without interruption or distraction can be. Because yes I know the feeling really well but no this barely ever happens in my day job.

I'm working today (Sunday) so I can accomplish something for work. Most of my work occurs on the weekend, before I go to work, or after I get home. Yet I am at the office >40hrs/week. It's a madness that I cannot sustain. But yay, we are moving to a new facility with cubicles (I have an office now). I just don't expect any productivity to be possible anymore.

Re: Coder's High – The Intense Feeling of Absorption

#35

I suspect that you get this kind of high doing a lot of things other than programming; programmers are not unique in this regard. I'm insanely jealous of people who can do stuff like this. I hear stories of people like John Carmack locking themselves away in a room and finishing an entire project or implementing an entire feature in a night or over a weekend. In contrast it takes me days to finish anything, I just do…

>> but is there a way to teach yourself to be able to engage in these marathon creative sessions or is it something you must be born with? Anecdotally, I think the answer is yes. Concentration is a skill you can develop like anything else. The kind of high with programming for me is similar to that experienced when rehearsing/performing music. I used to perform on a competitive drumline and we would have 8-10 hour re…

[deleted]

Re: Coder's High – The Intense Feeling of Absorption

#36
In my late teens and my twenties, I spent 10s of 1000s of hours in a state of intense absorption on programming tasks. (I am in my 50s now.)

Am I the only one who believes that it is bad for me to spend more than 20 hours -- and perhaps as little as 15 hours -- a week in the state?

Just because an activity feels really good does not mean it is good for you.

I guess I should explain a little how I came to believe that that too much intense absorption is bad for me. Let me start by quoting a passage (which I agree with) from another comment here:

>in order to achieve flow these three criteria must be met: 1. The goal must be clear 2. Feedback must be immediate 3. There must be a feeling that our capability is balanced to the challenge at hand.

The most important things for me to have made progress on in my life are things where it was not clear what my short-term goals should have been (although of course it was important for me to choose some short-term goals to work towards), where feedback was slow and rare and where I felt that the challenges I needed to surmount exceeded my capability. (I would guess that there are problems or concerns like in most people's lives.) In my past, I spent a great deal of time using the pleasures of intense absorption to distract myself from more important things.

Even after I realized that I was using programming and related activities like math and "programming-languages geekery" to distract myself from more important (but less enjoyable and messier) things, I did not know how to stop the distracting activities. In other words, I was addicted to the pleasures of intense absorption, and it took me many, many years to figure out how to extricate myself from that addiction.

If there are a lot of things in your life that are pleasurable -- hanging out with friends, sex or romance, physical exercise -- then maybe you do not have to worry about falling into the same trap as I did. I think that probably what really tripped me up when I was a teenager and a young man was that intense absorption was my only reliable or regular source of significant amounts of pleasure. Well, to be more accurate, satisfying my curiosity, a.k.a., learning, and intense focus on programming and related things were my only reliable sources of pleasure. (I have read that this pattern of only being able to take pleasure in one or 2 things and the consequent problem of addiction to those things is often a trap fallen into by people who were abused as children. I was abused as a child. Perhaps people who had happy childhoods are immune to the negative effects of spending one's days intensely focused.)

I still program for a few hours every week: I write Emacs Lisp code whose only user is me, which I do not get paid to write, and I am convinced it is not harmful to me. It makes me happy when I notice that one of my problems can be solved with code because coding is an efficient way to solve a problem. But if I ever take a job that involves programming full-time, I'll keep a sharp eye out for signs of a recurrence of my previous destructive / addictive relationship with the pleasure that comes from intensely focusing or concentrating. A big warning sign would be if I were to start again to neglect things that clearly should not be neglected like appointments at the dentist and such. Another (more ambiguous) warning sign would be a cessation of the process which has been going on for over 10 years now of my slowing increasing the range or variety of things I am able to enjoy or take pleasure in.

I decided to write this because in online conversations among programmers, we almost never hear (or read) about any negative effects of the "flow state". For me, there were significant negative effects: namely, I would have learned to deal with messy, low-feedback difficult situations at a younger age if I had not spent as much time in the "flow state". In other words, I got into the bad habit of using the flow state to avoid what I really needed to learn: how to make progress in messy "non-flow" situations.

Re: Coder's High – The Intense Feeling of Absorption

#37
post #6

I suspect that you get this kind of high doing a lot of things other than programming; programmers are not unique in this regard. I'm insanely jealous of people who can do stuff like this. I hear stories of people like John Carmack locking themselves away in a room and finishing an entire project or implementing an entire feature in a night or over a weekend. In contrast it takes me days to finish anything, I just do…

In my personal experience, and from watching others, the lock-in and absorption in your work comes with a succession of tasks and exertion, towards a meditation of sorts. You don't simply "fall in" to this state, but rather makes a concerted effort in reaching it. > is it something you must be born with? A motivation to reach this state, to keep trying and pursuing it, may be a fact of your nature. Or, it is an under…

To paraphrase the Bhagavad_Gita "you are not guaranteed the fruits of your labor, but you are guaranteed your labor."

For me flow is achieved most effortlessly when the problem is interesting and I have the tools necessary to attack it.

Extrinsic motivation is simply a non - factor in this case. To the degree that it may or may not exist and is immaterial to the labor at hand.

On the purpose of a tight feedback loop. The magic of the repl is a perfect implementation of a flow like feedback loop. Unfortunately my language of choice doesn't utilize it.

Re: Coder's High – The Intense Feeling of Absorption

#38
post #16

I've noticed that this really doesn't happen to me unless I've got some outside motivation to make coding my number-one priority. Otherwise, my brain always kicks in with a nagging feeling that I need to better moderate how to spend my time. Or I just get bored. Basically, I need a reason to focus. It takes me a good few hours before the "flow" really kicks in, which is beyond the point when I normally take a break t…

I'm with you on the coding comment especially when non-coding people use it to describe programming/coding as a menial, mindless task. I've also had the same thought that maybe I just want my job to sound cooler...

Re: Coder's High – The Intense Feeling of Absorption

#39

In my late teens and my twenties, I spent 10s of 1000s of hours in a state of intense absorption on programming tasks. (I am in my 50s now.) Am I the only one who believes that it is bad for me to spend more than 20 hours -- and perhaps as little as 15 hours -- a week in the state? Just because an activity feels really good does not mean it is good for you. I guess I should explain a little how I came to believe that…

Thanks for writing this. It's important to recognize the downsides of what is often considered only positive. It rings true for me especially.

Re: Coder's High – The Intense Feeling of Absorption

#40

When I'm able to achieve flow, I'm supremely happy. You all understand. A few tasks, though, have been serious blockers. When I don't understand my tools, and they fail in undocumented ways, and the relationships between presentation and business logic aren't clear, it actually hurts my feelings. It's as if the machine itself is judging me and reminding me that I'm not good enough.

Does anyone have tips to overcome these "blockers"? Stalling after encountering blockers is more detrimental to me than plodding along without achieving flow.
Post reply on HN