Some things that works well for _me_:
1) Good noise-cancelling headphones. I'm extremely sensitive to noise in the office.
2) Repetitive, monotone music. My productivity rises by 2-5x if I listen to hours and hours of repetitive techno sets. It's like I'm micro-dosing on LSD or something and the code is just flying out of my fingers.
3) Not getting disturbed when the headphones are on. Communicate with your team that headphones on = use Slack for communication, because you are in The Flow State
4) https://selfcontrolapp.com/ to help prevent procrastination
5) Martial Arts with sparring. Could be anything like MMA, BJJ, Muay Thai, kick boxing, boxing, wrestling, some types of Karate etc. Helped me a lot. Not only the obvious (getting ripped/in shape, confidence boost, positive effects on the brain from exercising) and blowing off some excess ADHD energy, but as an introverted nerd you learn how to keep stable eye contact and you stop being irrationally afraid of conflicts. It has made me much calmer as a person, and I don't have any burst of rage anymore. Cannot stress enough how much this has helped my career and at softening the symptoms of both ADHD and Asperger's.
6) Healthy sleeping patterns & diet. Without this, I can fall asleep in meetings (and have done it numerous times).
7) If you work at a company where you have the ability to skip meetings you deem are unnecessary - use it! The less bored you are, the more likely you are to be able to focus and not procrastinate, I think.
8) I like getting out of the office during lunch, just to get some air/sunlight/short change of environment. Feels like I'm less bored when I get back to my desk.
9) If I'm taking on a bit too big of a task, I try to break it down into subtasks because otherwise I get bored and start to procrastinate. I need very clearly defined units of work to work efficiently.
Learn HTML5 canvas. Learn SVG. Learn to make components in whatever framework you're on and get really good at it. Get into webgl. Make yourself the special projects guy. Go deep where others won't.
Hyperfocus is your super power; research it, figure out what puts you in hyperfocus, and what keeps you there. Listed above are some of the things that do it for me (that exist in the overlap between your job and mine).
As others have recommended, repetitive music helps. The prodigy, Infected Mushroom, cowgirl, combichrist, etc are all on my work playlists.
I found keto really helped a lot for me to get sustained focus, YMMV.
If you do get flow, ride it.
I would experiment with plenty of exercise during the work week to try to find a mellow yet energetic state.
I would look for ways to do something you find fascinating as a way to engage with the work. As an example, experiments with debuggers can give you a different way to engage with code.
Don't be afraid to go back and forth between more and less code centric jobs. You may have a significant advantage context switching for presales engineering and roles that deal with more unexpected runtime problems, etc.
2. Allow yourself to work in different locations, don't get married to a single desk
3. Spend the last hour of every day wrapping up your work and documenting a personal list for tomorrow
4. Do not allow yourself to stay late just because a problem isn't solved. It's better to learn to wrap a project up, than solve it. ADHD can a habit of taking every evening from you when on a focus high
4. Pick up a course online that is relevant to work and follow it
5. I found my ability to focus significantly better with single technology tickets. I would encourage changing technologies and projects often, but the fewer technologies supporting any individual ticket the easier this has been on my brain.
6. Take a walk after every meal
7. You can find difficulty in different tasks. Becoming very good at ticket triage and documenting process is valuable and a lot of developers are bad at it.
8. Using a time tracker can be helpful, assuming it is low enough profile. I use hamster with its accompanying gnome plugin. Unfortunately I have never seen an offline solution as simple as this
Also YSK that ADHD presentation is near identical to sleep apnea and mild autism spectrum. Even if you get a ADHD diagnosis remain skeptical and have the other two checked out with a sleep study and a autism specialist.
1. Went for decades without knowing..not fun. 2. Structure, Structure, Structure will bring back huge focus spans to the point where you wake up from deep sleep and write code solutions...the first time it happens you will be shocked! 3. If not meds of if even meds make sure to re-adjust to more healthy diet...ie high tyrosine foods as tyrosine is what is the building block to dopamine which well lack . ANd actually lower doses of caffeine combined with high vitamin b works out better. Not sure why yet. 4. Exercise daily..no not 5 minutes a good healthy hour or so...I do sit-ups, small weights and jogging. 5. Be aware of your addictions and limit them
Oh yeah, the benefits...would you believe it makes you a better UI designer as you know what structures to get a user to focus on doing something? At least for me it did and I even did a deep dive in cognitive science research because of it.
Side note: Its genetic, my mom has it and my youngest sister has it as does my nephew
I know this is more of a warning of what NOT to do that’s not really answering your question but take it from me, once you are no longer a 20-something things catch up with you big time.
Your goal should be getting into a ‘flow’ state. Like many commenters before me, headphones, spotify and in a place without distractions. Start by reading a piece of code, go through it step by step until it makes sense. Keep doing this until you’re ready to work. Now you want to define a task, continue working until you lose your ‘flow’ state. Take a break, stand up and stretch. Now go back your work station and repeat that process. After 3 weeks of building this muscle you should see significant results.
Best of luck.
I find that music keeps the distractible parts of my mind sufficiently busy for me to deeply concentrate on a single task. I am hopeless without headphones.
I continuously twitch my one leg, a coping mechanism I picked up when I was very young.
Finding a new job that stimulates you might help, or carving out a piece of freshness (invent/identify a problem and solve it) in your existing job - that will force you to learn the codebase as you improve it for your pet project.
Some tips:
1) Structure your environment to enable sustained attention. Be aggressive about turning off push notifications, unsubscribing from e-mail lists, leaving Slack channels that aren't relevant to your work, not accumulating a lot of browser tabs, and sitting somewhere out of reach of distractions.
2) Balance attention with activity breaks. Pomodoro timer apps are great for this. Start with 10 minute work intervals if you have to, but build discipline around respecting the timer. Stretch the work interval to 15 minutes once you've mastered 10. Then push to 20, 25, and 30 as you build up your focus. Treat it like going to the gym to get fit. Don't beat yourself up if you have to reduce your work intervals on tough weeks.
3) Be deliberate about time waster websites. Reddit, Twitter, Facebook, Instagram, and HN are okay in moderation, but you have to realize that each time you check these websites impulsively, you're worsening your focus abilities. They can't be your automatic mental escape when focus feels difficult. In the fitness analogy, these are like junk food. Okay as an occasional snack, but they'll take a toll if they make up too much of your screen time. Set aside time before work, at lunch, and after work for checking up on social media. Block them on your work computer.
4) Physical exercise. It's cliche, but it works. It doesn't have to be difficult. Taking a 10 minute walk around the building 2 or 3 times a day does wonders for organizing your thoughts and getting away from screens for a while.
5) Find supportive ADHD resources, avoid reinforcing resources. It's easy to find "woe is me" ADHD communities on Reddit and social media where people vent about their ADHD problems. Venting and empathizing with others feels good, but it reinforces all of the wrong behaviors. You need to focus your energy on resources that help you improve. Good resources include working with a therapist (check your company's insurance, probably cheaper than you think) and spending time around people who have high organizational skills.
6) Be accountable to other people. With ADHD, it's tempting to hide your progress and blend into the background. Avoid that temptation. Send weekly updates to your manager about your progress, without fail. Knowing that you need to show your progress every Friday provides some healthy pressure to focus and perform. Going back to the fitness analogy, consider this like being accountable to a gym partner. Accountability is good for you.
7) Eat healthier. This doesn't have to be difficult or expensive. Buy a bag of baby carrots and snack on that at your desk. Drink water, eliminate soda. Minimize sugars. It feels cliche, but it really does help.
8) Build your identity around being a software developer. Don't accidentally build an identity around being an ADHD person. Don't let your issues define you. The diagnosis is only helpful as a way to help you improve yourself. Don't let it become a crutch or an excuse for underperformance.
Close mail + slack; open it at lunch break (ymmv depending on what kind of office you work at)
Prepare a list of things you'll do and stick to it - oh, this change could benefit from this change and this one here. NO! Do what is required in the task. If you're going to clean the code up do it afterwards