Code more hours

I have been learning to code for couple of months on and off.

I don’t have a job or any other responsibility, all my day is free but for some reasons I can’t code for more than two hours. I have tried to make different plans to try and code more but I couldn’t.

I really want to spend more time coding on daily 4 hours+, if you have any idea or tips let me know.

Two hours a day isn’t that bad at all. It’s consistent practice that counts for more than quantity. As a professional programmer, I’ll pull off 8-12 hour sessions, but it’s mostly writing mindless stuff, not trying to learn new things. Programming is hard to learn, and burning yourself out won’t help.

2 Likes

@chuckadams I agree with you, consistent is the most important thing. But at the same time I believe that the more you code in the short term the faster you learn.

Naw. Fatigue and frustration will actually cause you to forget things. But if you’re not satisfied with your progress, perhaps try adding 15 minutes a week? Don’t forget to take breaks though. Some people like the “Pomodoro technique” for that, though personally I don’t find it works for me (my ADHD doesn’t tolerate frequent interruptions).

Just experiment a bit in small increments til you do find a study pattern that works. Definitely try to study in a low-distraction environment.

1 Like

If your goal is to make better use of your time, you need to identify why you can’t code for more then 2 hours.

There are days when I could be programming non-stop for a few hours before attending to important needs for myself. (like eating lunch haha) Then there are days when I could hardly stay focused for a few seconds and want to check my feeds or get distracted.

The reasoning for this is simple, its the level of stress being applied. In the first scenario I usually have things going easy, and things are flow and dramatic progress is being made, but its not difficult work. The second scenario I usually have things really rough and am working on a hard problem and my mind is just not in it.

I’m not saying that is your problem, but it could be, or it could be something else. Being able to identify the pain point will help you “fix it”. Its not as easy as me saying “suck it up and tie yourself down to learn for 8 straight hours!”. (don’t do that its not healthy)

It could be your getting easily distracted, or the work is too hard and you want to get distracted. It depends on the main reason why you can only sustain learning for 2 hours.

If your just getting yourself distracted because you are learning and learning can get stressful I recommend doing 1 thing, which is spend time reviewing what you already learned. The reason is 2 fold.

  1. You get to re-enforce what you should already know
  2. You get to take a “mind break” by just re-checking what you already learned, which should be less stressful and thus easier.

I personally learn by building things. I usually build something using around 80% of what I already know, while trying to integrate 20% of something I don’t know. That way I get to review what I should already know, and have myself a small framework of knowledge to try out new things. This way I can easily “connect the dots” between the new stuff and the older stuff I’m already more confident with.

This method wont work for everyone, as everyone has their own “method” of learning. I just recommend identifying what is the root cause, and see if you can change it to meet your goal.

Good luck :smile:

2 Likes

I’m gonna actually go with a more counter intuitive approach and say you should actually code less. I would go as far as to say that writing code is the least important part of programming. If you understand what programming is about then learning the actual code is much easier

how to think like a programmer - YouTube

programmer — “event planner”
program — “a definite plan or scheme”

you can also think of programming and coding as just another kind of user interface. A user isnt just someone who clicks widgets on a webpage or visits a website. A user is anyone who interacts with the computer. You as a computer programmer are just an advanced user who happens to know a few more tricks.

Instead of thinking about programming as something you do a couple of hours a day, you should try to make it you main way of using the computer. With this mindset, youre not just programming a couple hours a day, youre programming everytime you touch your keyboard.

As a programmer, youre job is to explore ways of making a computer system more useful. Approach it with an explorers mind, and instead of rushing to meet a goal. More curiosity than obligation. If youre serious about this thing, its going to be something that will be a part of your life forever. So whats the rush — for money maybe, but meh.

3 Likes

This is the perfect answer I needed.

It seems a little abstract to me. But whatever, if it works for you it works.

1 Like

Makes sense to me, it’s about internalizing a programming mindset. Though it’ll eventually drive you crazy, as when every time you use a crappy app, you’ll go “look at this stupid behavior, I could write it better”.

Well, I considered that to be, what in Denmark/Danish is sometimes referred to, as a “work injury” (its tongue in cheek). I’m not sure what the proper term for it is in English but it might be “occupational hazard”. It just means that if, for example, you are a professional cameraman it’s hard to watch a movie and not think about the technical side of the movie.

I’m not sure that counts as coding hours. Also, I don’t think that happens voluntarily, it just happens. But having the right mindset is definitely something you can cultivate. But I think you can do that anywhere, not just in front of the PC.

1 Like

I also have ADD, and I find that the 25/5 rythm works perfect for me. So there is probably a lot of personal variation there.