Live data from Hacker News

Are You a Zen Coder or Distraction-Junkie?

componentowl.com

51–60 of 69 posts

Re: Are You a Zen Coder or Distraction-Junkie?

#51
I've had a lot of different work habits over my career, mostly because of internal psychological factors and external work circumstances. What I've learned from all the variation is that when I encounter a moment of uncertainty and doubt, my brain wants to decide between two choices:

- relaxing and taking a web-surfing break (Facebook, HN, national news) until the uncertainty resolves, or

- gritting my teeth, amping up the intensity, and blasting through to the right resolution while heavy metal music wails in the background.

I think this is because I can't face the possibility that I'm actually having trouble. Programming is easy! I'm smart! I have to be, because I'm not good-looking enough to get away with being a moron who doesn't always know what to do next, who actually has to think when he writes code. What's the point of being alive if you have to be someone like that, both ugly and stupid?

Yes, my brain thinks a lot of strange and stupid things when I'm not paying attention and correcting it.

Neither of the choices that my brain sees as exhaustive alternatives is correct. The best thing to do is relax, tell myself that programming is sometimes hard and it's okay if I need a few minutes to figure things out, and keep working on the problem even though I'm confused. For most of my life I had to be either unusually excited and happy or under some kind of threat, such as a deadline or an upcoming test, before I could bring myself to concentrate on a task that I didn't find easy. Now I do it every day.

What's interesting is that the techniques I use to calm down my mind while it's freaking out over the uncertainty are exactly the techniques I use to keep my mind calm while I meditate: posture, breathing, awareness of body tension, and awareness of my mental states. I also analyze my thoughts and feelings just like I do in insight meditation. Zen coding, indeed!

Re: Are You a Zen Coder or Distraction-Junkie?

#52

The last article I read before going to sleep was http://en.wikipedia.org/wiki/Attention_deficit_hyperactivity... - feeling disgusted that surely I'm that unfortunate guy, who was not diagnosed early and carried this into my adulthood. But that this article sits on top of HN, makes me feel better - I'm not alone with (speed_of_inspirational_input > speed_of_implemented_idea). My question is be it pomodoro or this big…

I struggle with the boundaries as well. Especially at the end of the day or before lunch. "This will only take me 1 minute" fixes turn into half-hours and ruin the whole schedule. One thing that might be worth trying is to just stop working whenever your time chunk is done, regardless of what's left. I remember reading an article here on how Hemingway used to stop writing in the middle of a sentence at the end of a c…

Great tip, Sir :D. 'll adopt it right away ...

Re: Are You a Zen Coder or Distraction-Junkie?

#53

Earlier quoted context omitted.

I have a specific ritual for getting into the zone and one for getting out of the zone. My ritual for getting into a focused state is something like: Move back from the computer, touch my index fingers to my thumbs, close my eyes, count down from 10, and say out loud (or write) "I am now working on (project)". It takes ~30 seconds and it works pretty well for me.

I go through the mental process of telling myself what I am working on now, but I like the idea of adding a physical ritual to go along with it. I'll try it! Thank you for sharing. What is your ritual for getting out of the zone, out of curiosity?

I have a similar (but longer) way of getting into the zone and obviously my own way of getting out of it. However, none of it is about what you actually do. It's about the "ritual", the only time you do it is in preparation for the work and after enough repetitions it snaps you straight in. For snapping out, any time I spend a significant (or feels like it) amount of time trying to solve an issue and can't, I save everything, hit compile and get up from my desk. I prefer to step outside, relax for like 10-15 minutes not doing anything work related except maybe chatting about work with folks, and then go back. Getting up, away from the computer and letting the brain relax is what I consider the most important part. Sitting in the same place where you had the problem never let me relax enough to get through it without lots of effort/time. Getting away from it, up out of the weeds and when I sit down next time the problem becomes trivial.

Re: Are You a Zen Coder or Distraction-Junkie?

#54

Great article. BTW does somebody here know great timer app for Mac or Linux? I'm trying this "60 work / 30 rest" pattern, but sometimes problem is so interesting and I just can't keep track of the time:)

Open a terminal and type

sleep 30min ; mplayer xxx.mp3

Don't need any ticking timer, it will just distract you. But if you really need it's only a few more lines.

I used to do sleep 60 min ; find / to wait for the hard disk noise but that doesn't work anymore since i have a SSD.

