How do I relearn how to focus? How do I relearn how to learn?
January 28, 2012 10:40 PM   Subscribe

How do I get back into the swing of programming and coding regularly when I can't concentrate and can't find the motivation? Long, continuing illness has made me out of practice and lacking in energy and concentration.

I've had serious health problems for the last 5+ years. They won't be getting any better for several more years. I was in college when they struck, majoring in Computer Science. I struggled for years, trying to stay a full-time student so that I kept my insurance coverage. Eventually I had to give up because it was just hurting me (fortunately by that point I was eligible for other insurance). For the past two years, I've done a whole lot of nothing.

I'm on SSI, which is really not enough to live on even if I were healthy. My energy levels are way down, both from not feeling good and having a mostly solitary, unengaging life. It amazes me how much most people get done before lunch compared to what I manage all day. I can't muster the concentration to code like I used to.

I might be able to get back into it if I had people to work with, or a school or collaborative setting to work in, and real consequences to giving up. Or I might not. Actually going back to school is not an option due to finances and lack of availability of suitable courses.

I've been trying to work through courses that are available on the web: CS 50 and CS 75 from Harvard, CS 160B and others from Stanford, and I've downloaded others for later. I always lose motivation partway through and just stop working or watching the lectures or anything. And these are easy courses for me! I'm trying to get back into the groove of coding with assignments that require some thought put into the coding, but aren't algorithmically or theoretically difficult. I just can't put in the work for more than a few weeks.

Fresh out of high school, I added Lua scripting to an open source game. Now, looking up the API and switching between Lua and C syntax and figuring out all the little bits sounds exhausting. I can listen to podcasts and get all excited about coding, but then I try to do it and the fun parts are buried under the tedium of being rusty at coding.

What can you suggest to change my concentration?
posted by WasabiFlux to Health & Fitness (13 answers total) 16 users marked this as a favorite
 
It totally depends on what is making you so tired and out of it. You won't be able to concentrate/focus if your energy levels won't sustain it, so you basically just have to do something about your energy, IMO. If you're "tired" because you're depressed, then you need to treat the depression. Are you regularly seeing a doctor or psychiatrist? This isn't the kind of thing where there's a handy trick available.
posted by facetious at 10:47 PM on January 28, 2012


Best answer: There are two parts to your question, both of which I identify with very strongly.

Part one is the lifestyle issue. Studying code and trying to power through the boredom and mental block won't fix this. It's important that you try to get outside (in the sunlight!) and talk to people as often as possible if not every day. It will be difficult but it's worth it. You have to get off your computer. I'm not your doctor, though, so I shouldn't be giving you advice for your depression.

Part two is the burnout with software itself. Of course, the answer to this will vary for each person, but I can tell you what worked for me. I've been programming for work and fun for over 25 years now, but it got to a point where everything stopped being fun the moment I had solved the problem in my head - after that it was just a bunch of looking up APIs, typing and debugging, which is easy, right? So what I did was to start messing with things I hadn't done before in any serious way since I was a kid - programming music, graphics and games, particularly games mods. Recently I also took up playing around with Inform 7. The goal here was to get as far outside my programming comfort zone in both tools and goals, specifically the kinds of problems I've worked on most in my life as a professional developer. Working with Inform in particular has been a really huge mind-bender for me, because it's so unlike anything I've worked with before, and it's got me back to the "hmm why am I doing this other shit when I could be programming" mindset that had marked my most productive and enjoyable periods as a programmer.

So tl;dr - stop doing the same stuff you've always done and hope it will start being fun again. It is important to get out of your rut and try to do something different for a while.
posted by vanar sena at 11:07 PM on January 28, 2012 [2 favorites]


A few thoughts that might help you - feel free to pick and choose the ideas that seem like they might work for you:

Make realistic plan/goal for what you want to get down in day. Pay addition to the fluctuations in your energy level. What is best time of day for you? How long can you maintain focus? You may need to use a timer to work for x minutes and then take a break and then work a second round. (The Pomodoro approach might work for you.)

You say that you lose motivation partway through. Can you find shorter projects that you can complete (and have the satisfaction of completing something) so that you get done before you run out of motivation.

Find a study buddy, someone that can talk to you about what you are learning each day or each week in class. It will give you some accountabiity plus it is easier to stay excited about something if you can talk it over with someone else.

I would guess that you might be taking a variety of medications for your disability. Talk to your doctor about whether the medication is affecting your concentration. Maybe you can change meds and/or change the timing of the dose to improve your focus.

When you are trying to work, take regular breaksf or some exercise - for example taking a walk to clear your head and get your energy levels back up.
posted by metahawk at 11:11 PM on January 28, 2012 [1 favorite]


