There are three types of things which you should do in parallel:

1) Make your mind sharper

2) Make your tasks clearer

3) Make your distractions more distant.

--------------
1. Sharpening your mind

Your mind is a part of your body, so you need to take care of your body.

A) Have good sleep hygiene. I need 8.5 hours of sleep a night to be at my best. Figure out what that number is for you and follow through on it. An extra hour of wakefulness is a waste of time if it makes you 40% as effective the next day. Make sure your mattress doesn't suck. If it does, definitely spend the $200 for a new one[1]. Play white noise[2] on your phone and put your phone away from you as you sleep so you aren't tempted by it at night. Spend $10 on a good sleeping mask [3]. Go to sleep and get up at the same times every day, even on weekends.

B) Eat good food with a high protein content. The very cheapest way to do this is something like soylent[4] and a blender bottle[5]. Somewhat better than that is using paprika[6] to plan meals and cook food with a timered slow cooker[7], but keep in mind that setting up an efficient kitchen takes time. Another method is to prep all your meals on Sunday[8]

C) Excercise and meditate regularly. A 20-minute intense run is really great for keeping yourself sharp. Not only that, but when you feel like your head is full of cotton, this is a good way to clear your mind.

----------------- 2) Make your tasks more clear.

If your tasks or goals lack clarity, then it is that much harder to figure out what your next step is, so your brain will seek stimulation and micro-accomplishment where it can. This is a more complicated topic because it depends on your company culture. The Five Dysfunctions of a Team is a good read on this topic.

Frequent communication is important. Daily standups are good. Pairing is great, particularly as you are starting out and you are at the keyboard so that someone's knowledge flows through you.

With programming, one of the most important things you can do is use Test Driven Development. It leads you to break down tasks and give yourself a clear next task: make the failing test pass.

If you are asked to work with an API and the documentation is in a foreign language, insist that the company hires professional translation.

If you join a company and can't find out whom you report to, start looking for a new job.

----------- 3) Make distractions more distant.

Replace the "frequently visited pages" new tab screen with a calming natural image[9].

Block yourself from visiting distracting pages using Freedom, which lets you make different sets of urls to block and lets you schedule them to come on automatically[10].

[1] http://www.ikea.com/gb/en/catalog/products/90283797/

[2] https://itunes.apple.com/gb/app/rainy-mood-rain-sounds-for/i... https://play.google.com/store/apps/details?id=com.TailoredMu...

[3] http://www.bedbathandbeyond.com/store/product/bucky-reg-40-b...

[4] https://www.soylent.com/product/powder/

[5] https://www.youtube.com/watch?v=G5PTTH0ftsY

[6] https://paprikaapp.com/

[7] http://thesweethome.com/reviews/best-slow-cooker/

[8] https://www.reddit.com/r/MealPrepSunday/

[9] https://chrome.google.com/webstore/detail/momentum/laookkfkn...

[10] https://freedom.refersion.com/c/dbe7b2