16 ms·
Ask HN: Any scientifically proven techniques to boost concentration?
I feel like I have to be in a very specific head space to write code. It’s like climbing a big hill but in my head. Sometimes it’s effortless and sometimes it’s a slog.
Are there any proven exercises or techniques I can adopt that are proven to boost my ability to focus and get in that clear headspace to write code?
Edit: adding some tips as I try to figure this out. Note: not scientifically proven (to my knowledge)
1. Music. which type depends on the individual.
2. Timing. Dead of night or early in the morning when the world is quiet. Not this isn’t a muscle you can flex at any time, you have to just capitalize on the right time.
3. Long shower
4. Caffeine
5. Get out of the office/house go somewhere else (like a cafe)
6. Take a walk
7. Have a beer
8. Write thoughts down in a notebook without any phones/laptop in sight and then jump to the laptop to implement
9. Meditate
10. Lift weights / exercise to work the demons out and quiet the mind
- thethethethe 5y agoWellbutrin. Similar to Adderall but a lot easier to get legitimately and isn't fleeting with time.
- baremetal 5y agodont look at your phone while youre waiting in lines etc. meditate instead. its like a free lunch for building concentration.
- crypto_bird 5y agoI'm calling myself out here, but, get enough sleep. it's huge for concentration.
- sizzle 5y agoAmphetamines and other stimulants are huge cognitive boosters
- frereubu 5y agoCounterpoint: I have found that stimulants (caffeine is about as strong as I get these days) work for short periods of time, then become a net negative. Over the course of a week I'd get more done by having absolutely no stimulants, not even caffeine. Even for short-term work crunches they can be detrimental because they increase stress levels, which can lead to mental paralysis.
- sizzle 5y agoYes having baseline constant energy levels is arguably the best strategy over high highs and subsequent low lows
- Anonymous4272 5y agoI prefer nicotine over caffiene, since it calms the body, relaxes it (including the joints and bowels) and allows you to focus on the task at hand without any distraction. Theres also many different ways of taking nicotine (from cigs and vaping to gum and snus to patches). YMWV but a lot of people i know like nicotine for this exact reason
- culopatin 5y agoNo phones in sight (unless you code phone apps I guess). No notifications. And I write down any thoughts that my brain wants me to get into for later.
- aprao 5y agoThis (no phones, no notifications) has singlehandedly been the most effective step I have taken for better concentration.
- outlawBand 5y agocaffeine + headphones and music
- deleted 5y ago[deleted]
- PaulHoule 5y agoI struggled to find a description of it on the web (everybody gets hung up on secondary details like 'light a candle' and 'read a sacred text') but basically you can (1) set a timer for some specific time (say 5-10 minutes to start, could be more once you get experienced; it's important to use the timer so you don't need to think about when to stop.) (2) meditate by closing eyes, focusing on the breath, relaxing, for a short time. (practice this by itself first if you are starting out) eyes closed is important because the point is to get your brain producing alpha waves. (3) focus on some object (could be a thing in the your environment, could be something you visualize) and whenever your mind wanders from the object you put your attention on the object and tell yourself "that is interesting but this is more interesting". it does not matter if you are eyes open or closed at this point because the concentration state involves the brain producing beta waves.
- thanatos519 5y agoThe most important part is to do it every day.
- AitchEmArsey 5y agoWhat you are describing is "mindfulness" exercises; basically a modern take on meditation. I have the app "Meditation Studio" which consists of some softly-spoken people talking you through breathing exercises and relaxation - would recommend for anyone wanting to try these techniques.
- PaulHoule 5y ago... except I hate the word "mindfulness". There is a specific person I know who talks about "mindfulness" and then walks into an open pit.
- WaxedChewbacca 5y agoI don't think there's much sense in hating it. It has a real and interesting meaning, but it's just rare to hear anyone provide it. The problem is that understanding it rests on something most people have never even heard of, much less looked into themselves: that experience does not actually work how they think it does. Experience seems panoramic, i.e. continuously seeing, continuously hearing, etc. But that's not the way it actually is. Experience actually consists of a very rapid series of micro-messages from the sense bases, and those are stitched together by the mind to provide the illusion of panoramic awareness. Once that's understood, you can give the real definition of mindfulness: remembering to know what kind of message the mind is currently knowing. This will be like watching attention flicker between knowing information about touching, seeing, hearing, etc. A person is being mindful when they're watching how mind's attention is moving.
- jmalicki 5y agoExercise (mostly I've seen more intense than walking, but cardio like running, cycling, rowing, etc. - I haven't come across much for resistance training like weightlifting) has been very well studied to improve cognitive ability, as well as mental health (depression/anxiety). Depending on what you mean by proven, it's not gravity, but it's pretty good evidence compared to just about anything in medicine (just look at the numerous citations testing various aspects/study designs/different populations). Just a few studies (there are countless): https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3951958/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3951958/ https://pubmed.ncbi.nlm.nih.gov/20065132/ https://pubmed.ncbi.nlm.nih.gov/20065132/ https://pubmed.ncbi.nlm.nih.gov/35153701/ https://pubmed.ncbi.nlm.nih.gov/35153701/ https://ju.se/download/18.4662178a174aa5f82061c573/1601030806750/PeterBlomstrand_artikel.pdf https://ju.se/download/18.4662178a174aa5f82061c573/160103080...
- Breza 5y agoMy work performance has increased tremendously since assembling a treadmill desk. The book In Praise of Walking delves into why it works.
- k__ 5y agoI also read creatine, while used mainly to improve gym perf, helps wirh cognitive ability too.
- staticassertion 5y agoThat's odd. Creatine stores are in muscles. I'm not saying it isn't the case, the body is weird as fuck, but I'd be interested in understanding how that's the case.
- mrcartmeneses 5y agoIt’s because creatine is used by the body to convert sugar into adenosine triphosphate (ATP). ATP is what your body actually uses for energy inside cells for things like contracting muscles and nerve impulses (like in the brain for things such as “thinking”). ATP can’t be made in the brain, instead it is made by muscles. That’s why exercise and higher levels of creatine are good for cognitive performance and memory.
- kaczordon 5y agoDr Huberman from Stanford has a great weekly podcast where he talks about how to improve all parts of your body/mind for various activities(sleep, exercise etc.). Here’s one on improving productivity: https://youtu.be/Ze2pc6NwsHQ https://youtu.be/Ze2pc6NwsHQ One of the tips from the video that I really love is called the cathedral effect. It was found that having high ceilings increases your creative capacity when doing an activity.
- adolph 5y agoCame here to suggest this episode, it is a gem. https://hubermanlab.com/optimizing-workspace-for-productivity-focus-and-creativity/ https://hubermanlab.com/optimizing-workspace-for-productivit...
- vedran 5y agoA few more from Dr. Huberman: ADHD & How Anyone Can Improve Their Focus - https://www.youtube.com/watch?v=hFL6qRIJZ_Y https://www.youtube.com/watch?v=hFL6qRIJZ_Y How to Focus to Change Your Brain - https://www.youtube.com/watch?v=LG53Vxum0as https://www.youtube.com/watch?v=LG53Vxum0as
- Graffur 5y agoI am only 2 mins into the first video but I am hyped - thanks for posting this!
- H8crilA 5y agoI guess it didn't work then, lol. /s
- BatteryMountain 5y agoEnjoy! I recommend you start from the oldest videos and work your way forward. He often mentions to past videos and some his content builds on top of older content. It is time well spent. His demeanor/cadence & carefulness on choice of words is very clear and appreciated. His videos also have bookmarks so it is easy to find things in the future if you want to refer back to something.
- dominotw 5y agoI've tried to listen Huberman so many times but have hard time focusing. He seems to rattle off a list of things without any emotional hooks to keep the user engaged.
- stretchwithme 5y agoHis videos are very long. A lot there but I haven't been able to get through one yet. 2.5 hours is long. Could be 3 or 4 videos.
- pingeroo 5y agoI normally have a hard time watching long "monologue" videos but I feel like Huberman usually does a good job of keeping my attention. He speaks with eloquent intonations and maintains a piercing eye contact with the camera. I admit his videos can be a bit tedious sometimes but I just frame them as "classes", which makes them easier to bear. He could for sure add in some sugar to help the medicine go down, but it would make the already long videos longer.
- hamiltonians 5y agostimulants
- frxx 5y agoSome of the comments here are really nice. I want to add the Endel app with it's soundscapes has helped me concentrating too: https://endel.io/ https://endel.io/
- mike_h 5y agoIn a similar vein, there’s one called brain.fm which I’ve used for years now and it gets me in the zone every time.
- seshagiric 5y agoAnother way to boost concentration is by removing distractions. I use RescueTime to stop myself getting distracted and set focus times. While working I will inadvertently start Google to research something and before I know I am wasting time on news, youtube, twitter and what not. Apps like RescueTime help you avoid such distractions by specifying focus time during which it will block access to distracting websites.
- throwaway6734 5y agoThis is a great music source: https://musicforprogramming.net/latest/ https://musicforprogramming.net/latest/ Start right when you wake up after a coffee and shower. Don't give your brain any time to get interested in anything else. Write high level skeleton code / notes to get the juices flowing
- nnf 5y agoI used to avoid music with lyrics, but (for me anyway) I’ve realized I can concentrate just fine when there are lyrics as long as I’m listening to songs I already know. I usually put on a playlist that’s maybe an hour or two long and just let it repeat all day.
- philipswood 5y agoAction movie and game soundtracks tend to be great for this. I suspect it’s because they needs to have an emotive effect without distracting you from the story.
- timbit42 5y agoSleep.
- GrumpyNl 5y agoFor me its some times music, but mostly comedy channels on low volume, so i have some background noise that filters out surrounding noise.
- fuzzfactor 5y agoI've been having trouble focusing as well as I could for very long at a time, so I'm going to take the whole summer and do something about it. I should be just fine once I've made it through concentration camp . . .
- rr808 5y agoI kinda feel I can code better when mildly sedated - eg late at night, after a beer. If I'm thinking too much I get distracted. If I know I wont get interrupted is much better than not getting interrupted. eg if no one is in the house I can concentrate more than if they're there.
- ZeroGravitas 5y agoI used to end up working in the middle of the night as it combined this feeling of exhaustion and solitude. I can't really do it anymore for multiple reasons, but I try to at least get the solitude or physical tiredness through exercise. I've noticed lately that "not being interrupted" is good, but "knowing deep in your soul that you can't be interupted" is better. I think Cal Newport or someone was where I originally saw this idea spelled out, and it made a lot of sense of routines that I'd adopted subconciously and allowed me to plan them more explicitly. I'm currently looking for a way to automate the pause of all incoming comms until the end of a pomodoro period.
- bsrhng 5y agoLooking for something external, trick, app or whatever, and generally relying on science for concentration is conceptually the wrong approach.
- amznbyebyebye 5y agoCould you please elaborate?
- mdp2021 5y agoI guess the poster may have meant that concentration is a skill you develop - an internal quality - and any seeker should keep in mind that there are no excuses: you have to "actually do it", not e.g. attempt getting it from the outside while internally remaining alien. When you learn acrobatics, you may research about the shoes and haircut etc. that hinder the least and facilitate the most, but it will remain an ability, a skill, not a prosthesis, not an externally enabled state. Moreover, it may have meant that since concentration is also a negative state (to gain concentration avoid its disturbances), you have to declutter, not to add further - to remove elements, not to pose them. Moreover, it may have meant that to learn riding a bicycle, you "do it" (you climb the bike and attempt action), you do not «rely[] on science». The "science" is inside (natural cybernetics, feedback based skill building), not explicit outside.
- endymi0n 5y agoJust joined a Flow Working workshop by Dr. Antoine Larchez and had some interesting results. As a lifelong (functional) procrastinator with diagnosed ADHD, I brought down 2.5h of effortless (once started) work on paper, some of the best in a couple of months if not years. I have yet to see whether the methods are scaleable and replicable for me, but a lot of the content resonated with me, especially the insight that concentration to flow states is a skill that can be learned and brought down from 20 minutes to just one with training. It was an interesting mix of fundamentals from Cal Newport (Deep Work), plus mind emptying exercises, concentration meditation, exercise breaks and group work sessions. I'll probably dig more into it.
- reactspa 5y agoWhat did you do different to get the 2.5 hours of uninterrupted work done?
- endymi0n 5y agoBasically meditated, emptied my mind by writing down any tasks I'm procrastinating or ruminating on, identified the fears behind them, set a goal, did a quick exercise and then just did it in 50 minute chunks, but with the phone completely off, any windows in single focus and most importantly with the camera on and 10 people watching (== not really watching but doing their own tasks). Had a pretty sizeable psychological effect though. I used to do sessions with FocusMate before which worked, but in a bit of a hit & miss. Key differences to this workshop was the length (blocking half a day, uninterrupted) and the guidance through it, taking away brain cycles for managing. Still a bit unsure how to fully replicate that experience on my own, but just experiening that someone was able to trigger this kind of focus in me, on a dreaded task, on demand, had a profound effect in me to go try it again.
- reactspa 5y ago> just experiening that someone was able to trigger this kind of focus in me, on a dreaded task, on demand, had a profound effect in me to go try it again Thanks. You realized what you're capable of.
- ryandvm 5y agoI've tried most of the things in your list. By and large they don't really help with concentration. The most effective thing I've found is 20mg of Adderall. Not thrilled about that, but it is what it is.
- Aachen 5y agoIs what it is... but in my opinion/worldview: if there are bounds to how much concentrated work you can get done per hour/day/week, then you shouldn't need to chemically enhance/alter that. You're free to choose to, but you make it sound like you feel obliged to for work. Even if one can get exactly 2 hours of work per week done, well, some people just have a disability and not all disabilities are obvious or visible. Modern societies should make up the difference. If someone is simply unable to, I'd be happy to pay those extra 5% taxes to make it possible that they have a normal life by doing what they can and no more and no less. I'm not sure if this is the right forum for such opinions as, from a European standard, the US has very little like this, but I guess there's no point only ever preaching to the choir / staying within the bubble. This is just how I see it.
- bodhi_mind 5y agoL-theanine (present in green tea) shows interesting results in alpha wave brain activity: https://apjcn.nhri.org.tw/server/APJCN/17%20Suppl%201/167.pdf https://apjcn.nhri.org.tw/server/APJCN/17%20Suppl%201/167.pd... I think there was a post on hn about l-theanine before.
- inphovore 5y agoI have a very subtle yet bad reaction to L-theanine. I have a noticeably positive response to taking Acytel L-carnitine. One pill at night before bed. Taking half the dosage on an empty stomach gives best results, though makes ones stomach a little queasy.
- shaolinspirit 5y agojack off. after that I'm good at writing code. you can as well use empirical method to proof if this technique works.
- DoctorNick 5y agoMethamphetamines.
- dasil003 5y agoBased on consistently feeling as you describe in your opening sentence for over two decades in many different life stages and concept, let me suggest a reframe: The good news is that "sometimes it's effortless". Consider yourself blessed. For a lot of people that is never true and though they may even achieve some professional success by grinding, it will be joyless and likely not lead to real career satisfaction. Now in terms of optimizing your coding output, don't focus on minmaxing this as if you were an assembly-line manager trying to squeeze out your next ounce of performance. Instead recognize that coding is a creative craft that depends hugely on your state of mind. Focus on finding ways to recognize and harness the energy overall, but recognize you can't force it. This comes in two parts: First, if you are procrastinating diagnose that by practicing self-awareness at all levels. For me it can range from something as simple as eating the wrong lunch all the way up to existential crisis about how I'm living my life, and everything in between. This is obviously non-trivial, but it can be hugely important. A lot of folks mention exercise here—and I agree—but I would broaden it to include ones overall physical and mental health. By addressing those things holistically one establishes the conditions to allow inspiration to strike. Once that is established then you need to recognize and harness the energy when it comes to you. It might be on a schedule, it might not. You might have an understanding boss who gives you carte blanche to organize your own deliverable schedule, or you might need to some stakeholder jiujitsu (up to and including finding a new job) in order to carve out space to make your process work for whoever is putting money in your pocket. The point though, is not to adopt some external productivity narrative (I was brought up with the puritan work ethic) but to instead recognize and optimize for the tao of your own abilities.
- duncancarroll 5y agoMeditation works well for me. I have a cushion next to my desk and whenever I can't focus or don't know what to do next, I sit for ~5-10 min with eyes closed and usually the next best task becomes apparent. I then visualize it clearly and think about the sequence of steps needed to accomplish it. If I don't do that, I usually find myself wasting extra time before I arrive at the next task, or I feel more low-energy / unfocused that I would have otherwise. Regular exercise pairs well with this to keep your baseline energy up.
- mindserfer 5y agoFor me I have noticed that either one hemisphere is ready to create or the other. Example: if my mind is cold for writing. Then drawing is hot. But if sketching is cold, then writing is hot. And yes. Caffine helps everything.
- mindserfer 5y agoNote: often you can work in the same problem either visually or with text.
- jvanderbot 5y agoTheanine and caffeine are a magical pair. https://examine.com/supplements/theanine/ https://examine.com/supplements/theanine/
- axpy906 5y agoMatcha has both of these.
- jvanderbot 5y agoAs does green tea
- PragmaticPulp 5y agoThere are many incremental improvements that can make a small difference, but in my opinion the most important thing is to optimize your environment first and foremost. One of the most effective strategies I've learned isn't necessarily cheap, but it works: Get two computers. One is your work computer. You only work on it. One is your play computer. You only play on it. If you struggle with self-control, use extensions to block or limit your time on sites like HN, Reddit, Twitter, and others on the work computer. For me, physically moving between the two computers helps reinforce the separation. If visiting HN is an alt-tab away, it's easy to drift off when there's a lull in work or I have to wait for a compile. If I have to actually get up and move to waste time, I will put deliberate thought into it and, most of the time, not do it. If you have the space, creating a separate home office that is in a different room from your play computer is golden. That's a lot to ask, obviously. For a more accessible alternative, consider isolating your distracting activities to only your phone. That's what I do most of the time. I only use the phone distractions while I'm walking, which helps wake me up in the process.
- graphpercolator 5y agoTotally agree. I even go with three. One work gave me, one for my own hard mental work and one for everything else. For me, I am just not going to play on my personal work computer after going through the trouble and space to set all this up.
- nicoburns 5y agoStaying hydrated makes a big difference.
- sydthrowaway 5y agoLions Mane mycelium
- terr-dav 5y agoWhile I can't attest to this helping me focus, I can confirm that it does something. I used to take it in the morning and evening. After stopping for a bit and restarting, I noticed I was waking up super tired and having intense dreams. I stopped taking it in the evening and confirmed that other people have had the same experience. FYI I take it in a tincture, and I have not experimented with different brands or preparations.
- sydthrowaway 5y agoLink the tincture brand for posterity
- terr-dav 5y agohttps://hostdefense.com/ https://hostdefense.com/ :)
- lr4444lr 5y agoInteresting that you have both a CNS stimulant and depressant on that list.
- renewiltord 5y ago1. Adderall. 2. Practising interrupting distractions: if you open HN, try to make your first act closing it
- jliptzin 5y agoSee a psychiatrist about a possible ADHD diagnosis and any associated medications that could help.
- btgeekboy 5y agoI’ve gone the caffeine route before, and it works but only until the crash. The heart palpitations aren’t worth it, IMHO. I’ve had a subscription to Brain.fm for a bit over a year now. Supposedly it doesn’t work for everyone but I find the act of picking a 60 minute Deep Focus block, probably just as much as the music itself, really helps me keep my head down.
- marttt 5y agoNot scientifically proven, but I used to listen to and love these free playlists: https://musicforprogramming.net/latest/ https://musicforprogramming.net/latest/
- mensetmanusman 5y agoThis Harvard guy is good: https://youtu.be/691Bd1OelHw https://youtu.be/691Bd1OelHw
- faster 5y agoAnd this Stanford guy is good too. This may not be the best one of his podcasts for addressing the exact goal but it's still relevant. https://hubermanlab.com/optimizing-workspace-for-productivity-focus-and-creativity/ https://hubermanlab.com/optimizing-workspace-for-productivit...
- altgeek 5y agoLots of posts with nootropics mentioned. Just experiment with them on an every other day, or up to a 2 week on-2 week off cycle. Everyone's enzyme kinetics are different, and homeostasis is a thing...
- AussieWog93 5y ago>It’s like climbing a big hill but in my head. Sometimes it’s effortless and sometimes it’s a slog. Is this something that you need to "fix"? Maybe it's your body telling you that you're dedicating too much time/mental resources to work and not enough time to the other aspects of your life. You can't "push through" burnout; only recognise the early warning signs and back off.
- jmcgough 5y agoI've found that reading helps a lot, even if it's difficult to maintain the focus at first it gets better. My brain was so hooked on the dopamine hits of constant online chat, phone notifications etc. Now I wake up and read a book for an hour before starting the day (I turn off phone / laptop and put them in a drawer) - it makes a big difference. I can't find relevant studies, but there's a few scientists who say that reading improves focus: https://www.ncu.edu/blog/reading-improves-memory-concentration-and-stress https://www.ncu.edu/blog/reading-improves-memory-concentrati...
- lurker616 5y agoI've literally improved my concentration at work in the past 2 weeks. Started travelling to a wifi cafe 25mins away by subway. I listen to post-rock music while coming and going on good headphones. The bass and thumping guitar grooves clear my head. The deadline to get out of the house and clear demarcation make it easier to get into the flow zone. I get more work done in 4 hours than I used to get done lounging around my house in 8.
- nomilk 5y agoI have 3 tips: exercise, ice baths, sleep. On Exercise: I did 'exercise' wrong for years. Exercise produces 2 types of pain, 'good pain' (panting, muscle fatigue), and 'bad pain' (injury or achy joints). How much 'good pain' you experience is completely up to you, but it is absolutely essential that you minimise 'bad pain'. Simple reason: it is incredibly distracting when you're trying work! To minimise 'bad pain'; 1. take 3-10 minutes to gently warm up the entire body before working out, 2. take 5-30 minutes to 'warm down' the entire body after working out (this will reduce delayed onset muscle soreness and joint aches). 3. take some protein and water 0-30 minutes after a workout. TL;DR if you are sore from exercise it will distract you, negating some/all of the cognitive benefits of exercise, so be strict about ensuring that doesn't happen. On Ice Baths: One other huge tip, do an ice-bath once per 14 days, at a minimum. You don't have to go super cold: 10, even 15 degrees celsius is fine. How? If you don't have a bath (I don't) search amazon for 'portable bath' (there'll be heaps for under $50), use a $2 kitchen thermometer to take the temperature as you add ice (grocers, bottle shops, any markets will sell large bags of ice - buy 2 or 3). 10 minutes in a cold bath can give you a sense of incredible calm and concentration for the whole day. It also relaxes them muscles. On Sleep: I feel like 'everybody's different' is kinda true here, but learn your body and be very objective about how much your cognition drops when you're tired. If you're making mistakes while working tired, you're creating more work that you or someone else will have to fix. So trading off 1 hour of work for 1 more hour sleep is often extremely economical.
- toomanydoubts 5y agoRitalin, I guess? Not exactly a technique but since you included caffeine.
- terenceng2010 5y agoSome moderate physical exercises do help but I also find that cooking helps me to be more relaxed after a day of coding work. Maybe because it needs a totally differnt kind of focus like chopping and much more (actual)hands-on which mean my coding brain can be shutdown afterwards.
- deutschewelle 5y agounpopular opinion: half a cup of wine. any procrastination is gone!
- AdrianB1 5y agoDoes it really make a difference? I have no problem with the idea, but I never saw an improvement in focus.
- JoeOfTexas 5y ago8 hours of sleep every day. You lose time, but get back double the brain power.
- rthomas6 5y agoNot joking: stop going on the internet. It's scientifically proven to boost concentration. More specifically, do one thing, and only that thing, for a set time period. Do not check your phone, do not even have it in the same room. Do the one thing until time is up.
- qznc 5y agoDo you have a citation for the „scientifically proven“?
- muzani 5y agohttps://scholar.google.com/scholar?hl=en&q=attention+span+internet https://scholar.google.com/scholar?hl=en&q=attention+span+in...
- nine_k 5y agoSince accessing the internet (and sometimes even the Web) is often a part of an IT job, the "one thing" approach is pretty helpful. Keep in mind what are you doing. If you're reviewing a pull request, you only need the Github page, and not the rest of the pages on the WWW. Also, timeboxing things helps. It's hard to work on one thing indefinitely, it can even induce panic. But if you're using something like the pomodoro technique, you know that when you're feeling a craving to switch, you have, say, 27 minutes left until the next break. It's observable and manageable; you can concentrate during this time, knowing that a relief is nearing. But the relief (like going for more tea / coffee / etc) is also timeboxed, so you don't get distracted forever.
- PlaneSploit 5y agoI'd like to strongly second timeboxing here. This is how all really busy people do it in my experience.
- grey_earthling 5y ago> If you're reviewing a pull request, you only need the Github page, and not the rest of the pages on the WWW. In Firefox, you can set browser.tabs.tabMinWidth to a large number in about:config, so that fewer open tabs are visible at once, which may reduce distractions. Or (slightly more complicated) you can keep a fixed number of tabs visible irrespective of window width, by using userChrome.css to apply a style like `tab:not([pinned=true]) {min-width: calc((100vw - 12em) / 3) !important;}`
- ravenstine 5y agoMethylphenidate
- pettycashstash2 5y ago-Definitely sleep, -excercise, -removing distractions ie a clean room. - Caffeine. - optimized by vitamins b6 b12 magnesium and c . Have Tested levels prior to correct dosage vitamin intake - being relaxed / ie having a weekend of doing nothing - good nutrition ie not McDonald’s - Red Bull but only in extreme situations and very seldom - good sex -avoid alcohol and anything similar such as cigarettes etc
- seanppaul 5y agoCold showers in the morning!! Unsure if it's scientifically proven. But there is abundance of literature if you Google for it. I've seen the results in myself. From being a very passive in meetings, drowsy, and almost ADHD like behavior to being able to hold my focus and concentration till end of business and past. Key is doing it in the morning, evenings didn't work well.
- WalterBright 5y agoUnplug your ethernet cable.
- tkgally 5y agoI’m not sure if it makes sense to try to find a “scientifically proven” technique if all you want is something that works for you. What works for a large group of people in a controlled scientific study does not necessarily work for each individual in that study, let alone for you. You could do a scientific study on yourself, though. Figure out some objective way to measure your own concentration, and then try various interventions one at a time to see which intervention correlates with the best concentration. You could also try combinations of interventions—having a beer while taking a shower?—to see if you can get an even stronger effect. I’ve never done such an experiment on myself, as planning and implementing the experiment would distract me so much that I wouldn’t be able to concentrate. So I just exercise for a while every morning. That seems to work—for me.
- k__ 5y agoI think, what most people want is a pill that makes them less distractable. Ritalin is that pill. I know a bunch of devs that take it to code through the whole night. But...! 1. It usually requires a prescription. 2. While it lets you hyper-focus on one task for hours, if you not careful that task could be rearranging your cutlery.
- WalterBright 5y ago> Music. which type depends on the individual. I listen to music all day. But when I really need to concentrate, the music has to go off.
- otikik 5y agoI only have that problem with new music. Music I know by heart melds with and attenuates the background.
- _Nat_ 5y agoLet yourself work. --- By analogy, say you're a manager at a scientific-lab. You're already behind on deadlines for publishing papers; you're getting flack for it. You need the folks in lab-coats to write those papers, but they keep procrastinating... no matter what you freakin' do, no matter how many times you physically drag them to the computer to type their papers, every time you walk away for 10 minutes and come back, the scientists are back at their labs doing experiments and whatnot. How do you get them to stop it with the distractions and do their work? As crazy as it may sound, maybe you should let the scientists do their experiments. Because, maybe, those experiments are somehow more conducive to writing papers than typing the papers is. And it is weird, right? I mean, if you want papers, you type them! Obviously, right?! Everything else is just a distraction.. and maybe that's okay when you're not behind-schedule, but right now they should really be writing instead of experimenting. --- You're a scientist in a lab. You're trying to do your work, but your manager's freaking out about missed publication deadlines. Every time you're trying to get some data to write about, they keep demanding that you just get to writing! They don't understand. You try to tell them that you need to do other things before writing, and they ask why: you explain how the significant of the quadrangle isn't 7-epsilon beta invariant boson electric guitar, but they act like you're saying gibberish. Stressed, they impress upon you the fact that they need you to write stuff up and quit it with the distractions. What do you do? Your manager, frustrated, asks other managers what to do to make you work. The other managers suggest that your manager go exercise, have a beer, or take a vacation. Your manager doesn't see exactly how those things might help, but they try it. ...conveniently, they're not bugging you anymore and now you can work! --- Point: You're not doing all of the work. Much of it's being done by, e.g., subconscious parts of your brain. And sometimes there's more to it than you might consciously experience. If you want to be a good manager, there's some learning how to help the rest of yourself work. And perhaps even to realize that you might not even know how to do your own work.. sometimes you're leaning on other intelligences, even if they're within your own brain, and sometimes the work you'd want them to do might be more involved than you may appreciate. So don't Ctrl+Alt+Del the OS-updates, disk-defrags, virus-scans, garbage-collector, backup-transfers, etc. -- at least, not as a standard practice. But also try to avoid stressing the same already-stressed processes while you're waiting; don't have the scientists fix the fax-machine, nor start moving a lot of big files around while the drive's defragging. And if it helps, imagine that your brain is a country, and you're a non-authoritarian top-level executive (like a US president). Sometimes raising/lowering all taxes might help a bit, but those are rather blunt, unrefined tools to address some specific performance-concern. Instead, if you want to be an effective-leader -- whether if it's of a country or of your own mind -- you've got to grow your awareness of what's going on inside and apply more nuanced tactics to help things along. Because even when it's "you", it's not all just the conscious-you doing the work -- you're more akin to a manager than a laborer, if you're an executive of your own mind. --- Bonus analogy: You've bought a self-driving car from, say, Tesla. You told it to be nearby, so that it can pick you up when your meeting finishes. However, it's now late. Should you, say, take remote-control of it and hit the gas? Because, surely, it should just drive to you -- and if it's not doing that itself, then it's buggy and you should hit the gas. Not like it could be delayed due to something beyond your awareness, like it being stuck in traffic, and what's the harm in hitting the gas when it's going too slow? --- In short, sometimes working means doing things that might not seem like work to your conscious-mind, or at least letting your brain do those things while you support it, like a good manager supports their employees. Generally speaking, the more advanced/involved a process is, the more non-deterministic the run-time will tend to be. Constant-time operation might be more plausible for the simplest tasks, and a manager might more reasonably try to get employees to keep doing their job when it's a simple task, like pulling a lever in a factory. But just like complex distributed optimizations can be far more variable (and even unpredictable) in their run-times compared to, say, adding two primitive-integers, more complex creative/involved work can be more non-deterministic in its run-times.
- thadk 5y agoOn a mostly-plant and a few fish diet: I supplement zinc on an empty stomach, and 750mg EPA+(a little DHA) Omega 3 oil early in the day and find both aid focus, the second more directly. https://news.ycombinator.com/item?id=24696601 https://news.ycombinator.com/item?id=24696601 https://www.healthline.com/nutrition/7-supplements-for-vegans#3.-Long-chain-omega-3s https://www.healthline.com/nutrition/7-supplements-for-vegan...
- rob_c 5y agoB12, and pretty much most of the additives in energy drinks designed to help push energy into concentration... Maybe a good handful of nutropics, but most are anecdotal or don't work for everyone. Good vitamin regime ie D if you don't get enough sun, C if you don't get enough fruit and veg and so on ...
- dzink 5y agoA couple of things to add to your list: Go to bed early - 9-10pm and wake up when your body feels like it for a change. If it’s 4-5 am, you get more hours of dark and focus time and your brain is at peak executive thinking, so you can see the bigger picture and write much wiser code. Fasting for a bit may keep your focus as well for a while. If you wake up and are distracted from hunger, drink a cup of plain while milk or plain yogurt. The protein and fat will be an instant boost to your brain and you will stay focused until you get hungry again. If you keep to meat, dairy, or sugar-free protein and fat you kan keep your focus all day. Carbs will crash you. When you feel tired or unfocused, or ready to go to social media, take a nap instead. You can eat some carbs now as they can help you fall asleep faster. When you wake, apply the same principles. I had to work for my own startup for a while and a squeezed a whole bunch of top quality code out of my brain. Without enough sleep or quality fatty protein, the brain gets distracted more easily or operates only at lower levels of abstraction.
- arnejenssen 5y agoYes. Fasting can get you into ketosis, which can enhance focus. Avoiding carbs and sugar prevents insulin spikes and that prevents "brain-fog"
- mannykannot 5y agoI can only speak for myself, but the only thing that boosts my concentration is to buckle down and concentrate - which rules out most of the above. It usually takes a couple of hours before the effect is noticeable. (I'm not claiming to be good at it, but I have learned what works for me.) The other thing is to notice when I am no longer able to concentrate any more, as it is no longer productive to keep going. When that happens, any of the above might be helpful, but that list is missing the most important one: get enough sleep. Your list is mostly of solitary (or not explicitly social) activities, but socializing is also helpful for me.
- jseliger 5y agoModafinil: https://www.gwern.net/Modafinil https://www.gwern.net/Modafinil
- pingeroo 5y agoI think Sam Altman had the same answer to this question lol
- meken 5y agoI don’t believe it’s scientifically validated, and I don’t have a direct link off hand, but check out Trataka, which is staring at a fixed object for a set amount of time (e.g. a candle or an image with a dot). HealthyGamerGG YouTube channel has videos on it. Apparently the yogis have been doing it for 1000s of years.
- ultrasounder 5y agoNetra Trataka to be specific(Netra- Eyes). My dad has been practicing yoga for the last 30 odd years(he is 75 this year) survived a near fatal Heart attack(occlusion) but doing well now with the help of couple of stents and Yoga!. This stuff works. For the real.
- efficax 5y agoAmphetamines
- 29athrowaway 5y ago- Sleep - Breathing - Cardio
- nso95 5y agoGive "The Now Habit" a read
- fjabre 5y agoMagnesium citrate before bedtime. It will improve your sleep quality tremendously which will then improve your concentration naturally. A rested mind has an easier time getting into the zone. Buddhism and Zen can also help. No need to become a master, simply understanding and applying some of the basic concepts can help mind state significantly. This can also boost concentration by quieting the mind. Also check out: TMS Therapy or Transcranial Magnetic Stimulation. It is brain stimulation technology. Very interesting and lots of research behind it on pubmed.
- crucialfelix 5y agoI've been taking L-Tyrosine, CDP Choline and sometimes Aniracetam. My mood is sunny and remakeably sustained for the entire day. I'm even a bit too concentrated, working too long and hard.
- grahamplace 5y agoI’ve found that sometimes I need some accountability / social element to help me actually accomplish work. It’s also related to point (5) about going somewhere else, or as Cal Newport puts it, doing a “grand gesture” to signal to yourself that you value getting the thing done, and now you’ve incurred some cost to set yourself up, you better do it. To help achieve this effect while working remotely, I’ve used https://www.flow.club/ https://www.flow.club/ and recommend it It helps you: (1) actually block time off in your calendar to do focused work (2) set your intention for that chunk of time (3) create an accountability mechanism by telling the people in your session your goals (4) creates cognitive dissonance if you let yourself get distracted (since you told people what you would be doing, and have to tell them at the end of the session what progress you made)
- mesaframe 5y agoMeditation
- eru 5y agoI'm not sure about any thing to really improve your concentration, but you could start by identifying things that are undeniably bad for your concentration and removing them?
- syntheweave 5y agoBreathe deep, and in clean air. Simple advice but easy to miss, lots of buildings get a bit polluted.
- nprateem 5y agoJFDI
- gyulai 5y agoVideo game music is actually designed to increase your ability to concentrate on the game. I highly recommend listening to some as you're coding. You can get it at Bandcamp [1,2]. Trance music also works, especially Goa Trance. Binaural beats [3,4] are also worth a try. [1] https://bandcamp.com/tag/video-game https://bandcamp.com/tag/video-game [2] https://bandcamp.com/tag/video-game-music https://bandcamp.com/tag/video-game-music [3] https://en.wikipedia.org/wiki/Beat_(acoustics)#Binaural_beats https://en.wikipedia.org/wiki/Beat_(acoustics)#Binaural_beat... [4] http://gnaural.sourceforge.net/ http://gnaural.sourceforge.net/
- nabusman 5y agoCouldn't agree more, Goa trance/Goa psych is great for this. I usually throw on digitally imported [1] for listening and discovering new genres. My recent favorite is psydub and melodic house. [1] https://di.fm https://di.fm
- mlitwiniuk 5y agoAnd I thought I’m the only freak to listen to goa/psy trance while coding - I’m most likely to get in the flow while listening to it.
- csomar 5y agoThat might make some sense. I've been running Cyberpunk 2077 playlist when starting coding sessions. Kind of get me in the mood to start fighting. It might have helped that these audio clips have been mentally linked to real-life fighting. (in the game, of course).
- amiga1200 5y agoThere’s something to this. I’ve noticed an increase in heart rate, possibly a sympathetic reaction with the effect of pumping more blood to the brain? In any case it is not long before beat fatigue sets in and my mind is worse off.
- nabusman 5y ago
- seer 5y agoFast. Like more than 48 hours water only. First of all it kinda puts you in this “survival” state where while not feeling hungry per say, you’re on high alert and can concentrate like crazy. And after you finish you feel rejuvenated and excited. Amazing experience and can’t recommend it enough. Done it several times already (4 days fasts) and still having the same initial effect. After listening through all of the science in Lifespan (the book and the podcast) have started the “only eat in the evening” routine. Like I skip breakfast and lunch. Still in my first week so its kinda hard, but after another week or two my glucose levels are supposed to stabilize and I would not be feeling the pangs of hunger and highs and lows of sugar spikes after a meal and brain fog after the insulin response has sucked all of the sugar from my blood (and brain). Its that what I’m really after - steady brain performance throughout the whole day. Will see if I adapt and that actually happens!
- winrid 5y agoThis is what I do too! I do only dinner two days a week, no other meals on those days. Must work, I built fastcomments this way :) Also naps! 20min naps are a nice reset to fix concentration issues. I wrap my head in a blanket so I fall asleep fast and set a timer.
- maartenpi_ 5y agoI have done intermittent fasting, but I lose too much weight while doing so. I really liked the benefits. Especially fasted cardio feels so good. I'm already fairly slim (1.90m and <80kg) and become a complete stick man after doing this. Anybody know how to do this and how to stay in shape at the same time.
- sva_ 5y ago> Especially fasted cardio feels so good. I noticed this too, if you mean the after effect. It almost got me a little worried though, since the good feeling is probably caused by a release of endorphins, which should usually get released as a response to pain. But I'm not sure.
- ivanche 5y ago
- deepsun 5y agoElectric stimulation is clinically proven to improve cognition. Like literally put clapms on your ears. Caution: adverse effects.
- winrid 5y agoYou can try to game your mind. Set a timer and say, I'll do this in 20 minutes. It works well for me. Also having people code on a second monitor is somehow inspiring, like Andreas Kling :) Discipline/schedule helps! But don't let the schedule prevent you from taking advantage of when you're feeling creative. I also posted advice elsewhere in this thread.
- mdp2021 5y agoSince you (OP) mention knowing "two states" which («sometimes») present themselves kind of "randomly", have you tried logging when you are fit and less fit («effortless and [...] slog»), and attempt logging potential external factors - sleep (time, quality, duration etc.), nutrition (dishes, hydration, sugar etc.), internal states (emotional, mental concern, generic feedback etc.), etc. - and see what seem to be more and less correlated? You may realize what is facilitating you and what is hindering you - that you may work better after a good night sleep, or by having disposed of some class of preoccupations etc. You should probably just keep yourself in an optimal working state, as the general rule. (And work in a fitting environment.)
- DavideNL 5y agoThe "Pomodoro Technique" perhaps? Don't know if it’s scientifically proven to be effective... > A goal of the technique is to reduce the effect of internal and external interruptions on focus and flow. https://en.wikipedia.org/wiki/Pomodoro_Technique https://en.wikipedia.org/wiki/Pomodoro_Technique
- andbberger 5y agovyvanse
- anonyfox 5y agoIn my experience, the first step is to get the physical basics right (sleep, exercise, nutrition/hydration). This is already hard for most people, but can bring you to 100% of your theoretical mental performance as the baseline. To go beyond that, a daily routine of 2x20min meditation is somewhat proven to increase your mental capabilities slowly over time. Also background Music (like Trance or game soundtracks) have some instant effect, I personally have great results with Endel.io - highly recommend!
- staticassertion 5y agoI wake up in the morning and play video games online for about 15 minutes. It wakes me up, it engages me, forces me to focus. I've been able to cut back all caffeine in the morning, only having some later in the day.
- deathtrader666 5y agoAny specific games? Genres?
- staticassertion 5y agoSomething competitive. I play Star Wars Battlefront 2. It's a pretty casual game but it's competitive so you have to focus up and try if you want to win.
- mlitwiniuk 5y agoHowever stupid that may sound, using corded headphones helps me a lot.
- philipswood 5y agoYeah, big ones. And the right music. Effectively put you in another room. Later the separation becomes a learned response.
- Paul_S 5y agoSerious, not trying to be a smartass: uninstall everything except phone app and email from your smartphone.
- jraby3 5y agoI’m a morning person. Taking a mid day nap gives me two mornings - which for me means much more focus and concentration. I know OP asked for scientifically proven data, but I think for a question like this we are all different and learning about yourself and your body counts just as much as science.
- thesz 5y agoL-theanine: https://www.sciencedirect.com/science/article/pii/S1756464611000351 https://www.sciencedirect.com/science/article/pii/S175646461...
- pojzon 5y agoSleep well, exercise and have a good diet. Try to decrease inflamation in the body if you have any. Ps. I know its easier said than done and requires quite a bit pf self-discipline.
- amriksohata 5y agoHindu sages used Brahmi, Saffron and Rosemary. There is a whole school of thought on it called Ayurveda in Hinduism.
- Scarblac 5y agoI believe it's something that needs to be trained, where it helps that you are feeling well physically, and also that there are some things that are actually detrimental to concentration ability because you train the opposite. Spend time focused, build more of that ability. Spend time clicking from news headline to news headline while receiving notifications of everything under the sun, build more of that. All the things people list either make you physically better (like exercise and good sleep), make you focus, or make you do without the constant distractions for a while.
- Szpadel 5y agoFor me, reading chapter of sci Fi book, currently Expanse, gives me nice vibe to concentrate on coding
- Glench 5y agoMy meditation teacher used to run peak performance courses for executives, judges, and others, and the main thing he taught was concentration meditation. If you sit still for a moment and try to concentrate on something either internal (the sensation of your breath, the tip of your finger) or something external (something in your visual field, a sound) you'll notice you get lost in thoughts almost immediately. There is a strong habit of wandering in your mind. But you can train the opposite habit through meditation. Most people can't concentrate for more than a few seconds before getting uprooted by their wandering minds. In the Tibetan Buddhist tradition they compare the mind to a stampeding elephant pulling you around wildly in every direction. You can imagine what is possible with being able to concentrate as long as you want on whatever you want. In concentration meditation, you keep bringing the mind back to the object of concentration whenever you notice your mind wandering. You also focus more deeply on the object, getting more absorbed in its details while avoiding dullness. Doing this even 5 minutes a day for a week should pretty noticeably start changing your experience.
- barelysapient 5y agoA couple of years ago my first child was born. I agreed with my wife to watch him first thing in morning while she worked out at the gym. That hour always teed me up to be very productive afterwords. During that hour my mind drifted to the code it wanted to write. I’d begin to think about the classes and methods I wanted to make progress on. Now when I’m blocked I take an hour, play with my kids and after find myself very productive.
- ruffrey 5y agoFasting
- AdrianB1 5y agoExercise. After Covid I had a long period of time with low focus; I slowly recovered spending on average more than 30 minutes per day cycling (quite intense) for about 6 months. Walking may also help, I think in my case the combination of disconnecting + exercise made a difference. During cycling I was never thinking about work. In the winter I do pushups and lift weights, it is something I can do at home, it is also exercise and time off. It takes less than 30 minutes per day in total, in several rounds over 3-4 hours; my coffee break is now a pushups break. I also noticed that I can write good code only 3-4 hours a day at most and not every single day. Luckily for me, I am not a developer, but the highest concentration and productivity can be achieved and maintained for relatively short periods of time, not 8x5. Alcohol does not work well. It helps disconnect, but constant alcohol intake leads to even more alcohol and health problems.
- bg117 5y agoMeditation
- kimoz 5y agoI don't know if it is scientifically proven or not. It just works for me. I just use the pomodoro technique while listening to only this music every time I want to concentrate to get something done. https://www.youtube.com/watch?v=WPni755-Krg&t=75s https://www.youtube.com/watch?v=WPni755-Krg&t=75s
- BatteryMountain 5y agoI'm currently on Etifoxine. I've noticed when combined with caffeine & magnesium supplements in the morning, it gives me a super calm laser focus for about 6 hours; no fog or sleepiness.
- jason_mac01 5y agohttps://xkcd.com/323/ https://xkcd.com/323/ - see: Ballmer Peak