Re: Are You a Zen Coder or Distraction-Junkie?

#55
One thing that works for me is to have a technical book as a pdf that I can switch to during compile/deploy cycles. The difference is that since it is a technical book that is slightly different than what I'm coding on the context switch isn't that great. Also, pdfs are longer and there is another context that I switch into rather than a list of new topics on Hacker News. It isn't perfect but it seems like a step in the right direction.

Re: Are You a Zen Coder or Distraction-Junkie?

#56

Earlier quoted context omitted.

I have a specific ritual for getting into the zone and one for getting out of the zone. My ritual for getting into a focused state is something like: Move back from the computer, touch my index fingers to my thumbs, close my eyes, count down from 10, and say out loud (or write) "I am now working on (project)". It takes ~30 seconds and it works pretty well for me.

I go through the mental process of telling myself what I am working on now, but I like the idea of adding a physical ritual to go along with it. I'll try it! Thank you for sharing. What is your ritual for getting out of the zone, out of curiosity?

I close my eyes, count up from 1 to 5, and say (in my head) "I am now coming out of alpha, feeling wide awake and better than before."

Re: Are You a Zen Coder or Distraction-Junkie?

#57
post #44

Earlier quoted context omitted.

This is also a benefit of interpreted languages like Ruby or JavaScript.

Not necessarily. It can take a long time to load a large project, including any Rails applications. A typical Rails application can take about 30 seconds to load (that's any time you run a Rake task, launch a server, run unit tests, etc) and unit test runs can typically take a few minutes, often times more than 10 minutes for large applications. If you use a test server, such as Spork, the load time largely goes away…

> A typical Rails application can take about 30 seconds to load

Typical? Wtf kind of codebases have you been working on?

The largest Rails app I've worked on had 250 models and 200 controllers. It took 12 seconds to load the Rails environment on Ruby 1.8.

Rails 3.1+ on 1.9.3 is pretty darn fast, even for medium-sized apps (50+ models).

Re: Are You a Zen Coder or Distraction-Junkie?

#58
post #51

I've had a lot of different work habits over my career, mostly because of internal psychological factors and external work circumstances. What I've learned from all the variation is that when I encounter a moment of uncertainty and doubt, my brain wants to decide between two choices: - relaxing and taking a web-surfing break (Facebook, HN, national news) until the uncertainty resolves, or - gritting my teeth, amping…

[deleted]

Re: Are You a Zen Coder or Distraction-Junkie?

#59
post #51

I've had a lot of different work habits over my career, mostly because of internal psychological factors and external work circumstances. What I've learned from all the variation is that when I encounter a moment of uncertainty and doubt, my brain wants to decide between two choices: - relaxing and taking a web-surfing break (Facebook, HN, national news) until the uncertainty resolves, or - gritting my teeth, amping…

Interesting you mention this; I've recently started a new job which requires me to learn a whole new skillset (web programming with JavaScript). I've been a developer of desktop apps for a while so programming isn't new, but the language and the paradigms (async? wtf?) are challenging. This is in contrast to my early memories of "web programming" aka making a static Geocities site with notepad and wondering why everyone was so excited about the web when it was this easy to make a web page... turns out it's not that easy anymore.

The point being that it really is in those moments of confusion and frustration - where you try something and it doesn't work, or you realise you don't understand how to do what you want to do, especially when you think what you're doing is supposed to be easy - where distraction comes in and you go off track.

I've managed to realise that and am glad I'm not alone. The next step - actually doing something about it - is a little harder (hence why I'm on HN right now...!).

Re: Are You a Zen Coder or Distraction-Junkie?

#60
If you find yourself getting distracted a ton, maybe you should take a step back and look at what you are working on?

Do you believe in it?

Do you find it challenging and interesting?

Are you working on something that is important to you and makes a difference?

It isn't about every individual piece of the software being important, it is about being excited about the sum-total and wanting it to be the best that it can be.

I think of it kind of like momentum. You need enough momentum from rolling down the big hill of 'oh my god i'm working on this cool thing', to be able to deal with the uphill of 'mundane crap'.

If you are starting surf HN/Reddit/Facebook like an ADD net-squirrel, maybe you need to work on something cool that you actually want to work on. When you've gotten to a good/excited place on the cool thing, switch back to the mundane crap.

Post reply on HN