I have a difficult time trying to learn how to program from straight text-books. Video training seems to work well for me in my past experiences with PHP. I am trying my hardest to stay focussed and push through. Specifically I am looking to start indie game development.

Over the last two weeks I have been trying to pick the "right" language and framework to develop with. I started going through Python, but I am not really enjoying the language so far. I am constantly looking through this website to compare this language to that, and keep getting distracted.

Aside from all of this, is it possible to become a programmer when you have trouble focussing? Has anyone been through this that can recommend some advice?

  • @aasc, the two aren't mutually exclusive. Many people have difficulty concentrating. Out of them, some are diagnosed with ADHD. – Tim Post Dec 1 '10 at 11:45
  • 1
    @Tim? "just trouble staying focused" implies the exclusivity. "just" make it exclusive. You can have trouble staying focused but not ADHD or you can have ADHD and certainly trouble staying focused. – aasc Dec 11 '10 at 16:28
  • @aasc, I argue with certainly, many people with ADHD have adapted to their environment and ensured that they remain focused. At no point did I say "just", perhaps you are confusing a comment meant to guide the OP with the original post? Focus and ADHD are not mutually exclusive, moreover a lack of focus is not always indicative of ADHD, more often than not, it's a sign of someone who is terminally bored. There is a substantial difference between the two. – Tim Post Dec 11 '10 at 17:50
  • @aasc, I have spent a considerable amount of time working on simulated rad hard boards. I could probably go to work for NASA, or perhaps Space-X. I wouldn't dare, because I know my mind will wander no matter what and tasks that should take weeks now take months and I'd get fired. That is the curse of ADHD. However, hypervisors are simple and I get to use dynamic memory allocation, hence I get a good performance rating at my current gig. – Tim Post Dec 11 '10 at 17:57
  • 1
    @Newtopian - Actually, the jury is still out on coffee. It has a lot of antioxidants in it, much like berries, so there are actually a lot of positive health effects from drinking coffee. The problems come, like with just about anything, when coffee is not used in moderation. 2 cups a day is fine...10 cups, not so much. – Morgan Herlocker Jun 17 '11 at 13:20

10 Answers 10


Commit to a language and framework. Once you have made that commitment, forsake all others. Be faithful to that one language and framework, at least for awhile. Then...

Pick one thing to code, and work on that. Focus on coding that only. Get it done, quickly. Then work on the next thing. If you find yourself getting bogged down in a task, break it down into smaller pieces and work on each one individually.

If you can control your focus, you will find that you have better productivity than your non-ADHD peers. That is the great paradox of ADHD; once you are focused, you are hyper-focused.

Do things quickly; stay in that zone. But concentrate on one thing at a time. That is the secret.

  • 1
    The Illuminatus! trilogy has a character that says "Never whistle while you're <make-pg>urinating</make-pg>". One thing at a time. – Frank Shearar Oct 30 '10 at 19:58
  • Thanks, not working with code has been a big problem for me I think. – Jonathan Musso Oct 31 '10 at 15:32

I was diagnosed (at around age 9) with ADD. That was 26 years ago and "ADHD" seems to be the more prominent diagnosis these days.

You've probably found two things to be quite true:

  • It is very difficult for you to become engrossed in something that you don't find stimulating

  • It is very difficult for you to disengage from something that you DO find stimulating

