

Ask YC:  Getting In the Zone? - Goladus

Noprocrast is a great feature, however in my experience anti-addiction tools have a limited effect on procrastination.  Procrastination is avoidance behavior by definition, and I've found that I can always find something to do instead of dealing with the large context switch that comes with hacking.<p>One thing I'm trying is looking for opportunities to leave easy compiler/interpreter errors in my code, so that when I sit down to work I can just run the module I was working on and the compiler will immediately point me to a place to get started.  This is somewhat similar to the advice pg gave in <i>Hackers and Painters</i> about saving up bugs to do when you're tired, but I've found it works really well for remembering where you were.<p>Even if you don't leave a bug on purpose, sometimes having a routine like that can help.  What techniques do you use?
======
cperciva
I don't try to avoid procrastinating.

Ok, that sounds wrong. Let me try again: I find that when I'm procrastinating
about writing a particular piece of code, it's because there's something
nagging at my subconscious telling me "this isn't the right way to solve this
particular problems -- go away and think some more".

Once I know what the next step is and know that it's the _right_ next step, I
find that I don't procrastinate any more.

~~~
Goladus
Excellent advice, though not always compatible with scheduling, deadlines, or
competition.

------
ivankirigin
It's all about eliminating distraction. That means an isolated location, with
sound isolation, and no irrelevant people around. Getting in the zone is just
a matter of time for me. Spending 20 minutes on something means I should be
able to get a good few hours.

The biggest barrier to this is the "i'll start right after [X]". Go the the
bathroom, chat with someone about an idea, get a cup of coffee, check my mail,
comment on a news article, write a blog post about a cool dancing robot,
submit a time card, get a long lunch, go to a neighboring cube to get a piece
of candy, get a glass of water, check on my finances, etc.

People fill days doing junk like this. Even if interleaved with real work, the
lack of focus prevents the coveted "zone". Identify and eliminate everything
besides work that you're doing when you should be in a long stretch of work.

------
euccastro
A variation of what you propose: advocates of test driven development suggest
you always leave your coding session for the next day with a failing test.

A common advice for variants of writer's block is to have some sort of ritual
to get you started cranking away. The exact actions are not that important. It
could be taking a shower, doing a tea, tidying up your desk, taking some deep
breaths, whatever. When you do these things everyday in the same order, your
'muscle memory' eases you into a creative state. I haven't tried this, though.

I'm bad at fighting procrastination. When it gets really bad, I just abuse
until I feel the honest urge to get back to work (I mean honest urge as
opposed to remorse).

There are some things I found that help when I follow them, although I admit I
don't follow them consistently enough:

\- Find the time of the day that works best for you. It doesn't need be the
same clock time every day. In my case I have screwed sleep patterns (tending
to a longer day), so I set it as a delta from my waking time. (I'm considering
trying to settle into a 28 hour day, as in <http://xkcd.com/320/> , but I'm
digressing.)

\- Be proactive and aggressive about freeing such time from interruptions.

\- Allocate time to do other things you want to do too, including the things
you procrastinate in. Doing this helps you not to feel more deprived from
(other) fun than from work.

When work time comes and I feel like doing something else, I make myself
realise I'm practically missing the working day if I do so. Most times that
will get me an honest urge to work. When it doesn't, I just go ahead and do
something else all day. I can chain a few days like this, and not everyone can
afford this. Eventually I come back refreshed and with no remorse. Other
people (and myself, in my late teens/early 20s), would just get into a
procrastination/regret spiral instead. YMMV.

~~~
euccastro
Another thing that helps: when my last session was spent mostly coding, and
I'm having trouble getting back into it, I will just take pencil and paper and
sketch stuff away. Often, I'm blocked because I don't really understand well
enough some part of what I'm doing, or of where I want to get to. Drawing or
(otherwise) restating the problem gets me back to the state where you spend
hours just knowing what to do next.