Best answer: Yeah I'd like to second what metahawk said - make a daily routine and force yourself to stick to it. Being at home without external forces keeping you regular is murder on personal habits. If you've given yourself a schedule that says four to six hours of programming/studying per day between 10am and 5pm, you are not allowed to do anything else with that time. If you could do it at university, you can do it at home.
posted by vanar sena at 11:30 PM on January 28, 2012


(One last thing and I'll stop hogging this thread)

Since you're looking for real projects with real consequences for messing up - and it sounds like you've already tried open source projects, which can be hit or miss in this area - have you considered taking up short contracts via sites like odesk.com? You'll be competing for sometimes ridiculously low payouts, usually against cheap-as-chips third-world developers, but it's real work for other humans and you'll be expected to complete it.
posted by vanar sena at 11:52 PM on January 28, 2012


Best answer: Can you get out of the house and go to a coffee shop or somewhere similar, where you can be surrounded by people, warmth, and music for a few hours? The more you go to one particular place, the more comfortable you will be there, and the staff will recognize you and stop to chat.

I have talked myself out of doing this many many times, because I have three perfectly good coffee makers at home, a perfectly good desk, and I'm poor. But still, every time I've gone to a coffee shop, I am blown away by how much better I feel.
posted by ke rose ne at 6:18 AM on January 29, 2012


I think the way I'd approach it is to come up with a small project. Nothing too ambitious or you may get overwhelmed just thinking about it. Small projects tend to grow anyway. I find it tough to learn just for learning's sake if I have to do it on my own. It's a lot easier to come up with a problem or project you want to work on. Target it to the language/API/platform you are trying to learn.

The important part is to break it down into small pieces. You don't have to come up with some master plan or anything. Just each time you sit down to do some programming, set a tiny goal or two in mind. Like "implement function or class X". Really small and simple. This is just for you to get the ball rolling and build up on the success of finishing that piece. Then you'll be like "Oh, X is done, but I feel like I can keep going. So I'll move onto Y". For me, each successive goal tends to snowball and I can tackle bigger and bigger pieces. But if I stop for too long it really kills the momentum I had going. Then it becomes tough to start up again and I'll have to build up momentum again with small goals.
posted by villafoyager at 11:49 AM on January 29, 2012


Best answer: First off, I want to say that I think it's really good that you keep trying even though things are rough right now. And I want to wish you the best of luck with this, and your health issues in general. Now, for some suggestions:


If you're susceptible to the lures of gamification (needing to complete everything in a set, get all badges, etc), you could give a number of programming challenge sites a go.
  • CodeYear, which is a gentle introduction to programming with JavaScript, and has badges.
  • CodingBat Has grouped assignments/challenges for both Python and Java. You get stars & checks for completing them.
  • Project Euler Lets you code in whatever you want. It's popular, but I've always found it too math heavy.
Along those lines there are a number of other websites, you can read some suggestions over at StackOverflow: [1], [2], [3].


Another thing that might help would be to have very concrete goals with what you want to make. Instead of thinking "I want to become a better programmer, I will follow this course", try to come up with something you'd like to make, and then try to make it. Start really small, make it. Then come up with something new, or expand on what you have, but make sure it's something you want to bring into this world. Maybe you want to make a website about something you find interesting, maybe there's something that annoys you with the browser you use/a site you frequent, and you want to make a script/extension to fix it.

Also, start keeping track of potential projects even if they seem too hard or stupid right now, they may turn into something good somewhere down the line. Write it all down somewhere, revisit them from time to time.
posted by bjrn at 12:04 PM on January 29, 2012 [1 favorite]


1. Fix your brain.

As others have mentioned, sunlight, exercise & a social life are tremendously important to overall happiness.

- If you can get out every day & walk around. Sunlight is good. Exercise is good. Both are necessary for proper functioning.

- Eat healthier. Fewer sugars & carbs (except from fruit and whole grains). Cut back on the soda, chips and hamburgers. Eat more fruits, vegetables and lean meats, maybe some nuts if you're not allergic. Stuff along those lines.

- Take a multi-vitamin (they're not expensive) - you may have a vitamin deficiency. I went through a period of time last year where I could barely string two sentences together. A friend wrote a 3 or 4 paragraph email to me & my response was literally "brain no work, can't think... something wrong." - the idea of wording it like "I'm having difficulty thinking" was too much. I attribute my recovery to better diet, more exercise and a muti vitamin.

- Fish Oil has been shown to have some benefit on cognitive functioning, though the results are somewhat in dispute. Keep them in the freezer to prevent fishy burps.

2. Programming is solving problems

If you're not motivated to program anything it's because the homework examples have no real-world consequence.

You don't believe that your life can be improved, so you don't thin programming can improve your life at all, so you're not motivated to do it. The "for the joy of it" aspect is gone because you don't have much joy in your life.

Once you take care of your brain problems, things will start seeming more interesting to you and you'll regain your interest in programming because you'll regain your interest in doing things in general.

So

1. Multivitamin
2. Eat better.
3. Get out more - sunlight + socializing.
4. Exercise however modestly.
5. The rest will follow.
posted by MesoFilter at 5:14 PM on January 29, 2012 [1 favorite]


Your state has a vocational rehab agency, and you are likely to be \eligible for assistance.

Teaching basic scripting in Adult Ed. or tutoring at a local community college of university might get you out of the house, around people, feeling useful, and getting some of the rust off the gears in your brain. I agree with MesoFilter
1. Multivitamin (esp. Omega 3s)
2. Eat better.
3. Get out more - sunlight + socializing.
4. Exercise however modestly.
posted by theora55 at 5:52 PM on January 29, 2012


Response by poster: facetious: Yes, I am very regularly seeing a doctor. It's possible I'm depressed, but with my condition, it's very difficult to determine whether "tiredness" and lack of energy is caused by the disease or depression. I'm being tracked by a social worker for that purpose.

metahawk: When I do code, I mostly tackle small projects, because the big ones are just too intimidating now to think I can get anything done before I burn out. With the small projects, or ongoing classes with sets of projects/assignments, I get several done over the course of a few weeks, and then I give up. It's not so much the problem of having a project too big or difficult, it's that eventually I hit a bad day (or series of bad days) and I never pick the work back up.

I had that problem with medications through most of 2010. I managed to get things adjusted so it wasn't as bad - though I still need to take something occasionally, for acute problems, that zaps my energy for a couple of days, setting off a series of bad days - and it's not possible to further change my medications without compromising my health in other ways. Other parts of my treatment (and bureaucracy, and profit-driven medicine, and other things) keep me from feeling as good as I could. Fighting it on the medical side hasn't helped.

vanar sena: "If you could do it at university..." There's a reason I had to drop out. I couldn't keep up the routine, especially with the fluctuations in my health. The work wasn't difficult, I just couldn't put in the time. It ended up disastrous enough each time that there's no way I'd try to do anything now that other people would rely on, especially something like oDesk where they'd be paying me.

ke rose ne: Going out to a coffee shop sounds possibly nice, if I can find a good coffee shop, except that I'm even poorer than you. Maybe once a week could be reasonable.

MesoFilter: Sunlight is good. Exercise is good. Every once in a while I try to get more of each, but it's even more difficult for me now that I've moved 400 miles north. I try.

Nothing can be done for diet and vitamins. My diet is severely restricted, and most common "eat healthier"-type advice would actually be dangerous for me. Same goes for multivitamins (aside from prescribed vitamins I'm already getting on a regular basis), and fish oil could be iffy.

The "for the joy of it" aspect is definitely gone, which is why I can't think of anything interesting and fun to work on. If I could think of anything to write that would help solve my problems, I'd be doing that, because that's about all that seems worthwhile to code over the long term.

---

Today I did get up, have some coffee, did a little coding, went on a walk (the weather was better than usual today), and did some more coding. Today I felt good and I was motivated. That's not going to last. I suppose the hidden meaning of my question might be, how can I regain my motivation to code when it's been trampled by periodic health problems? (Keeping in mind I have very few friends and don't know anyone who'd be able to work with me or regularly motivate me somehow.)
posted by WasabiFlux at 5:53 PM on January 29, 2012


Something to consider - what if you don't actually want to be a programmer? Or specifically, you either want to program only as a hobby, or only as work? I'm assuming you're still in your 20s - it's not even close to too late to explore something else.
posted by vanar sena at 10:06 PM on January 29, 2012


Response by poster: Given a choice of any the things I enjoy, programming is the one that makes the most sense to turn into a job. I guess the motivation behind my periodic "must code" desire is that it seems impossible to do anything in the field with a 5+ year gap in anything code-related. That's huge in the computer field, where now I find myself completely boggled by the new technologies (I still have a lingering prejudice against JavaScript from the 90's).

And I don't know about the "you're still in your 20's, you have time" thing. Even if I do better than average, I can look forward to 15-25 years of closer-to-normal life out of the 25-40 years I likely have left. I know, I'm "too young" to be looking at it like that, but I'm being realistic. If I were totally healthy, there are lots of things I would try to do, that I'll never do now. Once I get out of this (mental and physical) stall, I'll have a limited time to make it into a stable job and career. Turning around now would be disastrous.
posted by WasabiFlux at 3:47 PM on January 30, 2012


« Older Help me be less ugly   |   Help me decipher this old handwriting. Newer »
This thread is closed to new comments.