Modern medicine wants us to take all kinds of stimulants (It's amazing what any hydrochloride will do to boost attention span), but I discontinued Ritalin (and others) within a year of starting them. The side effects on my mood, sleep cycle and the few social skills that I had was just too much to deal with.

This means, your criteria should be "What grabs me?" vs "What does everyone else think the right tool would be?".

Additionally, I think you might be ignoring some low hanging and language agnostic fruit. Have you come up with an idea for a game? Have you thought of how (in meta terms) the mechanics of it might be implemented? From my own experience, I find it much easier to conduct research when the criteria is quite narrow. Finding the solution to a specific problem is much easier than tackling a question that almost always entails answers that start with "that depends".

I also agree with others. Stay off this site for a while. What you are doing now is trying to convince yourself that you are working to a solution by soliciting advice. You are basically trying to study in an amusement park; that isn't going to work.

Incidentally, have you looked at C or C++ with Lua?


I was diagnosed very late with ADHD. As such I wondered all my life why it was so hard to concentrate and why I failed so often to deliver a project till the end.

One of the best thing that ever happened to me was to firstly know what my problem was, and secondly gain access to medication that helps alleviate the symptoms.

I use the medication and cannot work without it. It is not a panacea and I have to fight every day to shed the bad habits the condition distilled in me but slowly I get by and it becomes easier and easier to deliver. I have not failed once since I started medication and promised I would not ever again.

My best ally, besides the medication, is routine. here are some pointers that have helped me, I hope you find them helpful as well.

  • Regulate sleeping habits, lack of sleep can completely counter the effect of the medication.
  • Regulate eating habits. Make your meals a regular thing in your day. Hunger also will cancel the benefits of meds.
  • TAKE YOUR MEDS this is the single thing that still allows me to not only keep a job but be good at it. There are many alternatives, plain Ritalin can make it difficult to get a good balance as you go from peak do down many times a day. I found each pill only gave me a 30 minutes window of real productive attention and then degraded over the next 4 hours. I switched to long lasting pills, single daily dose, I found the side effects to be much more bearable and gave me a good 4-6 hours of productive attention. If the one you have does not fit you, talk to your doctor, he will have alternatives. I have tried alternatives but nothing really equates to the real thing.
  • Take control over your body and of your experiences. you are the one stuck with a miss wired brain (or whatever the root cause of it). It is ultimately your responsibility to do what needs to be done. If you feel your doctor is not proactive enough most likely you are not pushing him enough. Take notes, when is it more difficult. When is it easier, when you took medicine, how much you slept, when and what you had for lunch etc. You do not have to do this all your life but at least until you have stabilized your condition in a satisfactory way.
  • Keep it to yourself. This one is hard because it is counter intuitive. The goal is not that you should not share your experience, neither that you should hide it. However there is still a strong stigma even in the medical community that ADHD is not a real problem but is either abused to gain the drugs or just another name for being lazy. Publishing it at large could create a negative impression that will drag you down. It is hard enough as it is no need to add to it unless absolutely necessary. also, this perhaps applies more to me, but I found that if I told people about it and whatever I was doing did not go well it provided an easy way to escape the situation. Keeping it from others put me on equal footing and pressured myself to deliver. My friends and loved ones all know about it, they knew before I did in some cases, but my co-workers it's none of their business. I am most likely exposing by answering you here but then again this is why I use an alias.
  • Talk to others in the same situation. We all live with it differently but maybe someone found a mean to cope you had not though of. These exchanges will help you a lot if you put interest in it.
  • Quit drinking coffee (or any form of caffeine for that matter). Caffeine is insidious as it first give you a boost of energy and attention but the effects fade away rapidly. Basically you will have the same patterns as taking normal ritalin, except caffeine will cause addiction. Over the long term, when taken regularly, Caffeine will not longer provide an extra boost but only give you what you would normally would be. If I can make a parallel Caffeine will substitute your normal levels, thus in the beginning your body feels a boost because it adds to your natural levels, but after a while you produce less and you will need Caffeine to just be normal. Methylphenidates will not cause this addictive effect and thus will always add to your normal level. Taking both Caffeine and Ritalin will provide a boost but it will be difficult to stabilize and the ups and downs will be detrimental to your attention. I will use Caffeine for periods of two or three days when I need a temporary boost, for example to counter jet-lag, in other words I use it so that I can get back to normal routine as fast as possible, but otherwise I stay off it.

Some proposed to stick to a single framework and-or language. If you are just starting then yes, though this is good advice to anyone that wish to learn programming. First learn one very well, then learn a second that is different paradigm (procedural vs functional vs object oriented etc). Basically it goes along the lines of first learn to walk then you can try running. Which one would be good for you depends greatly on what you want to do and how you plan to pay for your rent. this said, choose the first one because it allows you do to interesting stuff, because it will keep you seated in front. If you are lucky that language will become your means of procrastination and you will learn it very well.

Good luck, hope this helped.


I find the best way to learn to program is not through videos or books, but through trying to program. Pick a small task (that interests you) that you would want a program to do, and set about doing it. For example:

"I would like a program that read the contents of an xml file and displayed the items in a list on web page."

Don't try to write a huge piece of software, just do small exercises. I think you'll find that you learn quite a bit this way. Obviously, you'll want to use the internet as a resource for when you have questions:

  • How do I open the file?
  • How do I parse the file?
  • How to I write it to the page?
  • etc...

Not only will you avoid having to put on a video and flip through books, but it should keep you fairly engaged in the learning process to hopefully circumvent and ADHD problems. (of course maybe suggesting the internet as a resource isnt the best for that :))

