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.

Ask HN: I lost my ability to focus for hours on coding. How to regain?

142 pointsby codesternewsabout 6 years ago
I lost my ability to focus. I check social media and youtube frequently while doing work. If I do not do that I feel some void and feeling of losing out(I do not know how to express this).<p>How to regain my focus and avoid this trap?

59 comments

MaulingMonkeyabout 6 years ago
There&#x27;s a lot of factors that might go into this. If you&#x27;re hungry, sleepy, undersocialized, unkempt, unfit, depressed, in a loud, messy, and distracting office, with unclear and unexciting goals, large monolithic tasks without clear breakdowns on how to move forward, constrained by slow tools, management, or blocked on dependencies... well, it&#x27;d be no wonder you wouldn&#x27;t want to work!<p>Eat well. Sleep well. Exercise. Dress for success. Socialize, integrate with the team, find the goals that will motivate you - be that helping out your work buddies, or building that sweet new piece of technology.<p>You want to have energy, health, mood, and motivation. When any of these suffer, your work suffers too.<p>Don&#x27;t be afraid to use whatever tools you have at your disposal to cut out distractions and inhibit bad habits, but don&#x27;t tyrannize yourself either. Working 8 hours straight isn&#x27;t necessarily your most productive option. Consider scheduling breaks - but use your tools to limit your distractions outside of said breaks. Find a balance that will let you keep your mood up while also getting good work done.
评论 #19695111 未加载
评论 #19712680 未加载
DennisPabout 6 years ago
This is a common problem. The book <i>Deep Work</i> goes into it in detail, and has some research-based techniques to fix it. Basically it boils down to removing distractions, and determination, gradually building up your brain&#x27;s ability to focus again.<p><a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;dp&#x2F;B00X47ZVXM" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;dp&#x2F;B00X47ZVXM</a>
评论 #19694815 未加载
评论 #19694969 未加载
评论 #19698687 未加载
评论 #19695673 未加载
评论 #19694749 未加载
satokema_workabout 6 years ago
The real trap is feeling like you need to be focused eight hours a day when it&#x27;s not strictly needed.<p>There&#x27;s an occasional crunch where I have to heads down get something done, but in that case there is actual motivation to be heads down and get things done.<p>I find a due date way more motivating than a mere thought of &quot;I should be working...&quot;.<p>Overall, if I&#x27;m not already focused in, it&#x27;s because it&#x27;s something not as important as other things in my life.
benttoothpasteabout 6 years ago
<p><pre><code> echo &quot;127.0.0.1 facebook.com twitter.com ycombinator.com youtube.com&quot; &gt;&gt; &#x2F;etc&#x2F;hosts</code></pre>
评论 #19694615 未加载
评论 #19694551 未加载
jakegoldabout 6 years ago
Momentum!<p>At least for me, productivity requires momentum and being at a standstill feels like quite a hurdle. So at least at first, work on something you&#x27;re really excited about. Something that won&#x27;t feel like work. It could be a small project you couldn&#x27;t otherwise really justify spending time on, but do it anyway. Visualize the end result, get yourself excited, and finish it.<p>Once you&#x27;ve gained some speed you should be able to tackle other tasks and projects. Social media will start to seem less compelling than it does now.
评论 #19714143 未加载
addcnabout 6 years ago
When this happened to me I got a ton of advice (similar to what’s been written by other posters) and it was all great.<p>But to make any of it to stick I had to stop thinking of my productivity as some intellectual problem and myself as the master of my attention.<p>You’re not in control of most things. You’re trying to steer an elephant. Accept it, it’s easier and it’s true.<p>Then — with a slightly more realistic view of yourself set up processes and guardrails to keep your brain in line. Stimulus control sounds like a good first step. Check out StayFocused for Chrome and then delete all other browsers.<p>Add or remove one thing a week until you’re where you want to be. Good luck.
评论 #19701756 未加载
julienreszkaabout 6 years ago
I had that issue two months ago. I digged into my calendar and found out that&#x27;s when I stopped going to the swimming pool, doing enough physical exercise.<p>It&#x27;s old knowledge but : &quot;A Healthy mind needs a healthy body&quot; stays true.
评论 #19694833 未加载
dorkwoodabout 6 years ago
I&#x27;ve had this happen before. For a six-month period I was able to finish my day&#x27;s work and then head home and spend another 3-4 hours focusing on my own stuff. After having a three-week vacation, I lost this ability. I couldn&#x27;t focus anymore. I was back to being a regular person.<p>Things I did to get my focus back:<p>One is that I introduced sugar&#x2F;caffeine back into my diet. Drinking a sugary, caffeinated beverage improves my ability to concentrate significantly. While this might not be right for you, you might find that some of your other dietary choices are affecting the supply of glucose to your brain.<p>Another is routine. If you had the ability before, you can get it back again. One thing that helped me return to my groove was listening to the same music I used to listen to while concentrating. Having an album in the background on repeat can work wonders. Maybe there are some other important concentration triggers that you need to tap into.<p>Lastly, maybe your work just isn&#x27;t that interesting. Rediscover what things you actually want to be working on. Get excited about something again.
afarrellabout 6 years ago
Use tools such as SelfControl.app, ColdTurkey.app, and Freedom to block websites.<p>Some people will claim that is a crutch. Thats a great analogy because crutches help you get things done while you heal.
评论 #19694663 未加载
Darmodyabout 6 years ago
I have a similar problem which is ruining my life. Not only I cannot focus on my work, I cannot focus on anything. I&#x27;m throwing my degree and my life down the toilet.<p>There&#x27;s no light at the end of the tunnel right now. It&#x27;s the worst feeling I&#x27;ve ever experienced. I know what I should do but I can&#x27;t.
评论 #19698374 未加载
评论 #19703336 未加载
评论 #19698669 未加载
评论 #19698357 未加载
nix0nabout 6 years ago
Changing the color scheme in your editor can make your work seem novel again.<p>Electronic music also helps me, but this is counterproductive for some.
评论 #19694829 未加载
jmkniabout 6 years ago
It sounds trivial, but I find a pen and notepad to be helpful.<p>I write down a list of tasks I want to accomplish that day, and then tick them off as I go. Once I get to the end of the list, I&#x27;m done for the day and can have a beer (or go to the gym, depending on the day) :).<p>Then the next day it&#x27;s rinse&#x2F;repeat.
halleonardabout 6 years ago
Recognize that your FOMO (fear of missing out) is greatly amplified by social media and that using it only makes the situation far (far) worse, leading to more distraction, leading to more social media use, which feeds right back into the vicious cycle.<p>Learn to live without social media -&gt; watch your life improve.<p>It&#x27;s as simple as that.<p>Delete your accounts, including Twitter. Find other ways to stay connected to timely information. Treat it as a good challenge that you _can_ succeed at, as something that will make you stronger and healthier in the end.
tomlagierabout 6 years ago
For me, this means that a) I am not interested in my work, b) I am tired, or c) I am burnt out. All of these can be greatly helped by getting some good sleep, and a + c can be helped by having some fun - especially social or physical activity somewhere new (weekend trip, drinks with friends, etc).<p>You can try and force yourself to focus with tools and mental tricks, but that always seems to make me feel worse. Better to get at the root cause, which is almost always stress or physical exhaustion.
elliekellyabout 6 years ago
I had a similar issue recently and during one of my many afternoons dicking around on the internet to avoid work I actually found a solution that worked surprisingly well: FocusMate.com<p>It&#x27;s kind of like chat roulette (before it got weird) for study buddies. I&#x27;ll admit the premise is a bit odd butt don&#x27;t knock it until you&#x27;ve tried it. Essentially, you&#x27;re paired with a random partner for a 50 minute mostly-silent video chat. You spend the first minute or two saying a quick hello and each definitively stating what you&#x27;re going to accomplish in the hour and then you get to work (separately - they&#x27;re very clear it&#x27;s not for collaboration). When time is up you both report back on whether you did what you set out to do. And while you get to work the corner of your screen has a little live stream of your partner diligently working.<p>Not only does it help keep me &quot;accountable&quot; and working pretty efficiently for the full 50 minutes but it&#x27;s also made me so much better&#x2F;more realistic about estimating what can be accomplished in that time.
jhareabout 6 years ago
I had to completely clear my mind of the past, and of what others may think of my project&#x2F;code. It&#x27;s a brand new day, you&#x27;re breathing, you can truly work on whatever you want.<p>When I&#x27;m hot on a new video game, I can&#x27;t wait to fill the most immediate next hours on doing it. What was that for you at some point? I enjoyed QBasic in gradeschool and revisiting after years in the field was really fun.<p>Whatever that code is, I suggest pursuing it even if it&#x27;s not<p>a) something everybody on here says we need to be doing<p>b) related to your dayjob<p>c) related to that &quot;big project&quot; that you need to do perfectly<p>I wish you the best.<p>P.S. strike perfectionism out of your mind<p>P.P.S: Practically look into using the Pomodoro Method<p>P.P.P.S: Either start or stop doing drugs. Or see a board-certified medical professional if you think that would be dope. It is.<p>edit: formatting as always
Raphmediaabout 6 years ago
Could something else trigger your distractions and then spiral you into out of topic behaviours?<p>In my case, that&#x27;s a chatty coworker. Every time he yanks me out of my flow, I get the urge to check social networks and have a really hard time going back to deep work.
scotty79about 6 years ago
The problem is you mixed work with other things and since other things are less boring and less challenging your brain escapes to them semi-automatically.<p>Quick and dirty hack is change your surroundings. Go to another room, sit at different desk, on different chair, on a different clean computer (with different os?). Don&#x27;t open any of your usual distractions there. Block them in hosts file (don&#x27;t even check if you blocked them successfully).<p>You&#x27;ll regain bit of your focus. At least till you leatn to slack off there too.
ncmncmabout 6 years ago
This happened to me.<p>The void feeling is Depression. Youtube distracts from it, but reliance on distractors is only a symptom.<p>There are many kinds of depression, distinguished first and foremost by what treatment works on each.<p>That is the reason that &quot;gold standard&quot; double-blind trials fail to find that anti-depressants work. Imagine if you couldn&#x27;t distinguish a broken arm from a broken leg, a broken humerus from a broken ankle. Trials of a cast on the left lower leg help only a few people, on the right only a few; left upper arm, right forearm, yada yada. &quot;Casts are ineffective!&quot;<p>Take the wrong meds, nothing happens. Take the right one, miracle!<p>There is no shame in medicating a problem: &quot;If you can&#x27;t make enough of your own serotonin, store-bought is fine.&quot;<p>It is entirely possible that losing 50 pounds, or exercising devotedly, or dropping carbohydrates and alcohol from your diet would also fix it. Medicate first, and then see if those help. There is no end of benefits to these other measures, but you need to get your brain working right first, or you set yourself up to fail.<p>In my case I was fixed up only two days after getting a sufficient dose of the right thing. A smaller dose had no effect, and other meds had no effect. Some kinds take weeks to build up before anything happens. I had five serious side effects (dry mouth, jaw clenching, ears ringing, dizzy spells, one more I don&#x27;t recall) that passed after a few months.<p>You can get past this, with help. Get help!
0815testabout 6 years ago
Use the Pomodoro technique and limit your social media checks (if any) to the scheduled breaks that the technique provides for you. In general, it&#x27;s also highly desirable to enter a <i>flow</i> state as quickly as possible (this is what &quot;focus&quot; really is, after all) and there are ways to make this more likely, such as starting your session with easier, lower-stress tasks and moving on to harder stuff incrementally.
muzaniabout 6 years ago
For me, I find this is more about fear&#x2F;dread. I don&#x27;t procrastinate on social media when I&#x27;m doing something well.<p>You&#x27;ll have to find a way past that fear. You can:<p>1. Be braver - admit you&#x27;re afraid and do it anyway.<p>2. Find the root cause of fear. Maybe you&#x27;ve dealt with too many death marches. Maybe you don&#x27;t feel like you can meet your expectations. Just admitting it can make it go away.<p>3. Plan it out in a way that nobody can screw it up, not even you.
autoexecabout 6 years ago
I&#x27;ll probably catch some flak for this, but if this is just a short term hurdle during a single project get your hands on some adderall. If it continues for more than a couple weeks even when you&#x27;re working on something you are passionate about put the pills away and take some time off away from the keyboard to try to decide if this is an issue of focus and distraction or just burn out.
vibrolaxabout 6 years ago
I would guess that your lack of concentration is due to boredom, maybe because you&#x27;re working on stuff you don&#x27;t care about. If circumstances requires you to work on uninteresting things, putting the distractors out of easy reach can help you grind away in the short term. In my own experience, I needed to change industries to work on things I found more interesting.
Townleyabout 6 years ago
Talk to your supervisors about how you aren&#x27;t excited about your tasks at work. If there&#x27;s nothing they can do about it, quit. Find something that excites you.<p>A family friend of mine used to play violin in a traveling rock band. He slept in the van and loved every minute of it. Later, when he had a family, he settled down and became a contracted fundraiser for non-profits. One day he came across a particular non-profit that he loved, identified with, and felt excited by. He took a 50% pay cut and settled into a permanent position with that company because &quot;it felt like being back in the van again&quot;<p>If you&#x27;re the kind of intrinsically-motivated person who can trick their head into being excited about 12 hours of being immersed in a problem, then you&#x27;d be an incredible asset to any company that gets you excited.<p>If you have an idea of what company, industry, or problem that might be (good news: people usually do), pursue it like hell.
mac01021about 6 years ago
Stop all use of these sites for a month.<p>See if other &quot;distractions&quot; take their place.<p>If no, then you&#x27;re just addicted to social media and hopefully that month will cure you.<p>If yes, you&#x27;re probably burnt out and need to move to your next exciting new job, or move house, or go on a road trip for a few weeks or whatever it is people to deal with burn out.
sys_64738about 6 years ago
I have a hard and fast rule to never use a work computer for anything except work. Also, enforce rationing your use of FB to after 7pm for 15 mins max. You&#x27;ll find the hours spent wasted can be summarized in a 15 min block. The key for me is hard and unbreakable delimiters.
ohaideredevsabout 6 years ago
Regarding the &quot;some void and feeling of losing out(I do not know how to express this)&quot; - &quot;The Willpower Instinct&quot; is a book that covers that exact feelings and how to address it. Unfortunately I am too lazy to find the exact location in the book for you.
RandomInteger4about 6 years ago
Something like this requires dedicated and deliberate behavior modification to fix.<p>You&#x27;ve essentially developed a habit. Like others have said, this might be caused by various factors, so look at what&#x27;s lacking in your life and try to fix that, but afterwards you may need to create a plan in writing to correct the behaviors of the habit that has formed, because otherwise, even if you fix the root cause, the habit might still remain.<p>As for how? That&#x27;s a good question that I don&#x27;t yet have the answer to. I&#x27;m working on the first part myself. After I fix my root cause, I think I will fix the habit via a combination of lists and daily resets (i.e. no old tabs on the computer the next day).
ktpsnsabout 6 years ago
Social Media Trap -- I installed the Leechblock extension for Firefox which helped me a bit. Also going to special places like silent libraries is helpful for me to concentrate. As final escape, think about going offline. Documentation can be downloaded.
mproudabout 6 years ago
Do it, but something different.<p>If you are a writer, and you’re stuck writing a book, you write something else for a while. If you’re a painter, you might try using a new medium.<p>You’re a programmer, so try tackling a completely different small problem. Maybe take the opportunity to try a totally new (to you) language — don’t be afraid to use something <i>radically</i> different. Ever code in assembly? Why not!<p>Some people work better when they’re “in the spotlight.” Twitch streamers are often known for entertainment, but actually many coders show up there, too. You could try starting a stream, and see if you are more focused when people might be watching.
mchannonabout 6 years ago
This may sound stupid or trite, but have you considered moving into a management position?<p>Social media and Youtube may be stealing your attention because you simply enjoy them more. If coding was more enjoyable, you&#x27;d be doing more coding at the expense of those distractions.<p>But maybe you just don&#x27;t enjoy coding your current project. A lot of projects are not intellectually or morally stimulating, and it&#x27;s hard to stay excited about them, particularly if your work culture is the least bit toxic.<p>Being a manager means dealing with people, and a lot of experienced coders actually get more out of that than out of JIRA-code-Git-repeat.
评论 #19694651 未加载
Debugrealityabout 6 years ago
I wrote a blog about this a long time ago here: <a href="http:&#x2F;&#x2F;debugreality.blogspot.com&#x2F;2010&#x2F;03&#x2F;hidden-dangers-of-working-in-it.html" rel="nofollow">http:&#x2F;&#x2F;debugreality.blogspot.com&#x2F;2010&#x2F;03&#x2F;hidden-dangers-of-w...</a><p>It basically boils down to understanding the negative effects of your work and taking responsibility for your mental well being by countering them which is where work life balance come from.<p>Previous HN discussion here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1203696" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1203696</a>
TrinaryWorksTooabout 6 years ago
I found that I do that when I feel I haven&#x27;t been around enough people. Perhaps upping the priority of talking with people, anyone can help you feel better. Does this seem to resonate with you? It could be any reason
评论 #19702063 未加载
craftinatorabout 6 years ago
Watch more porn, or get laid more.<p>I was having focus issues, because coding is fascinating but not inherently sexy to me. After working on a problem for a while, the enjoyment of the problem would become overshadowed by my sex drive, and I would start to find anything else more interesting. Ended up being my body&#x27;s way of reminding me that I should make some babies before I died, so I was subconsciously distracting myself away from anything fascinating that wasn&#x27;t the opposite sex.
评论 #19694716 未加载
nikiviabout 6 years ago
I wrote some things that help me focus here:<p><a href="https:&#x2F;&#x2F;wiki.nikitavoloboev.xyz&#x2F;focusing" rel="nofollow">https:&#x2F;&#x2F;wiki.nikitavoloboev.xyz&#x2F;focusing</a><p>Mostly it’s about practicing mindfulness throughout the day, setting goals, GTD approach of task management and using tools like Focus for automated Focus sessions throughout the day with breaks in which I am allowed to read news and relax.
评论 #19695147 未加载
orevabout 6 years ago
It’s a vicious cycle.. the more you distract yourself, the more your brain wants quick hits, so you feel the craving for more distractions. There are many ways to help outlined by other comments here, getting exercise probably one of the most effective. However any solution will involve you making a conscious effort to pull out of the cycle and change your habits.
Insanityabout 6 years ago
When you are coding, or when you are working? I&#x27;m asking because perhaps you just don&#x27;t enjoy your job. Can you still code for some hours when you&#x27;re working on side-projects or learning new things?<p>I have no useful tips to add beyond what&#x27;s already been mentioned here. The only thing I can suggest is to clarify if your _job_ might be the real problem.
评论 #19698462 未加载
stuntabout 6 years ago
if you are asking it here, I assume you did some online research too and I believe that you already know all the solutions. For most of the people the problem is not sticking with these solutions and not being patient enough to get the result.<p>I’m married, above 30 with a lot of things going on in my life. And often my co-workers make joke about me going into ZEN mode when working.<p>Don’t look for a magic tricks. It is as simple as you hear from everyone. You just need to be patient and stick with them long enough for your brain to get use to it.<p>I’m careful about eating and sleeping. Having enough fun. I put my phone away while working and resting. I use Pomodoro technique to make sure I have enough short breaks and I have a goal. And I know very basic of meditation breathing technique (learned literally in 30mins). I only drink one cup of coffee on the morning and one cup of tea on the afternoon.
评论 #19699859 未加载
6ue7nNMEEbHcMabout 6 years ago
Heavy metal helps for me. Try Iron Maiden, Metallica, Dream Theater, Moonspell, Therion, etc. all this works for me. And stop visiting those websites of course ;-). Make accessing them harder, you could add the problematic domains to &#x2F;etc&#x2F;hosts to resolve to 127.0.0.1 or something like that.
评论 #19700023 未加载
chiffreabout 6 years ago
If you are not against some help from technology, then there are software&#x2F;apps that block internet access for social media web-sites etc e.g. freedom.to<p>You could also try browser extensions, e.g. for Firefox: Mind the Time -- shows stats of internet usage; LeechBlock NG -- blocks sites.
afarrellabout 6 years ago
Recognize what unmet needs your habits are grasping towards.<p>If you spend too much time on facebook, it could be because that is the lowest-effort way to keep up with friends you value. Message 4 of them and schedule a time for a phone call. Better yet, schedule a <i>recurring</i> phone call.
ErotemeObelusabout 6 years ago
No you didn&#x27;t. This is an emotional problem masquerading as a cognitive one.<p>This happens to me at my three-hour university lectures. Some days I am emotionally tortured and cannot focus at all. Some days I am emotionally healthy and can focus through nearly the whole thing.
mleonhardabout 6 years ago
Find a good therapist. It may even be free, depending on your health insurance. My therapist has helped me discover the root causes of mental habits that are holding me back. Now I&#x27;m making progress on them. The sessions are worth my time and money.
bartimusabout 6 years ago
You might be genetically susceptible to distractions. Some people are just better at focusing than others. It&#x27;s perhaps not where your power is.<p>The best solution is to simply delete all your social media accounts that you don&#x27;t use professionally (strategically).
brlewisabout 6 years ago
Is the lost focus for the work you do as part of the job you described <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18400859" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18400859</a> ?
practice9about 6 years ago
In my experience, only regular meditation sessions and physical activity (i.e. working out) will help.<p>Also look into your diet, too many carbs &#x2F; sugars could make you sleepy and are not good for your concentration skills
sorryforthethroabout 6 years ago
Self-fulfilling prophecy, probably a reason you want to be in this trap
jsistoabout 6 years ago
Uninstall Instagram and Facebook from your phone. Block them and other time-wasting sites on your computer. Start training yourself to not be distracted. This is what has worked best for me.
评论 #19694870 未加载
DoreenMicheleabout 6 years ago
Look to your health. Eat right. Exercise. Clean your workspace. Etc.
rootusrootusabout 6 years ago
I think you answered your own question. Ditch the social media. It only hurts for a bit, and then you start to feel better and wonder why you were so obsessed to begin with.
moltarabout 6 years ago
It happened to me on a job that I hated. Doing something you like might fix it.<p>Try a side project or some library or module that you’ve always wanted to write.
gremlinsincabout 6 years ago
depression, anxiety, and adhd (inattentive), had me troubling to stay focused. I lost 90 lbs (515 down to 425) since September, started seeing a therapist, and start adhd meds... the crossfit&#x2F;keto&#x2F;fitness + adhd meds have had the biggest effect on mood, depression, and focus. I&#x27;m taking 50 mg if Vyvanse and it totally keeps me balanced and focused.
leesecabout 6 years ago
Adderall. Truly.
评论 #19694880 未加载
评论 #19694896 未加载
dhruvkarabout 6 years ago
I lost my ability to focus for ~6 months.<p>I started working on something that I cared about.<p>Slowly, over 3-4 months, I regained it.
jcmosconabout 6 years ago
Maybe the DMAE supplement could help your brain to regain focus.
codefulabout 6 years ago
it sounds like addiction to me. Some people are more sensitive to all kinds of addictions than other.
bluebooabout 6 years ago
Work is work
jnurmineabout 6 years ago
Caveat: I can only speak for myself and don&#x27;t know if these are extrapolatable to others. I can&#x27;t say I&#x27;m an über-focus person, probably mediocre, but I use tools to help be better. I know co-workers who would be in a deep focus while the house is burning around them, and I&#x27;m not at that level.<p>TL;DR: Reduce cognitive load.<p>Rule 1. Make your environment conductive to focus.<p>If you are in an open office, you have a shit sandwich to start with. So isolate yourself from the cognitive &quot;filth and rabble&quot;. Long time ago I worked with a guy who built a cardboard wall and then wired a camo net over his cubicle, but maybe one doesn&#x27;t have to go to such extremes.<p>Headphones: Use headphones and music to drown out co-workers talking and other noise. I don&#x27;t play my absolute all-time favorite tracks on repeat, I play something I merely like: noisy stuff like some desert sludge metal or stoner rock -- I sort of tune out the music and the music drowns out all the noise. You&#x27;ll need to experiment what music works best for you. I use Spotify and try to improve my playlists with new interesting music.<p>Tune your programming environment to have a look-and-feel that fades to the background. Nicer and duller colors. Learn all the shortcuts to be effective, and learn a powerful editor which gives you macros and regular expressions and whatnot. The less mouse you need the less mini context switch which is better.<p>Turn off audio notices, turn off all blinking &quot;hey you have mail&quot;.<p>Rule 2. Coffee&#x2F;tea in moderation.<p>Too much of too strong coffee within too short time makes my focus become scattered. My mind starts to get racy. The best thing is to dose coffee such that one doesn&#x27;t go over the limit. A tea in the morning a few hours after waking up works quite well.<p>Rule 3. Notes and checklists.<p>It helps to be a compulsive note-taker. Before I start anything, I make sure to have a vague idea of what to do, then I make a checklist. I write down notes and think of next things to do while waiting for something. I do &quot;self-retrospectives&quot;: when I&#x27;m done with a few hours work, I go through it and make notes and checklists of next things.<p>The checklist lives all the time, new things get added and old points get marked as red cross (not done, bad idea, didn&#x27;t work, etc.) or green tick (done, clear, good idea, etc.). I use a program called Zim but you can do it with any editor.<p>Rule 4. Train your memory.<p>I&#x27;ve noticed it becomes easier to suppress problems from tiny context switches that way. One is less likely to forget the context prior to the interruption, and the notes help a lot with this, too.<p>Rule 5. Rest to recover.<p>When you&#x27;re not at work, you&#x27;re not at work and you should not be thinking about work either. Exercise, read, do something else you like.
gridlockdabout 6 years ago
&gt; I check social media and youtube frequently while doing work.<p>Well, <i>don&#x27;t do it</i> then.<p>&gt; If I do not do that I feel some void and feeling of losing out<p>This is a <i>minor discomfort</i>. You need <i>learn to cope</i>. You must be young and healthy now, but the reality is that down the line, you are likely to develop some sort of permanent injury&#x2F;impairment that you will have to cope with for the rest of your life. Start small, learn to cope with that little bit of discomfort.<p>Not to belittle, it&#x27;s actually a major and widespread problem. Avoidance of minor discomforts is literally what keeps people smoking until it kills them. It&#x27;s what holds people back from achieving the best life they can have because they avoid all the little risks that add up to big opportunities.<p>You have a will, you&#x27;re not slave to your whims. Take control of your life and earn some self-respect.