LearnFinding the Time to Focus on Your Code

Photo by Ondrej Supitar / CC0

Ashley Harpp
writes on February 16, 2017

Trying to focus on two things at once is hard. You may be able to eat and drive or listen to music while working. But it’s another thing to listen and talk at the same time. At the end of the day, only one task can have your undivided attention. And convincing ourselves that it’s possible to do both would be fooling ourselves.

“People can’t multitask very well, and when people say they can, they’re deluding themselves.”

Earl Miller, Professor of neuroscientist at MIT

When I first started learning code, I convinced myself that it was possible to watch my daughter and study in 15-minute sprints. I’d sit on the living room floor with my laptop while my daughter played with her toys.

This was short lived, and it wasn’t because I lacked discipline. I simply could not focus. My attention was divided. And while I had committed to learning in sprints, It was difficult to recall anything I studied. I learned the hard way that if I was going to get the most out of my studies, I needed complete solitude. And a lot of other things.

To do this, I had to ask myself some serious questions.

1. When is the best time to focus?

After a series of Google searches, I walked away more confused than when I’d started. I discovered that the answer to this question was not in a Google result. I needed to think about me, and my unique situation. I had a daughter who needed my attention. And I couldn’t justify forcing her to share that time with anything else I had going on.

I decided to turn my 15-minute sprints into 45-minute sessions. I’ve always been able to do my best work late at night so I wanted to take advantage of that space. During the day, I’d reach out to friends or local businesses and offered to build their websites for free to gain experience.

2. What environment enables me to focus?

As mentioned at the outset, focusing is hard. Even when you know exactly what you’re going to study, that doesn’t mean you’ll be motivated to do it. Personally, I need 3 things:

  1.  A clutter free environment
  2. Lots of natural light
  3. Soft background music when possible

Sitting in my daughter’s room surrounded by toys would not get the job done. What are the things that enable you to focus best? Having an environment free of distraction is usually a good start. Could you put your phone in “do not disturb” mode until you’re done studying? Think about the distractions that you face daily and try to remove them before they become an issue.

3. Am I in a clear mental space?

There may be instances where you have a good time and environment to study, but you just don’t feel like it. That’s okay. And it doesn’t make you a failure. There were times when I was so tired that I didn’t have the capacity to look at a Treehouse video. The wrong thing to do would be to force myself to watch something I probably wouldn’t remember the next day. The emphasis here is quality over quantity.

The last thing you want to have is the “let’s just get this out of the way” mindset. This approach doesn’t help you learn anything. And you might find yourself circling back to that lesson down the road. There’s nothing wrong with saving it for the next day or doubling up later in the week.

If you put the same effort into learning code as you would a career job, then you’ll be prepared for anything you encounter professionally. It’s not the code itself that makes you successful. But it’s the resolve to give 100 percent to every task you’re assigned. If you give 60 percent effort while you’re learning, then how will that transition when you’re on the real job?

If you put the same effort into learning code as you would a career job, then you’ll be prepared for anything you encounter professionally.

There are other factors that can improve your focus when learning. For example, having a healthy routine, and avoiding stress can also impact your studying. There are tons of resources out there, but here are some of my favorites:

Focusing is hard, but it’s not impossible. Is there anything specific that encourages you to focus? I’d love to hear about it.

Factor Learning to Code into Your 9-5


Learning with Treehouse for only 30 minutes a day can teach you the skills needed to land the job that you've been dreaming about.

Get Started

4 Responses to “Finding the Time to Focus on Your Code”

  1. Putting the phone in another room is actually really helpful to get some good blocks of focus in. Also, email and social media is not allowed during focus time either. I also cannot be hungry, so I gotta make sure I’ve eaten a good healthy meal and drinking lots of water. Also, I do a lot of great focusing after exercise. So I can do a 30 minute workout, take a quick shower, then do a good solid hour or two of great focused work.

  2. Great article topic Ashley,
    This article just spoke to me as I have a 7 month old daughter myself and I’m currently going through this situation,

  3. Das Neves on February 22, 2017 at 3:20 am said:

    I practice meditation between different task. 10-15 min of meditation and I can learn with clear mind.

  4. Great topic, Ashley.

    I have to say I do struggle with focus. Focus with learning, focus with working, focus with leisure time. But it’s not completely my fault. I have a neurological condition which affects my ability to learn and I’m pretty sure there’s attention deficit issues included in there too,

    So, more than anything else I just try to make sure I’m motivated and have a clear goal. One day I’ll sure I’ll get there. 🙂

Leave a Reply

You must be logged in to post a comment.

man working on his laptop

Are you ready to start learning?

Learning with Treehouse for only 30 minutes a day can teach you the skills needed to land the job that you've been dreaming about.

Start a Free Trial
woman working on her laptop