Interpreters

Crafting Interpreters study plan, and how long it takes

Crafting Interpreters takes about 160 hours if you type every line and do some of the challenges: roughly 57 hours for jlox and 100 for clox in our chapter guides. Next to two NeetCode problems a week, at about 8 to 10 hours a week in all, that is 28 weeks. Here is the plan: a chapter a week, the three short opening chapters together.

Updated

The 28 weeks

WeekChaptersWhat you build
11 to 3Read: the map of the territory and the Lox language
24jlox scanner
35AST generator
46Recursive descent parser
57Evaluator
68Statements and environments
79Control flow
810Functions and closures
911Resolver
1012Classes
1113Inheritance: jlox done
1214clox: chunks of bytecode
1315The VM
1416Scanner on demand
1517Pratt parser compiler
1618Value types
1719Strings
1820Hash table
1921Globals
2022Locals
2123Jumps
2224Calls and functions
2325Closures and upvalues
2426Garbage collection
2527Classes and instances
2628Methods and initializers
2729Superclasses
2830Optimization: clox done

Every chapter has its own reading guide with a time budget, the challenges worth doing, common traps and the test suite that checks it.

Where people get stuck

  • Chapter 6 (parsing): precedence and error recovery are new to most people. Draw the grammar.
  • Chapter 11 (resolving): the bug it fixes is subtle. Write the failing closure example first.
  • Chapter 17 (compiling expressions): the Pratt parser is a different way of thinking about precedence.
  • Chapter 25 (closures): upvalues are the hardest idea in the book. Budget extra.
  • Chapter 26 (garbage collection): bugs appear far from their cause. Turn on the stress-test mode.

Faster or slower

People who already know Java and C and skip the challenges report finishing in well under 160 hours; people learning C as they go often take longer for clox. If that is still too much, half pace gives each week two calendar weeks; if you have more time, nothing stops you from working ahead of the calendar. The plan generator gives you real dates for either pace.

Keep yourself honest

Each coding chapter has a test suite in the book's repository. On cracked.guide, you push your repo and a GitHub Actions workflow runs the official tests; a passing chapter is marked verified. See the Lox test suite and how the verification works.

Questions

How long does Crafting Interpreters take?

About 160 hours typing the code and doing some challenges. The cracked.guide path gives it 28 weeks, a chapter a week next to two NeetCode problems.

Can I do Crafting Interpreters in a month?

Full time, yes. Part time, most people need three to four months to type it all and understand it.

Should I do the challenges?

Some of them. They are where you design rather than follow. Do them on a branch so the official tests still pass on main.