The 500-hour rule
How Long It Actually Takes to Learn to Code — and the 500 Hours That Get You There
Not 10,000. Not three months. Roughly 500 focused hours gets you to the junior web bar, and the honest problem is that most people quit inside the first twenty.
Key takeaways
- Employable junior web work is roughly 500 focused hours, not 10,000.
- Median completion across 221 open online courses is 12.6%; half of all dropouts happen in the first two weeks.
- The three walls sit at hour 60, hour 180 and hour 380 — and the first two are friction, not talent.
- Tutorial follow-alongs count for about a third of their length. Typing from memory is what counts in full.
- Track hours per week, not days. Four short sessions beat one long one.
Ask how long it takes to learn to code and you get one of two answers. Ten thousand hours, delivered like scripture. Or “three months, join our bootcamp,” delivered like a sales pitch. Both are wrong in the same direction: they describe someone else’s timeline and hand it to you as fact.
The real number, for the specific and limited goal of holding a junior front-end job, is around 500 focused hours. That is roughly nine months at two hours a day, or five months at four. The number moves a lot depending on six things listed further down, and it is not a promise.
But the length of the road is not why people fail. Across 221 open online courses, the median completion rate is 12.6%. Half of all dropouts happen in the first two weeks. Most people who “tried coding” did not run out of road at hour 400. They stopped at hour 12.
So this article does two jobs. It gives you the honest shape of 500 hours, band by band, and it names the three points where people break — the first of which arrives before most people have written ten lines.
At a glance
| Realistic time to junior-ready | About 500 focused hours of writing code, not watching it |
|---|---|
| At 2 hrs/day | ~9 months |
| At 4 hrs/day | ~5 months |
| Most common failure point | Hour 8–20, not hour 400 |
| What 500 hours buys | A junior front-end portfolio and the ability to read your own errors |
| What it doesn’t buy | Systems depth, interview performance, or a job on its own |
Where 10,000 hours came from, and why it doesn’t apply
Malcolm Gladwell took the figure from Anders Ericsson’s research on violinists at a Berlin conservatory and flattened it into a rule in Outliers. Ericsson himself spent years afterwards pushing back on the interpretation: it was an average, it was about expert performance, and it assumed deliberate practice with a coach correcting you.
Three things break the analogy for coding:
- It describes mastery, not employability. The gap between “can hold a junior job” and “world-class violinist” is enormous. You are aiming at the first one.
- Tooling does work for you. A framework, a package manager, and a browser that reloads on save absorb thousands of hours of what a 1990s programmer had to build by hand.
- Nobody is correcting you. Which cuts both ways — it removes the coach, so your 500 hours can easily become 500 hours of the same mistake.
Ten thousand hours is what it takes to be good at this. It is not what it takes to be hired at the bottom.
The actual shape of 500 hours
Progress is not linear and it is not smooth. It comes in bands with a specific failure mode at each boundary. Knowing which band you’re in tells you what to do next, and knowing the failure mode in advance is most of the defence against it.
These are cumulative hours of typing code. Reading counts for a third of an hour. Watching a video counts for almost nothing.
Nothing works and everything is red
You write your first output, learn variables, and hit a missing bracket at minute four. The material is trivial and the machine is merciless about trivia. This band has the highest quit rate of the five, because the reward is tiny and the friction is loud.
What breaks here: the assumption that difficulty means you’re bad at it.
Rule: finish something ugly. A page with a heading and one paragraph counts. Ship it today.Conditions, loops, functions, arrays
Real logic starts. You can make the machine repeat things and make decisions. This is also the first band where a copy-paste solution produces working output you cannot explain.
What breaks here: around hour 60, the first error message you genuinely can’t read. Most people paste it into a search box and take the first answer.
Rule: read the error out loud, then change exactly one line. One. If it doesn’t fix it, change it back.HTML, CSS, the DOM, and the tutorial loop
This is where the work becomes visible and where tutorial hell sets in properly. Following along works. Recalling does not. The gap between “I can build this with the video” and “I can build this from a blank file” is the single widest gap in the whole 500.
What breaks here: the illusion of competence that comes from typing what someone else decided.
Rule: after every tutorial, close it and rebuild the result from memory. Whatever you can’t recall is the actual lesson.Forms, fetch, storage, and version control
Your pages start holding things and talking to servers. Git enters, badly at first. This band is the first time you can build something a stranger could use, and the first time your own bug can lose data.
What breaks here: around hour 180, the blank file. With no tutorial to follow, the cursor just sits there and the confidence evaporates.
Rule: ship one broken thing to a real URL. Broken and public beats finished and local.
Reading code you didn’t write
Reading a codebase, opening a pull request, writing a test, deploying, explaining a decision in writing. None of this is in beginner tutorials and all of it is in the job.
What breaks here: around hour 380, the first rejection email plus the sudden certainty that everyone else is better than you.
Rule: write about what you built. The explanation is the skill, and it doubles as interview prep.Six things that move the number
500 is a midpoint, not a constant. These push it down hard:
- Prior maths or logic. Boolean thinking from anywhere — spreadsheets, chess, a technical trade — removes a chunk of the early band.
- English fluency. The error messages, the docs, and the answers are all in English. Fluent readers lose less time per error.
- A fixed feedback loop. Someone who reads your code weekly compresses months into weeks. This is the biggest single lever and the hardest to arrange.
- Scheduled, protected hours. “When I have time” produces roughly a third of the volume of a calendar block.
And these push it up:
- Tutorial loops. Three months of follow-alongs can be 300 hours of typing and near-zero recall.
- Four languages at once. Breadth feels like progress and delays fluency. One language until hour 200.
- Context switching. Twenty-minute sessions are almost worthless before hour 50. The first ten minutes are re-entry.
Measure hours, not days
Day counting is the most common self-deception in this whole process. “Day 47” sounds like progress even if day 47 is the fourth day this month.
Keep a plain text file. One line per session: date, minutes, what you did, what broke. It takes fifteen seconds and it does two things — it makes the total honest, and it makes a bad week visible before it becomes a bad quarter.
The three walls, and the first one is the real one
Hour 60 is where the language stops being new and starts being hard. Hour 180 is the blank file. Hour 380 is the first rejection. Only the last one is about talent; the first two are about friction and both are survivable by procedure.
For hour 60: keep a personal error file. Every message you decode goes in it with the fix. By hour 100 it reads like a manual for your own mistakes, and by hour 200 you stop opening it.
For hour 180: keep a list of five small things you already know how to build. When the blank file wins, build the smallest one and finish it. Momentum is a technique, not a mood.
For hour 380: apply to five jobs a week while still building. The rejection rate is not a verdict, it’s a sample size. Twenty applications is noise. Two hundred is data.
What 500 hours does not buy
Being clear about this saves you from a bad surprise at the end.
- Systems depth. Memory, concurrency, networks — you’ll have gaps a CS graduate doesn’t.
- Interview performance. Whiteboard and take-home formats are their own skill, trained separately.
- Debugging at scale. You’ll debug your own code. Someone else’s 40,000-line codebase is a different sport.
- A job. 500 hours gets you to the starting line. Applications, networking, and luck do the rest.
None of that is a reason to delay hour one. Every one of those gaps is cheaper to close from inside a first job than from outside it.
Hours 1–10, written out
Ten hours is the band that decides the other 490. Do these in order and don’t skip to the interesting part.
- Open the web compiler. Type a heading, a paragraph, and a link. Run it. (15 min)
- Break it on purpose — delete a closing tag, run it, read what happens. (10 min)
- Add a second page and link the two together. (20 min)
- Add CSS: one colour, one font size, one border. (25 min)
- Add a third page. Copy the CSS from page two by hand, not by paste. (20 min)
- Close everything. Rebuild page one from memory. (25 min)
- Add one thing you were not taught. Search for it, read two results, apply it. (30 min)
- Open devtools with Ctrl + Shift + J. Change a colour live in the elements panel. (15 min)
- Write a four-line README: what it is, how to open it, what you’d add next. (20 min)
- Save all three pages to Drive in a folder called
site-01. (10 min)
That’s ten hours and a site you own. Nothing about it required an install, a payment, or permission.
The 500-hour schedule, month by month
A 24-week plan with hour targets, project briefs, and the wall-handling procedures above. Free, no account.
One email, the plan attached. Nothing else unless you ask.Frequently asked
- Is 500 hours really enough to get hired?
- Enough to reach the level where a junior application is not embarrassing. Not enough to guarantee an offer. The average hides a wide spread, and hiring markets vary by city and quarter.
- Can I do it in three months?
- At five to six hours a day, yes, on a full-time schedule. The risk is that a compressed timeline leaves no room for the walls, so people who compress usually need a fourth month anyway.
- Does watching tutorials count toward the hours?
- Partially. Count a third. Three hours of video is roughly one hour of progress, and it’s the most overcounted hour in the whole process.
- What if I only have 30 minutes a day?
- 500 hours becomes about 2.7 years. Still works, but you need the error file and the project list from day one, because short sessions leave no slack for re-learning.
- Which language should the 500 hours be in?
- For the goal in this article — a junior job — JavaScript, with HTML and CSS. It’s the shortest distance between hours and a portfolio that a hiring manager can open in a browser.
- Do I need to finish every band in order?
- The bands are cumulative for a reason. Skipping to projects before hour 80 means every project stalls on syntax you don’t have, and stalled projects are where the quitting happens.
The honest summary
Ten thousand hours is a mastery figure borrowed from violinists and repeated until it felt like law. Five hundred is the number that gets you to a first job, and it is small enough to be believable and large enough to be respected.
The people who make it are not the fastest. They are the ones who survive hour 12 — who finish something ugly, keep the error file, and treat a blank file as a task rather than a mood. Hours 13 through 500 are mostly a consequence of that.
Start the tally. It’s ten hours to a site you own.