And viceversa, if I've spent too much time 'designing' or otherwise thinking
about the problem, I unblock by going off and making _something_ I can run. I
may eventually throw away that code, but it got me going forward.

So I don't have much of a methodology. Thinking about doing and actually doing
are things I do to procrastinate from each other, if you want.

One technique that does help: I keep a stack.txt document, where I write my
current tasks (a short phrase each), organized hierarchically (I use
indentation because of a Python background; a Lisp native might use sexprs
instead). When I stumble into a subtask that I need to do sometime, but which
I can get away without for the time being, I 'fake it til I make it', and I
enter a reminder of the proper solution in my 'mind stack' as a subtask of the
current one. Whenever I think of an unrelated task that I want to do later, I
will enter a reminder at the end of the stack. [Edit: OK, so it's a tree,
where each path to a leave is a stack of context about what you're doing.]

That avoids two problems that used to get me lost when hacking: getting lost
in subtasks and losing context of what I was doing, and trouble deciding what
to do next (it's easier to decide with confidence if you can see your options
written together).

------
flashgordon
First i used to sit on the couch in my lounge using my coffee table, as my
laptop table... couch was becoming uncomfortable, so built myself one of those
little indian/chinese/japanese styled desks, where you sit on the floor, cross
legged... Then I moved from the lounge (with the TV) into a study/music room.
Did miracles to my levels of concentration with absolutely no distractions.
Any time I was out of the room, I "knew" i wasnt working, hence forcing myself
to get back into the den! Plus being in the den meant lesser and lesser
interruptions/nagging from the wife!

------
staunch
The hardest part for me is getting the ball rolling. My primary method is to
pick the most fun thing I can think of to do. I try not to feel guilty for
starting with something easy or fun, because it's such a good way to get
going. Once I'm on a roll it's not nearly as difficult to tackle the nastier
problems.

~~~
iamwil
Isn't that a way to fall behind on schedule and implementing things you don't
need? I guess you're assuming that what you can pick from is what you HAVE to
do.

~~~
Goladus
I think the idea is that you make a point not to let the idea of drudgery get
you down early-on, because it can be overwhelming to the point where you get
_nothing_ done.

In the context of an afternoon's work, it might mean you start with a small
utility that you know is good but might not have any immediate value, or some
optimization tweak that's been itching you for awhile. That'll get you
immersed into the project and excited about further possibilities, so tackling
drudge-work won't seem so bad.

That idea also applies more generally, and is often the idea alluded to when
you hear people around here talk about banging out a 'Version 1' as fast as
possible.

------
ptn
I have two methods:

One, think of what you _have_ to do and find the smallest possible task that's
still interesting (e.g read the first paragraph of a book, write the
cornerstone function of your program and leave the menus for later) and start
with that. Chances are that, as you go along, your interest in the subject
will build and you'll end up working for hours.

Two, find a way to make that disgusting job fun. Maybe you can write the most
important part of your program in your favourite language and the GUI in the
one you've wanted to learn for years but haven't had the time, so you are
still using your time wisely in spite of writing a GUI.

It's all about tricking yourself.

------
trekker7
WWJBD - What Would James Bond Do. Treat hacking like what it is: a tough,
rigorous activity that requires huge amounts of energy and persistence.

So whenever you feel like procrastinating, tough it out, clench your teeth,
and just start.

------
izak30
Written while at my last job: <http://issackelly.com/blog/2007/04/815-am-
daily-battle.html>

note: <\-- just a joke, obviously

------
marcus
My number one method to get in the zone is quiet.

I use a pair of Audio-Technica ATH-ANC7 QuietPoint Active Noise-Cancelling
Headphones - they have been a god sent for me.

------
bluishgreen
I have a sand clock on my desk.It brings a spatial dimension to the passage of
time which the lower parts of my brain understand better.

My clock gives me one hour, when I find that I am procrastinating, I turn the
clock and promise myself not to do much else other than work till the clock is
running. works every time. But their is some sort of ritualistic behaviour
involved. you have to respect and even fear the sand clock for this to work.

------
brooksbp
It all comes down to passion/love. It's easy to get in the zone while hacking
with new technology, eating Thanksgiving dinner, or having sex you know... but
there's no way I could get in the zone while baking cookies.

It's simple, if you're not excited enough to automatically "get in the zone,"
then it's not worth struggling or trying to get in the zone... do what you
love, the rest comes naturally

~~~
staunch
Dangerous advice I think. No matter how fun a subject is for you eventually
there's a build up of nasty and complicated problems to solve. If you run away
every time a project gets to that point you won't finish anything significant.

~~~
brooksbp
True. But you should have more motivation to keep at it and work around
complicated problems. There was no mention of running away every time a
project gets challenging. Just pointing out that if you truely love what you
do, nothing can hold you back. If you truely love and have a passion for what
you do, you should want complicated, nasty problems. You should have courage
and confidence in facing these problems...

Yes, dangerous advice. But it's the truth.

------
brlewis
<http://brlewis.com/y/2007/devscreen.png>

In ideas.txt, what I'm focused on now is always at the top.

Everything you see in that screenshot is done and released. I work mostly in
35-minute train rides. Some weeks about 5 hours is all I get to spend. Am I
getting more done than you? Be embarrassed and crank. Better yet, post what
you're going to do and do it.

More about public embarrassment as motivation can be found here:

<http://www.paulgraham.com/die.html>

------
DaniFong
I like chilling and engaging with a nice station on Pandora.com. Music really
seems to do it for me. It has to have the right sort of ebb and flow to bring
me up and down and back, just like my attention, for a mood optimized for
building :-) Right now my favorites are John Fahey, John Adams, Explosions in
the Sky, and Tommy Emmanuel. For some reason, instrumental, folksy tunes do
wonders for my productivity.

