Six months. That is the number I give when someone asks how long it takes to learn to code, and it is true only if they hear the rest of the sentence. Six months of steady work gets you to the point where you can build small things without following a tutorial line by line. It does not get you a job.
What matters is how many hours you can put in, and whether those hours are spent typing or watching.
Three timelines, three different goals
If the goal is to build a simple website for yourself, three to four months of part time study is enough. You will know HTML, CSS, some JavaScript, and how to put a page online. That is a real skill and plenty of people stop there.
If the goal is a junior developer job, plan for twelve to eighteen months. That is not because the syntax takes that long. It is because you need enough finished projects to survive an interview, and enough debugging experience to not freeze when something breaks.
If the goal is to be genuinely good, five years is closer. I have been writing code since 2014 and I still meet problems I cannot solve on the first day. Anyone who says they finished learning is selling something.
The hours matter more than the calendar
Ten hours a week for a year is roughly 500 hours. Twenty five hours a week for a year is 1,300 hours. Same calendar, very different developer. This is why two people start the same course in January and one is employed by December while the other is still on module three.
Be honest about your real capacity. If you work a full time job in Lagos and commute two hours each way, ten hours a week is a serious commitment. Do not plan for twenty five and then quit in week three because you missed a day.
One student of mine studied on the danfo, offline, using downloaded docs and a notebook. She had maybe eight hours a week. It took her two years to get her first role. She got it. The people who planned twenty hours and did four are still waiting for the right moment.
What actually slows people down
It is rarely the difficulty of programming. Most beginners can understand a for loop. What kills them is everything around it.
- Tutorial hopping. Three courses, none finished, no project at the end.
- Environment problems. Python not on PATH, XAMPP refusing to start, Git Bash throwing errors nobody explains.
- Hardware. An 8GB laptop running VS Code, Chrome with thirty tabs, and a local database will crawl. You will blame your code.
- Power and data. NEPA takes light for six hours and the momentum dies with it.
- Learning alone. No one to look at your code and tell you why it is wrong.
The fix for most of these is boring. One course, one project, one person who checks your work. Charge your laptop when there is light. Download what you need so a bad network does not end the session.
What speeds it up
Building something you actually want is the biggest multiplier. A church attendance tracker, a small shop inventory, a script that renames your music files. The project gives you a reason to learn the next thing, and a place to use it.
Reading errors properly saves months. Beginners paste the whole error into Google and click the first Stack Overflow link, then copy code they do not understand. Better: read the last line, find the file and line number, and change one thing at a time.
Getting your code reviewed, even informally, is the other one. Post a small function in a WhatsApp group and ask what is confusing about it. You will learn more from one honest review than from ten hours of video.
How I wasted eighteen months
I did not learn in six months. I spent about a year and a half pretending to learn. I would watch a tutorial, feel like I understood, and then open an empty editor and have nothing. The change came when I stopped watching and started building a small tool for a friend's business. It was ugly. It broke every week. But I owned it, and every bug taught me something the videos had skipped.
That is the part nobody puts in the timeline. You will spend a chunk of your first year unlearning the idea that learning means consuming. It means producing, badly, and then fixing it.
A schedule that survives real life
Pick four days a week, ninety minutes each. Put them in your phone with an alarm. On those days, no videos unless you are stuck. Just your project and the docs. On the fifth day, review what you built and write down one thing you still do not understand.
That is about six hours a week. In a year, with two weeks off for exams or travel, you get roughly 300 hours. Enough to build three small projects and start applying. If you can do more, do more. If you can only do this, do this. Consistency beats intensity over twelve months.
What to do this week
Write down the number of hours you can honestly give per week, then multiply by fifty. That is your first year. Compare it to the goal you actually have, and adjust the goal or the schedule, not both. Then open your editor and start the smallest project you can finish this month.
If you have not started at all, read frontend, backend or full stack first. Then see 10 Python projects for your portfolio for something concrete to build. The Software development for absolute beginners course follows the same order I described here.