TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Are You a Zen Coder or Distraction-Junkie?

318 pointsby jirinovotnyover 13 years ago

31 comments

dkarlover 13 years ago
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:<p>- relaxing and taking a web-surfing break (Facebook, HN, national news) until the uncertainty resolves, or<p>- gritting my teeth, amping up the intensity, and blasting through to the right resolution while heavy metal music wails in the background.<p>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?<p>Yes, my brain thinks a lot of strange and stupid things when I'm not paying attention and correcting it.<p>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.<p>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!
评论 #3583333 未加载
评论 #3583319 未加载
greenyodaover 13 years ago
"Divide your time into 60 – 120 minutes blocks of work. Focus 100% percent in these blocks of time. Then take a 20-30 minute break and do something else entirely."<p>This might be usable advice for someone who works at home on his own business, but for those of us who work in office environments, there are sources of distraction that are much more difficult to control than the urge to read news: meetings, your boss walking into your office, colleagues who interrupt you with urgent requests for help, etc. (If you're a developer who also manages a team, multiply this by ten.) The only time I can get an hour of uninterrupted work is after everyone goes home. So I think a more useful question is: how can you get back into a productive state more quickly after the inevitable interruption occurs?<p>Or, to go back to Zen: how can you lose the attachment you have to the flow of uninterrupted work? When it happens, it feels really good, but when it doesn't happen, it would be better not to get too frustrated about it and be able to move on.<p>That said, I thought the article's advice to consciously choose stretching or brief meditation over e-mail or news to be something worth trying.
评论 #3581736 未加载
评论 #3581899 未加载
lysolover 13 years ago
There are salient points here, but they're masked by the caricature of a maniac who can't go without Facebook for five seconds and a mythical beast that never gives his brain a break from work. Real developers fit into some reasonable amount of both kinds of behavior and it's the balance that is important, and different for every developer.<p>Be smart and be true to yourself, not a watered down version of someone else's life philosophy.
评论 #3582128 未加载
chrislomaxover 13 years ago
This is the first news story I have bookmarked, ever. Mainly because I got distracted and started reading Mashable.<p>Jokes aside, I thought I had a form of ADHD with how much distractions distracted me. It's quite comforting to know other people operate this way.<p>I have recently, as kind of a new years resolution, aimed to be more productive. I have found myself managing my project management list more efficiently and using my "priority" status on my tasks. When I get in, in the morning, I just work top down on my priority list.<p>My main issue was down to not knowing fully what my next task was so I would spend time finding the task that needs sorting. I have found that the extra 15 mins a day I spend updating my task list has saved hours per week.<p>This has also helped when you get to the end of projects and you get the small tasks that can take hours to sort when there is no clear defined list.<p>I'm a task completion junkie, I feel good when I mark a task 100% and the changes I have made so far this year have fuelled my addiction.
评论 #3581879 未加载
评论 #3582043 未加载
unimpressiveover 13 years ago
I already know that I spend too much time on things like Hacker News. (Which is why I take ironic and self deprecating usernames like unimpressive.) Reading, while helpful, isn't helpful past a certain point. The problem is that reading feels just as helpful when you need it as it does when you don't.<p>It's certainly easier to do something after having read about it. But how much can you really do, and how much of it is truly relevant to your goals? You can't help but feel that not tapping into powerful tools like RSS feeds is damaging in some way. Intangible as it is.
Osmoseover 13 years ago
My personal habit is to play with a small deck of business cards, or sometimes a koosh ball with thin filaments. Both provide a pleasing tactile sensation and are easy enough to mess around with while thinking.<p>I also find it helpful to use this downtime to review how I've been working. The best thing I learned from the Pragmatic Programmer was to review my coding techniques and patterns, and see where there could be an improvement. Perhaps I spent the last 20 minutes fixing the wrong problem, or perhaps I didn't use a design pattern that would've made my code cleaner and easier to understand. Micro-breaks are a great time for these reviews because the code is fresh in your mind, whereas a retrospective when a release is done requires a lot more looking back.
farkobover 13 years ago
I don't think this article offers anything to solve the problem. I believe most of the people can identify the problem. Yeah you check your mail or facebook while you're working and it causes productivity loss. But just being aware of it doesn't solve the problem. It's like when people try to lose weight they know they have to eat healthy or less but just knowing that again doesn't make them easily lose weight. Because just like losing weight, the problem about productivity isn't about knowing what to do or what not to do. Everybody knows what to do, it's simple, no distractions = better work. Real problem is avoiding that one quick facebook check every day and every hour.
aDemoUzerover 13 years ago
I don't compile (web application) but have period of time when I am running test suite and have to wait.<p>If I have such free time, there is always something else work-related for me to do, since I am not tasked with only coding. - Go over the code I have just written.<p>- It is time to commit, so look at diffs and commit.<p>- Check the server's performance.<p>- Go over list of pivotal stories and see what I be doing next.<p>- Take a break, go for a walk around in the building, check out the beautiful view.<p>- Go over calendar and see if there is anything I need to not-forget.<p>- Read something related to programming, a book at work or an article.<p>- Have a talk with fellow co-workers about something that has been on your mind.
stephenover 13 years ago
I have the best luck staying on task by doodling--keep a pad of paper and pen on my desk, and while waiting for compiling/whatever, just draw.<p>It's like being bored in class but still needing to pay some amount of attention.<p><a href="http://www.npr.org/templates/story/story.php?storyId=101727048" rel="nofollow">http://www.npr.org/templates/story/story.php?storyId=1017270...</a><p>There was also a TED talk that was pro-doodling, so it must be awesome, right?<p><a href="http://www.ted.com/talks/sunni_brown.html" rel="nofollow">http://www.ted.com/talks/sunni_brown.html</a>
yasonover 13 years ago
I think I just mostly try go with the flow. Often I don't succeed in that but sometimes I do and it feels good.<p>Give me an interesting task that has few dependencies to others and you're going to have a hard time removing me from the computer. Give me a loose task that requires a lot of waiting and you're going to have a hard time removing me from HN or from other interests.<p>If I try to be highly productive all the time, I just fail myself and get depressed. Since that doesn't work I try to optimize my workflow by working on things that benefit from the idle lulls. Tasks that last days or weeks are most suitable: there might be a lot of "idling" but when I get to writing code I can bang 16 hours straight and accomplish in a day what would otherwise have taken ten days.<p>Conversely, doing a lot of communication-bound work will soon make me feel busy and exhausted. I'll be waiting or polling something all the time, and what's worse, I can't start anything I think is real work because I have to maintain the stack of pending tasks all the time so I know how to unwind when they finish one by one. If I dive into something then it'll take even more time for me to figure out what to do when I next hit the event loop again.<p>I try to teach myself that even little work <i>is enough</i>: working like I would love to work, the artist's way of work, is pretty much impossible in a business environment. If I'm confident I've done enough eventhough it's nothing compared to a weekend roll with a hobby project, then I don't feel so bad about getting "nothing" done. And when I get done a lot, I try to enjoy it as a precious window of time rather than the minimal bar I should reach in the following weeks.
johnwatson11218over 13 years ago
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.
jpatteover 13 years ago
IMHO this also as a lot to do with setting an appropriate work environment. On a desktop designed for work you should only have links and bookmarks related to your work. A bookmark to Facebook is a constant reminder that there might be something new on Facebook, and it's sole effect is to distract you.<p>I also noticed that having an appropriate background music is important. In my case I like to listen to Progressive Trance music (mostly ETN.FM Channel 2), and I have hundreds of recorded shows of 1 or 2 hours each. The goal here is to maintain a rhythm : keep going as the music goes on. I never listen to this music when I'm not working, so I ended up naturally associating it with work.<p>Every time a music show ends, I take a few seconds to look back on what I did during the last hour : did I complete my task ? Do I need a break ? If I feel stuck or tired I stop the music, switch environment to browse Facebook/Mail/HN/whatever, then come back 20 or 30 minutes later. Then I start by "reloading my context", reminding what I was doing and what problems I needed to solve, having a look on my TODO list (paper), and when I feel ready I start the music again and begin coding.
matheusalmeidaover 13 years ago
I have to agree with the author of the post. I had the habit of checking my personal email, read BBC to see it the world was not in war and checking HN while the project I was working was building (I thought it was no big deal <a href="http://xkcd.com/303/" rel="nofollow">http://xkcd.com/303/</a>). The big deal is that it affected my productivity. Period. When the program finished building or it aborted in the middle of the process of building, I was still thinking about something I read. It always took me some minutes before I was ready again to continue where I was.<p>Since the project I'm working can have long periods of building time (~up to 40minutes), I've started several projects while waiting for the program to build. Since they are all related to coding, I feel that I can swith taks much easily than reading news/checking email. And I believe I'll become a better programmer because of that (also because the projects I've started are tools to help me to perform my work).
voidrover 13 years ago
What if our brain is actually a multi core machine that has millions of cores? Would you still force it to use one core?<p>What if the task you just put into background kept working on it's own?<p>I think humans were built to multitask, our environment is too complex to be single threaded, think driving: you need o pay attention to multiply things at the same time.
评论 #3581486 未加载
评论 #3581458 未加载
评论 #3581417 未加载
评论 #3593147 未加载
评论 #3583970 未加载
评论 #3584158 未加载
ohyesover 13 years ago
If you find yourself getting distracted a ton, maybe you should take a step back and look at what you are working on?<p>Do you believe in it?<p>Do you find it challenging and interesting?<p>Are you working on something that is important to you and makes a difference?<p>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.<p>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'.<p>If you are starting surf HN/Reddit/Facebook like an ADD net-squirrel, maybe you need to work on something cool that you actually <i>want</i> to work on. When you've gotten to a good/excited place on the cool thing, switch back to the mundane crap.
tathagatadgover 13 years ago
The last article I read before going to sleep was <a href="http://en.wikipedia.org/wiki/Attention_deficit_hyperactivity_disorder" rel="nofollow">http://en.wikipedia.org/wiki/Attention_deficit_hyperactivity...</a> - 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 &#62; speed_of_implemented_idea).<p>My question is be it pomodoro or this bigger focused chunk - I've always struggled at the boundaries. Say you are not done at the end of the stipulated time for focused work - there's this one liner fix that'll only take a second - and that blows it. Ever fell into that trap?
评论 #3582168 未加载
SonicSoulover 13 years ago
i found the Pomodoro technique helpful <a href="http://www.pomodorotechnique.com/" rel="nofollow">http://www.pomodorotechnique.com/</a><p>and if you're honest with yourself, it gives a useful measure at the end of the day of how much time was spent on uninterrupted work.
twiceadayover 13 years ago
I find that it depends on the project, but there have been times when I am so focused I start coding in the shower. Then proceed to forget to eat breakfast... lunch... and dinner. I just forget about my body.
评论 #3581548 未加载
Achsharover 13 years ago
I am the distraction junkie type but in a good way i guess. Loud music nd distractions (both online and offline) are the main drivers of my workflow. I find that if i have some kind of a mental feeling (out of the computer context) to push me through that code problem which won't solve, i can work alot faster and efficiently. For example i dont have a smartphone right now but i can get one if i finish my current gig then i really think about smartphone in my free time. It keeps the furnace hot :)
xarienover 13 years ago
How do you value inspiration or innovation stemming from distractions? I'll go on a limb and state that distractions can be more productive than zen coding...
评论 #3581420 未加载
评论 #3581409 未加载
damian2000over 13 years ago
+1 for the breakdancing horse! I found I tend to be distracted more easily when I'm working on something that is repetetive or isn't really challenging. When I'm working on a serious bug and trying to solve some problem, I don't have any problem getting into 'the zone'.<p>Its interesting that in Sweden they have workplace laws actually requiring that anyone working at a computer screen gets 10 minutes of rest (away from the screen) every hour.
potomakover 13 years ago
I think I'm a distraction-junkie, I'm using Tomatoes[1], a tool to measure coding slots with pomodoros. It works great, but when I'm compiling my code, in my case running tests because I work on web applications, I can't resist to check email. I'll try useful tips from the article like reading while waiting for long tasks.<p>[1] <a href="http://tomatoes.heroku.com" rel="nofollow">http://tomatoes.heroku.com</a>
tobiasSoftwareover 13 years ago
I would add to this a way to keep on coding while compiling. Sometimes I read the code, which does give a coding break since I am taking input and not producing output. However, at the same time I might discover errors, figure out better ways of coding something, and learn or remember how to software I wrote works.
mellingover 13 years ago
Perhaps the Go language will help the distraction-junkie. Build times of seconds, even for very large projects.<p><a href="http://stackoverflow.com/questions/2976630/why-does-go-compile-quickly" rel="nofollow">http://stackoverflow.com/questions/2976630/why-does-go-compi...</a>
评论 #3581849 未加载
评论 #3582087 未加载
j_bakerover 13 years ago
Am I the only one who feels that distraction isn't necessarily a bad thing? I find that even my most productive days aren't distraction-free. And oftentimes my best ideas come when I'm most distracted.
评论 #3582066 未加载
dancingrobot84over 13 years ago
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:)
评论 #3582801 未加载
splicerover 13 years ago
<i>That time is ridiculously tiny compared to the rest of your workday</i><p>The project I was working on a few months ago took 40 minutes to build on an i7 with 8 GB of RAM.
评论 #3582155 未加载
Void_over 13 years ago
I read this article while waiting for the deploy. Whoops.
rbanffyover 13 years ago
If you are reading this during work, you probably are closer to distraction junkie. ;-)<p>I think I can reliably derive my focus from the traffic between my machine and HN.
conradfrover 13 years ago
I have ADD and I am in an open space. It's hard sometimes.<p>Fortunately I do PHP and do not need to compile ;)
dropshopsaover 13 years ago
LOL, I checked this post while I was waiting for my programe to compile.
评论 #3581578 未加载