------
andrewfong
I try to break my project down into parallel tasks. If I get tired with one
track, I can switch around to something that's newer / less frustrating.

------
andyn
Ease yourself in. Either by just filling in that difficult piece of code with
comments outlining what it should do and fill it in line by line, just
sketching it out on a pen and paper.

Or, just promise yourself that you'll do just 5 minutes on it and usually once
you get going you don't want to stop.

------
wastedbrains
I build up a list of todos of small things to take care of. If I am having
trouble getting into something bigger I work on that list until I am drawn
into the code and the project and then I switch to larger / more complex
tasks.

~~~
rrival
To get into the zone, Mountain Dew + Nine Inch Nails, and keeping small dev
tasks on hand, as suggested elsewhere, works wonders. I like todo lists
(BaseCamp), haven't tried GTD.

To stay in the zone, /away on AIM/Gtalk, check email once per hour (thanks,
The 4 Hour Work Week), phone on vibrate or off. Making sure processes are
handled as a queue and not a stack so as to avoid the mania (stress++) of
putting out 1000 small fires.

No re-prioritizing anything if someone manages to get through the screens
above.

Most of all, as mentioned in another thread earlier, remembering that this is
a lifestyle; "ok I'll just binge now and start doing x,y,z when I've
[launched, fixed those bugs, implemented the next feature, gotten funding, ...
]" is a way to burn out and ignore the value of and need for finesse and
balance in all things.

------
edw519
I think of my project as my woman. Sure she nags and has all kinds of quirks
that drive me nuts, and there's so much about me that she simply doesn't
understand, so I just wanna get away from her from time to time. But I love
her so! She's like a magnet for me, calling me back, tempting me back in a way
only she can do. Oh, and that sweet nectar of clean compiles, finely tuned
common functions, and her lightning like response to my clicks and keystrokes
that just drives me crazy! Face it, fellow hackers, it's in our DNA. Nature
has designed us to follow that path of least resistance to propagate our
digital genes into perpetuity. We can't resist. We must get back to her. SHE
is my zone. (Sorry, I can't continue this post, my mouse is getting hard, I'm
in the zone, gotta go...)