This approach is also language agnostic, but I would follow the advice in Robert's answer and pick a language. I'm a fan of C# myself.

  • This is very helpful, I am going to do this from now on. I find I keep reading and reading but not actually putting my new knowledge to use. – Jonathan Musso Oct 31 '10 at 15:32
  • 1
    ++ for "just do small exercises". I think that's a good plan for anybody. – Mike Dunlavey Apr 22 '11 at 21:25

The best way to avoid wasting time, is to have an experienced person mentor you.

At this particular point, his most important task is to figure out what you need to do, and what technologies would suit you best, so you don't have to spend a lot of effort doing that yourself. The research role is very time consuming - especially if you are easily distracted.

If you don't have a mentor IRL, and cannot locate one, then I would suggest putting up a question providing very detailled information about what you want to do, what you can do, and what resources you have available to you. This would allow others to give you feedback on your situation and may save you quite a bit of time.

If you still dislike Python when you do that, then write WHY you dislike Python, and WHY you like PHP. It is perfedtly fine to have personal preferences, and you may find that there is an approach that you have never heard of that suits you fine.

  • I've created several on SO but I keep getting caught up between different solutions. I'll re-evaluate everything and start a new post here. – Jonathan Musso Oct 31 '10 at 15:30
  • I agree with the answer unfortunately it is not always easy to find. Participating in projects with others I found was the best way for me to learn and get the mentoring I needed. – Newtopian Mar 30 '11 at 4:56

