In order to learn programming you’ve got to absorb tons of new fairly difficult information and to write hundreds lines of code.
Obviously, it cannot be done in several hours or even days, as some optimistic programming book titles may suggest.
The exact amount of time you’ll spend on learning programming depends on many factors: the language and tools you need to learn, the quality of video tutorials and books you’re going to use, your dedication.
For example, learning Java usually takes more time than learning Python.
Circumstances in which you’ll learn also matter. If you’re tired after work or school, or don’t have a quiet place letting you completely focus on programming, then your education will probably advance slower than it could.
In an ideal situation, when you don’t need to go to work or anywhere else, so that you can spend all your productive time on learning programming on your own, an average programming learner can complete her or his initial programming education in three to six months. By “initial programming education” I mean the acquisition of programming knowledge and skills enough to start working on real projects.
In my case it was seven and a half months. I deliberately chose the long path since I wanted to learn everything as deeply as possible (probably, much deeper than it would be sufficient, but my perfectionism was quite insistent). I also had a small business to run, which also required one to three hours of my attention about every other day. Had I dived completely into my programming education and avoided unnecessary scrupulosity during that process, I would probably have completed it in five months.
One might say: “Wow! That’s much longer than I’ve been told! What about several weeks at most?” Technically, you can learn programming basics and syntax of one programming language in such a short amount of time. But you won’t be ready to work on real projects after this meager studying.
And I want to emphasize the following: those were estimates for full-time or almost full-time programming education. If you can only learn on Sundays, then your learning process might stretch for years.
The only exception is when all you need is to learn how to create simple websites with HTML and CSS. In this case even a week might be enough. But HTML and CSS are not programming languages, and using them is not programming, even though both of these technologies are widely used in web development.
Prepare for a long journey
Learning programming requires time, perseverance, and patience. It’s not a piece of cake, but it’s not something difficult either. If you don’t set unrealistic expectations in terms of how much time it will take, you won’t get disappointed or be hurrying.
Get ready to learn programming for at least three months. You may successfully complete your education after just a month and a half — sometimes it is feasible, but I wouldn’t recommend to use this number as a reference point. It’s much better to get such a surprise rather than expect to finish your education in two weeks, hurry to keep up with this totally unrealistic plan, and eventually give up because it seems to be more difficult than expected. I wouldn’t mention this frustrating alternative here if it weren’t one of the most typical scenarios.
Anyway, learning programming will be a long journey. It’s not a sprint, but a marathon. And if you want to complete it successfully, it’s important not to bustle and to manage your learning time and energy in the best possible way.
How many hours per day you can learn programming
Learning programming with video tutorials and books is more than just, accordingly, watching and reading them. As you do this, you not only watch and read, but also constantly process and analyze new information, and sometimes it might be tricky. Moreover, you’ve got to test your understanding by writing the code from code examples and doing exercises.
Thus, even if you can watch an entire season of your favorite show in one go, it doesn’t mean that you should expect from yourself to be able to achieve the same result with video tutorials, even if they are very interesting and exciting.
When you learn programming concepts and how to write code, your brain usually works pretty hard. Nobody can sustain high performance in such conditions for a long period of time, like ten consecutive hours or so. The more difficult the topic you’re focusing on is, the sooner you’ll get tired.
The same logic applies to the programmer’s job: the more difficult the task, the shorter the span of time you can effectively work on it until you’re exhausted and need some rest.
From my personal experience, I’d say that for someone who’s just learning programming this process is almost always as hard as a moderately difficult task from programmer’s working day. Of course, objectively speaking, it’s not that hard, but it feels the same way and is equally intense in terms of brainwork.
So in order to figure out how much time you can usually learn programming per day if it’s your main activity, we can simply borrow the typical data from the software development industry.
The following figures are based on my own experience, experience of my friends working as professional software developers, and experience of many other programmers that was shared by them on the Internet.
If you’re working on some big and not the easiest task, you can do it for about 4 to 6 hours a day. Here and below I’m talking about the “net” coding time or the time directly related to coding, like reading manuals and thinking, but not including chit-chats with colleagues or meetings in Michael Scott’s style.
If the task is really hard, this number shrinks to 3 or even 2 hours a day. On the contrary, if it’s just some routine coding, something that you’ve already done millions times before so that now it can practically be done on autopilot, you can do it for 10, 12, or sometimes even 14 hours a day.
Accordingly, it would be great if you could learn programming for 4 to 6 hours a day, but it’s totally normal not to be able to “eat” more new information for the rest of the day after just 2 hours of reading really difficult programming book chapter.
Have a rest from learning programming if you’re tired
If you’re “stuffed”, put your tutorials, books, and computer aside, and have a rest. There’s no use in learning when your brain refuses to digest new information. It’s not a movie or a fiction book, when you may overlook some details and still be able to follow the storyline. Every piece of new information in programming is important and requires your full attention.
At times I broke this rule and continued learning after the moment I clearly felt that I was exhausted. Usually it happened when I tried to complete some exercise from the book, which already took several hours, and I felt that the solution was waiting just around the corner. So, I extended my learning time to 7, 8, or even 10 consecutive hours.
Whether I eventually managed to reach my goal or not, after such an experience my head hurt and often I needed to skip the next day just to recover. Sometimes such “feats” are inevitable, but they definitely shouldn’t become a norm — I’m not a doctor, but it feels really unhealthy.
In order to learn more about how to organize your programming learning time, read also the article about how to get maximum from your learning hours with the Pomodoro technique.