TodoMVC
How to Read Source Code
Why it’s important
- Most of your time will be spent reading, not writing.
- Simulates working at a company or open source project.
- Fastest way to learn.
- Reading makes you a better writer (just like English).
- Learn how to ignore large parts of a codebase and get a piece-by-piece understanding.
Before you start
- Read the docs (if they exist).
- Run the code.
- Play with the app to see what the code is supposed to do.
- Think about how the code might be implemented.
- Get the code into an editor.
The process
- Look at the file structure.
- Get a sense for the vocabulary.
- Keep a note of unfamiliar concepts that you'll need to research later.
- Do a quick read-through without diving into concepts from #3.
- Test one feature with the debugger.
- Document and add comments to confusing areas.
- Research items in #3 only if required.
- Repeat.
Next level
- Replicate parts of the app by hand (in the console).
- Make small changes and see what happens.
- Add a new feature.