I too was diagnosed with ADHD. At some point it even made me quit school (didn't graduate). I couldn't focus on the studies. The reason was that I couldn't keep being interested in it after the introductory or base parts.

But then at some miraculous moment in my life I realized that the problem wasn't that things I generally wanted to know weren't interesting enough (or interesting all around).

The problem was that I didn't have a proper base knowledge that would let me understand something at the minimum level required for being interested in it. If you're like I was - what you need to do is this:

  1. Find a well-reviewed book about a topic that interests you.
  2. Start reading that book.
  3. If you encounter a term you don't understand, that isn't covered by the book, get some info (wikipedia, articles, other books) about that term. Understand it first, and then continue reading that book.
  4. Repeat the process until you finish or at least read a good part of the material.

Another thing that could help - get interested in math. Most (if not all) programming languages use mathematical concepts inherently and a syntax that's rooted in math in one way or another.

I first learned how to program and only then started studying math (I knew nothing about math, didn't even know what the nth root of a number even meant, didn't know that division is inverse multiplication). So I had a hard time getting used to some of the basic concepts.

But once I got into math a bit everything started to make sense, and I wished I had learned it first, because it would have saved me lots of frustration and mistakes.

On a final note... Just by being here and seeking advice, you're already on the right track. It's important not to stray and keep heading straight, even (and especially) when it gets hard!


TLDR; Leverage the strengths of ADHD to learn how to code. Dive very deep on a specific language and framework and become an expert...repeat a few times and get away from coding. Day to day development isn't a strong area for those with ADHD.

One advantage that ADHD brings is a concept called Hyper Focus. See the misunderstanding of ADHD is that those diagnosed with it can't pay attention. That is false. It's just that we can't pay attention to things that don't interest us. If we find something that interests us, we zero in on it like a laser.

For me I discovered computers and Classical Culture (Greek/Roman history, mythology, languages) when I was young and fell in love with both. If you could imagine seeing me typing hundreds of lines of code from the back of Compute! magazine and being told as you watch me focused on this task for hours on end that I have ADD, you would think someone misdiagnosed me. Or watch me tear through the first 10 chapters of Wheelock's Latin before the first day of school. That is both the gift and the curse of our condition. If we genuinely love something, it's hard to pull us away from it. If something doesn't interest us, it's like pulling a stubborn mule up a mountain to get us to do it.

I found a few books that helped me take control of my condition. They may be able to help you as well. The first is Delivered from Distraction It provides some tips on how to capitalize on the strengths of ADD and mitigate the weaknesses. The Gift of Adult ADD provides some of the same guidelines but also casts ADD in a different light. What some people call inattentiveness is really us processing concepts in a conversation and integrating them very rapidly, resulting in "quantum leaps" that a lot of people find difficult to make. I've been frequently called "non-sequitur man" because I'll disengage from a conversation at times following my own train of thought and jump back in when I hit a "eureka" as if everyone else has been privy to my stream of consciousness.

One thing I've found working in the industry with my condition is that I'm great at higher level concepts and training others on what I've learned, not so great at the minutiae of development. In a pair programming setting though, I've found that the productivity multiplies above and beyond what either me or the other person could have produced in the same amount of time. So I've positioned myself as a strategist or team lead rather than a day to day coder.

Of course that was after 10 years of biting the bullet and getting good enough to be very knowledgeable at what I do. The downside to this is that employers/clients see my knowledge and figure, oh he's gotta be a great coder with what he knows. I explain very clearly that they don't want me as a pure coder because I'd be very ineffective at it. No matter how hard I try, I've found that once I've figured out HOW to do something actually doing it isn't as interesting to me.

On the other hand, explaining to others how to do it and letting them run with it has been one of my strongest abilities. For instance just this past week, I worked with a colleague who was new to WPF and showed him the ins and outs of the platform, how to use custom Panels and Data Templates and binding to do the heavy lifting for him. The result, he was able to complete his task in half the time scheduled for him and the client loves the results.

I think the results may differ for each individual, but I've found that most with ADHD prefer the abstract to the concrete.


I have ADHD and this is what I do.

1.Deactivate Facebook and set SelfControl which is a distraction minimizing application for mac. There are other kinds too such as StayFocused for Chrome. I use SelfControl because, unlike StayFocused, it blocks selected websites from ALL browsers. You may not need that but I can be a little sneaky.

2.Use the Pomodoro technique (www.pomodorotechnique.com). Basically this just breaks your study/work time down into 25 minute increments with small breaks in between. This is a bit of a mind trick but for me it really works. It keeps me from getting too overwhelmed.

3.Find a quiet place and/or a good soundtrack. Sometimes I'll just listen to music without lyrics or with very few lyrics to drown out external distractions. This is all a matter of taste. I like to listen to Secret Agent or Space station on SomaFM.

4.Try to be as hands on as you can. Start a project to keep you going.

I've had a lot of trouble just picking a language. I think that's pretty common. A friend sent me an article, it was geared towards librarians learning code (although I'm not a librarian) and it said that the key is to just keep going. Often times people will get started and then change their mind and switch gears but you really have to just go with it. You can always learn another when you're done.


Do a little bit at a time...is that a squirrel? just kidding

First you need an accurate diagnosis. Use your insurance to find a qualified psychologist that specializes in processing issues. They have a battery of tests you take to diagnose your distractibility.

You may have mild to severe to normal distractibility. You don't know for sure and you probably won't get much help until you do know. Start the process now to find out about you and so you can be happy. Also, even with "mild" distractibility medicine can help. Training will also help you. Furthermore, you could have other issues that will surface and that you might know but not be relaying here.

First bit of advice: find the specialist and take the test. If you've done that what did they say?

edit: after reading one of your other answers. Why did you stop your medication?


A lot of people have given great suggestions / answers and I wish to be a part of that!

The problem with me is, I get distracted with the slightest noise or conversation and it takes quiet some time to get back. In order to counter this and attain high levels of concentration, I use noise cancellation headphones when very I program and it has worked for me and I definitely think it will work for you but there is a flip side to it.

Bottom line - If you use it too much, you could be addicted to it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.